knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Let's load the data, and filter down to the United States of America.
library(covid19mobility) library(dplyr) us_mobile <- refresh_covid19mobility_apple_country() %>% filter(location_code == "US")
Now, let's plot it!
library(ggplot2) ggplot(us_mobile, aes(x = date, y = value, color = data_type)) + geom_line(size = 1) + theme_bw(base_size=14) + labs(color = "Mobility Type", y = "Relative Value", x = "") + ggtitle("Apple Mobility Trends")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.