ggplot(mobilityData) +
geom_line(aes(x = Date, y = zoo::rollmean(PercentHome, 7, fill = NA),
color = "2020"), size = 1) +
# shift date by 1 year so we can plot 2019 and 2020 on the same 1 year span
geom_line(aes(x = Date + 365, y = zoo::rollmean(PercentHome, 7, fill = NA),
color = "2019"), size = 1) +
scale_x_date(breaks = "3 months", date_labels = "%b %Y",
limits = c(as.Date("2020-01-01"), as.Date("2020-12-31")) ) +
# scale_y_continuous(limits = c(0,40)) + # try this if you want to play with the y axis too!
scale_color_manual(values = c("#264653", "#2a9d8f", "#e9c46a", "#f4a261", "#e76f51")) +
labs(title="Percent of Michiganders staying home for 2019 vs. 2020", x="",
y="Percent of population staying home", color = "")