-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbloomberg.Rmd
More file actions
318 lines (294 loc) · 7.24 KB
/
bloomberg.Rmd
File metadata and controls
318 lines (294 loc) · 7.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
---
title: "Bloomberg American Health Case Studies"
description: "Open Case Studies funded by the Bloomberg American Health Initiative — real-world public health data science education."
---
```{css, echo=FALSE}
.cs-section {
margin-bottom: 28px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.cs-section-title {
font-size: 1.3rem;
font-weight: 700;
letter-spacing: 0.08em;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
margin: 0 0 12px 0;
padding-bottom: 6px;
border-bottom: 2px solid currentColor;
}
.cs-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.cs-card {
border: none;
border-radius: 6px;
padding: 12px 16px;
text-decoration: none;
color: #ffffff;
display: block;
text-align: center;
transition: filter 0.2s, transform 0.2s;
font-size: 1.4rem;
line-height: 1.4;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.cs-card:hover {
filter: brightness(0.88);
transform: translateY(-2px);
color: #ffffff;
text-decoration: none;
}
.bloomberg-btn {
display: inline-block;
padding: 14px 32px;
background: white;
color: #003366;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
font-size: 1.05rem;
transition: transform 0.2s, box-shadow 0.2s;
margin: 6px;
}
.bloomberg-btn:hover {
transform: translateY(-3px);
box-shadow: 0 4px 14px rgba(0,0,0,0.25);
color: #003366;
text-decoration: none;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 24px;
margin: 32px 0;
}
.feature-card {
background: #f9f9f9;
border-radius: 8px;
padding: 28px 24px;
border-left: 4px solid #003366;
}
.feature-card h3 {
font-size: 1.15rem;
font-weight: 600;
color: #003366;
margin: 0 0 10px 0;
}
.feature-card p {
color: #555;
font-size: 0.97rem;
line-height: 1.6;
margin: 0;
}
.pub-card {
border-left: 4px solid #003366;
padding: 14px 20px;
margin: 16px 0;
background: #f9f9f9;
border-radius: 0 6px 6px 0;
}
.pub-card a {
font-weight: 600;
color: #003366;
}
.coming-soon-box {
background: #f0f4f8;
border: 1.5px dashed #003366;
border-radius: 8px;
padding: 28px 32px;
text-align: center;
color: #555;
margin-top: 16px;
}
.coming-soon-box h3 {
color: #003366;
font-size: 1.4rem;
margin: 0 0 10px 0;
}
.skills-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin: 1px 0 2px 0;
}
.skills-col {
background: #f9f9f9;
border-radius: 8px;
padding: 20px 22px;
border-top: 4px solid #238A8D;
}
.skills-col h3 {
font-size: 2rem;
font-weight: 700;
color: #238A8D;
text-transform: uppercase;
margin: 0 0 1px 0 !important;
padding-top: 0 !important;
}
.skills-col ul {
list-style: none;
padding: 0;
margin: 0;
}
.skills-col ul li {
padding: 5px 0;
font-size: 1.4rem;
color: #333;
border-bottom: 1px solid #eee;
line-height: 1.4;
}
.skills-col ul li:last-child { border-bottom: none; }
.skills-col ul li::before {
content: "▸";
color: #fbb731;
font-weight: 700;
margin-right: 7px;
}
```
---
<img src="resources/bloomberg_ocs_logo.png" alt="Bloomberg American Health Initiative logo" style="max-width: 320px; margin-bottom: 24px; display: block;">
## About the Project
As part of the larger Open Case Studies project (OCS), these case studies were developed for and funded by the [Bloomberg American Health Initiative](https://americanhealth.jhu.edu/bloomberg-american-health-open-case-studies-project). The OCS project is made up of a team of researchers at the Johns Hopkins Bloomberg School of Public Health (JHSPH).
<br>
## What You'll Work With
<div class="skills-grid">
<div class="skills-col">
<h3>Question Type</h3>
<ul>
<li>Changes over time?</li>
<li>Differences in groups? regions?</li>
<li>Differences in groups over time?</li>
<li>Differences in paired groups?</li>
<li>Predict outcomes for new data?</li>
<li>Does this influence my data?</li>
<li>Relationships between variables?</li>
<li>Display data for others to find, interpret and easily use</li>
</ul>
</div>
<div class="skills-col">
<h3>Data Type</h3>
<ul>
<li>PDF</li>
<li>CSV</li>
<li>Website</li>
<li>Excel</li>
<li>Text in images</li>
<li>API</li>
<li>Google sheets</li>
<li>Survey data / Code books</li>
<li>Multiple files</li>
</ul>
</div>
<div class="skills-col">
<h3>Wrangling Methods</h3>
<ul>
<li>Extracting data from a PDF</li>
<li>Geocoding data</li>
<li>Joining data</li>
<li>Filtering data</li>
<li>Reshaping data</li>
<li>Transforming data</li>
<li>Working with text data</li>
<li>Repetitive processes</li>
</ul>
</div>
<br>
</div>
## What You'll Learn
<div class="skills-grid">
<div class="skills-col">
<h3>Intro Data Viz</h3>
<ul>
<li>Interpretable tables</li>
<li>Scatter plots, line plots, bar plots</li>
<li>Pie chart / waffle plots</li>
<li>Heat maps</li>
<li>Correlation plots</li>
<li>Visualize missing data</li>
<li>Creating maps of your own data</li>
</ul>
</div>
<div class="skills-col">
<h3>Data Viz</h3>
<ul>
<li>Data visualization styles</li>
<li>Facet plots</li>
<li>Adding labels & annotations</li>
<li>Adding error bars</li>
<li>Combining multiple plots</li>
<li>Interactive plots</li>
<li>Interactive maps</li>
<li>Interactive dashboards</li>
</ul>
</div>
<div class="skills-col">
<h3>Analysis Methods</h3>
<ul>
<li>Percentages with missing data</li>
<li>t-tests</li>
<li>Correlation and causation</li>
<li>ANOVA</li>
<li>Linear regression</li>
<li>Chi-squared test of independence</li>
<li>Mann-Kendall Trend test</li>
<li>Machine learning</li>
</ul>
</div>
<br>
</div>
## Case Studies
```{r case-study-cards, echo=FALSE, message=FALSE, results='asis'}
library(readr)
library(dplyr)
df <- read_csv("OCS_info_co2int_only.csv", show_col_types = FALSE)
bp <- df |>
filter(grepl("ocs-bp-", repo_name)) |>
select(case_study_name, Title, case_study_url)
sections <- list(
list(
title = "Obesity and the Food System",
color = "#E07B39",
repos = c("ocs-bp-rural-and-urban-obesity", "ocs-bp-diet")
),
list(
title = "Environmental Challenges",
color = "#3A8C5C",
repos = c("ocs-bp-co2-emissions", "ocs-bp-air-pollution")
),
list(
title = "Addiction and Overdose",
color = "#8E44AD",
repos = c("ocs-bp-opioid-rural-urban", "ocs-bp-vaping-case-study")
),
list(
title = "Violence",
color = "#C0392B",
repos = c("ocs-bp-RTC-wrangling", "ocs-bp-RTC-analysis",
"ocs-bp-school-shootings-dashboard")
),
list(
title = "Adolescent Health",
color = "#2471A3",
repos = c("ocs-bp-youth-disconnection", "ocs-bp-youth-mental-health")
)
)
for (s in sections) {
studies <- bp |> filter(case_study_name %in% s$repos)
cards <- paste0(
'<div><a class="cs-card" style="background:', s$color, ';" ',
'href="', studies$case_study_url, '" target="_blank">',
studies$Title,
'</a></div>',
collapse = "\n"
)
cat(
'<div class="cs-section">',
'<div class="cs-section-title" style="color:', s$color, ';">', s$title, '</div>',
'<div class="cs-grid">', cards, '</div>',
'</div>\n'
)
}
```
<a href="search.html" class="bloomberg-btn" style="background:#003366; color:white; font-size:14px; display:block; text-align:center; margin-top:20px;">Browse All Case Studies →</a>