Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| # Install and load required packages | |
| install.packages("needs") | |
| library(needs) | |
| needs(tidyverse, magrittr, animation, pdftools, png, scales) | |
| # Function that extracts data from Google Mobility PDFs | |
| process_google_mobility <- function(country_code, start_date, end_date){ | |
| # Convert first page of PDF into high-res PNG | |
| pdf_convert(paste0("https://www.gstatic.com/covid19/mobility/",end_date,"_",country_code,"_Mobility_Report_en.pdf"), format = "png", pages = 1, dpi = 300, filenames = "IMG1.png") |