get_interventions_data.Rd
Data available here: https://data.humdata.org/dataset/acaps-covid19-government-measures-dataset#
get_interventions_data()
a dataframe of government interventions compiled by ACAPS
## Code get_interventions_data#> function () #> { #> ch <- memoise::cache_filesystem(".cache") #> mem_download <- memoise::memoise(download.file, cache = ch) #> base_url <- "https://data.humdata.org" #> dl_url <- xml2::read_html(paste0(base_url, "/dataset/acaps-covid19-government-measures-dataset#")) %>% #> rvest::html_node(css = ".ga-download") %>% rvest::html_attr("href") %>% #> xml2::url_absolute(base_url) #> temp <- tempdir() #> filename <- "interventions.xlsx" #> mem_download(dl_url, destfile = file.path(temp, filename), #> quiet = TRUE) #> readxl::read_excel(file.path(temp, filename), sheet = "Database") %>% #> janitor::clean_names() %>% dplyr::mutate_if(lubridate::is.POSIXct, #> lubridate::as_date) #> } #> <bytecode: 0x7fe28146fd38> #> <environment: namespace:NCoVUtils>