Learn R Programming

tidycovid19 (version 0.0.0.9000)

download_acaps_npi_data: Download ACAPS non-pharmaceutical interventions data

Description

Downloads non-pharmaceutical interventions (NPI) data related to Covid-19 from the ACAPS governmental measures database (https://www.acaps.org/covid19-government-measures-dataset).

Usage

download_acaps_npi_data(silent = FALSE, cached = FALSE)

Arguments

silent

Whether you want the function to send some status messages to the console. Might be informative as downloading will take some time and thus defaults to TRUE.

cached

Whether you want to download the cached version of the data from the tidycovid19 Github repository instead of retrieving the data from the authorative source. Downloading the cached version is faster and the cache is updated daily. Defaults to FALSE.

Value

A data frame containing the data, organized by intervention. It includes a timestamp variable indicating the time of data retrieval.

Examples

Run this code
# NOT RUN {
df <- download_acaps_npi_data(silent = TRUE, cached = TRUE)
df %>%
  dplyr::group_by(country) %>%
  dplyr::summarise(number_of_interventions = dplyr::n()) %>%
  dplyr::arrange(-number_of_interventions)

# }

Run the code above in your browser using DataLab