11---
2- title: "Home for the holidays ? The impact of US holidays on social behaviors and preventative measures "
2+ title: "Home for the Holidays ? The Impact of US Holidays on Social Behaviors and Preventative Measures "
33author: "Leanna Morinishi, Kris Barkume, Esther Kim, and Alex Reinhart"
44date: 2021-01-22
55tags:
2929 toc: true
3030---
3131
32- < script src ="/rmarkdown-libs/header-attrs/header-attrs.js "> </ script >
32+ < link href ="/rmarkdown-libs/anchor-sections/anchor-sections.css " rel ="stylesheet " />
33+ < script src ="/rmarkdown-libs/anchor-sections/anchor-sections.js "> </ script >
3334
3435< div id ="TOC ">
3536< ul >
@@ -111,8 +112,8 @@ <h2>Travel and Other Social Behaviors During US Holidays</h2>
111112
112113regionmap <- travel %>%
113114 filter(geo_value %in% str_to_lower(statelist)) %>%
114- mutate(value= plyr::mapvalues(geo_value, str_to_lower(statelist), regions),
115- value= as.integer(factor(value)))
115+ mutate(value = plyr::mapvalues(geo_value, str_to_lower(statelist), regions),
116+ value = as.integer(factor(value)))
116117
117118grid_label <- textGrob("Data from Delphi COVIDcast, delphi.cmu.edu",
118119 hjust = 1, x = 1, gp = gpar(fontsize = 9))
@@ -125,25 +126,28 @@ <h2>Travel and Other Social Behaviors During US Holidays</h2>
125126 linetype = "dashed", size = 1.5, color = "darkgrey") +
126127 geom_line(aes(x = date, y = mean, color = Region)) +
127128 geom_ribbon(aes(x = date, ymin = mean - se, ymax = mean + se, fill = Region),
128- alpha= 0.2) +
129+ alpha = 0.2) +
129130 scale_x_date(date_breaks = "2 weeks",
130131 date_labels = "%b %d %Y",
131132 date_minor_breaks = "1 week") +
132133 labs(x = "Date", y = "% Out-of-state travel in last 5 days",
133134 title = "Relative out-of-state travel by US region",
134135 subtitle = "From Delphi's surveys, conducted through Facebook") +
135136 theme_bw() +
136- theme(legend.position = c(.075, .9 )) +
137+ theme(legend.position = c(0.095, 0.8 )) +
137138 guides(color = FALSE)
138139
139140g2 <- plot(regionmap,
140- title = "US Regions", range = c(1, 4),
141- choro_col = c("#F8766D", "#7CAE00", "#00BFC4", "#C77CFF"))
141+ title = "US Regions",
142+ choro_col = c("#F8766D", "#7CAE00", "#00BFC4", "#C77CFF"),
143+ choro_params = list(breaks = c(1, 2, 3, 4),
144+ legend_position = "none")) +
145+ theme(legend.position = "none")
142146
143147lay <- rbind(c(1,1,1,2),
144148 c(1,1,1,2))
145149grid.arrange(g1, g2, nrow = 1, bottom = grid_label, layout_matrix=lay)</ code > </ pre >
146- < p > < img src ="/blog/2021-01-22-holiday-surveys_files/figure-html/traveled-recently-1.svg " width ="960 " class ="wide-figure " /> </ p >
150+ < p > < img src ="/blog/2021-01-22-holiday-surveys_files/figure-html/traveled-recently-1.svg " width ="864 " class ="wide-figure " /> </ p >
147151< p > In the COVID-19 survey, we see an increase in self-reported out-of-state travel
148152in this time frame by surveyed adults. The figure above depicts the normalized
149153percent of survey respondents who recently traveled out-of-state for 4 US
0 commit comments