47
47
toc: true
48
48
---
49
49
50
- < script src ="/rmarkdown-libs/header-attrs/header-attrs.js "> </ script >
51
50
52
51
< div id ="TOC ">
53
52
< ul >
54
- < li > < a href ="#short-background "> Short Background</ a > </ li >
55
- < li > < a href ="#why-run-these-surveys "> Why Run These Surveys?</ a > </ li >
56
- < li > < a href ="#whats-in-the-survey "> What’s in the Survey?</ a > </ li >
57
- < li > < a href ="#some-interesting-examples "> Some Interesting Examples</ a > </ li >
58
- < li > < a href ="#basic-correlation-analysis "> Basic Correlation Analysis</ a >
53
+ < li > < a href ="#short-background " id =" toc-short-background " > Short Background</ a > </ li >
54
+ < li > < a href ="#why-run-these-surveys " id =" toc-why-run-these-surveys " > Why Run These Surveys?</ a > </ li >
55
+ < li > < a href ="#whats-in-the-survey " id =" toc-whats-in-the-survey " > What’s in the Survey?</ a > </ li >
56
+ < li > < a href ="#some-interesting-examples " id =" toc-some-interesting-examples " > Some Interesting Examples</ a > </ li >
57
+ < li > < a href ="#basic-correlation-analysis " id =" toc-basic-correlation-analysis " > Basic Correlation Analysis</ a >
59
58
< ul >
60
- < li > < a href ="#correlations-sliced-by-time "> Correlations Sliced by Time</ a > </ li >
61
- < li > < a href ="#correlations-sliced-by-county "> Correlations Sliced by County</ a > </ li >
59
+ < li > < a href ="#correlations-sliced-by-time " id =" toc-correlations-sliced-by-time " > Correlations Sliced by Time</ a > </ li >
60
+ < li > < a href ="#correlations-sliced-by-county " id =" toc-correlations-sliced-by-county " > Correlations Sliced by County</ a > </ li >
62
61
</ ul > </ li >
63
- < li > < a href ="#whats-next-with-the-surveys "> What’s Next with the Surveys</ a > </ li >
62
+ < li > < a href ="#whats-next-with-the-surveys " id =" toc-whats-next-with-the-surveys " > What’s Next with the Surveys</ a > </ li >
64
63
</ ul >
65
64
</ div >
66
65
@@ -172,7 +171,7 @@ <h2>Short Background</h2>
172
171
title = "Daily new confirmed COVID-19 cases per 100,000 people",
173
172
range = c(0, 30), choro_params = list(subtitle = subtitle))
174
173
grid.arrange(p1, p2, nrow = 1)</ code > </ pre >
175
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-2 -1.svg " width ="960 " class ="wide-figure " /> </ p >
174
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-3 -1.svg " width ="960 " class ="wide-figure " /> </ p >
176
175
< p > We generated these plots using our < a href ="https://cmu-delphi.github.io/covidcast/covidcastR/ "> covidcast R
177
176
package</ a > .
178
177
In all, fetching the data from our API and producing the heatmaps
@@ -353,7 +352,7 @@ <h2>Some Interesting Examples</h2>
353
352
linetype = 2, size = 1, color = ggplot_colors[1]) +
354
353
geom_vline(xintercept = as.numeric(as.Date("2020-06-25")),
355
354
linetype = 2, size = 1, color = ggplot_colors[2])</ code > </ pre >
356
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-3 -1.svg " width ="576 " /> </ p >
355
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-4 -1.svg " width ="576 " /> </ p >
357
356
< p > This example, as with all code examples in this blog post, was produced using
358
357
our < a href ="https://cmu-delphi.github.io/covidcast/covidcastR/ "> covidcast R package</ a > .</ p >
359
358
< p > A first glance reveals that the % CLI-in-community indicator
@@ -381,7 +380,7 @@ <h2>Some Interesting Examples</h2>
381
380
p_list[[i]] = plot_one(geo_values[i], legend = FALSE)
382
381
}
383
382
do.call(grid.arrange, c(p_list, nrow = 5, ncol = 4))</ code > </ pre >
384
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-4 -1.svg " width ="960 " class ="wide-figure " /> </ p >
383
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-5 -1.svg " width ="960 " class ="wide-figure " /> </ p >
385
384
< p > The examples above are an informal way of looking
386
385
at the < em > recall</ em > of the % CLI-in-community signal.
387
386
Of course, this is only one half of the story:
@@ -451,7 +450,7 @@ <h3>Correlations Sliced by Time</h3>
451
450
subtitle = sprintf("Over all counties with at least %i cumulative cases",
452
451
case_num), x = "Date", y = "Correlation") +
453
452
theme_bw() + theme(legend.pos = "bottom", legend.title = element_blank())</ code > </ pre >
454
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-5 -1.svg " width ="576 " /> </ p >
453
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-6 -1.svg " width ="576 " /> </ p >
455
454
< p > Another interesting observation is that the correlations from either indicator
456
455
increase dramatically sometime around mid-June.
457
456
This could be because many counties saw big surges in COVID-19 activity around
@@ -473,7 +472,7 @@ <h3>Correlations Sliced by Time</h3>
473
472
subtitle = sprintf("Over all counties with at least %i cumulative cases",
474
473
case_num), x = "Date", y = "Median abs deviation") +
475
474
theme_bw()</ code > </ pre >
476
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-6 -1.svg " width ="576 " /> </ p >
475
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-7 -1.svg " width ="576 " /> </ p >
477
476
</ div >
478
477
< div id ="correlations-sliced-by-county " class ="section level3 ">
479
478
< h3 > Correlations Sliced by County</ h3 >
@@ -501,7 +500,7 @@ <h3>Correlations Sliced by County</h3>
501
500
subtitle = sprintf("Over all counties with at least %i cumulative cases",
502
501
case_num), x = "Correlation", y = "Density") +
503
502
theme_bw() + theme(legend.pos = "bottom", legend.title = element_blank())</ code > </ pre >
504
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-7 -1.svg " width ="576 " /> </ p >
503
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-8 -1.svg " width ="576 " /> </ p >
505
504
< p > We can also examine choropleth maps of these correlations to learn
506
505
where (geographically speaking) they’re high and where they’re not.
507
506
As we can see from the maps below, the % CLI-in-community indicator
@@ -525,7 +524,7 @@ <h3>Correlations Sliced by County</h3>
525
524
p2 = plot(df_cor2, title = "Correlation between % CLI-in-community and case rates",
526
525
range = c(-1, 1), choro_col = cm.colors(10))
527
526
grid.arrange(p1, p2, nrow = 1)</ code > </ pre >
528
- < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-8 -1.svg " width ="960 " class ="wide-figure " /> </ p >
527
+ < p > < img src ="/blog/2020-08-26-fb-survey_files/figure-html/unnamed-chunk-9 -1.svg " width ="960 " class ="wide-figure " /> </ p >
529
528
</ div >
530
529
</ div >
531
530
< div id ="whats-next-with-the-surveys " class ="section level2 ">
0 commit comments