download_acaps_npi_data: Download ACAPS non-pharmaceutical interventions data

View source: R/download_acaps_npi_data.R

download_acaps_npi_dataR Documentation

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). Since ACAPS is no longer updating this data since December 12, 2020 historic data is downloaded and calling the function with cache = FALSE yields a warning.

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

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)


joachim-gassen/tidycovid19 documentation built on March 21, 2024, 6:57 a.m.