Downloads non-pharmaceutical interventions (NPI) data related to Covid-19 from the Oxford Covid-19 Government Response Tracker. (https://www.bsg.ox.ac.uk/research/research-projects/oxford-covid-19-government-response-tracker). It currently only uses the policy measures from that data and tidies them into long format, defining observations to be interventions and discarding observations with NA and unchanged 0 measures.

download_oxford_npi_data(type = "measures", silent = FALSE, cached = FALSE)

Arguments

type

The type of data that you want to retrieve. Can be any subset of

  • "measures": Government response measures, recoded to event-day structure

  • "index": The Strigency Indices as repored by the OxCGRT team

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

If only one type was selected, a data frame containing the data. Otherwise, a list containing the desired data frames ordered as in type.

Details

The Oxford data is currently not included in the data frame produced by download_merged_data() as the ACAPS NPI data seem to be of better quality overall. See this blog post and this Github issue for a discussion.

Examples

df <- download_oxford_npi_data(type = "measures", silent = TRUE, cached = TRUE) df %>% dplyr::group_by(country) %>% dplyr::summarise(number_of_interventions = dplyr::n()) %>% dplyr::arrange(-number_of_interventions)
#> # A tibble: 185 × 2 #> country number_of_interventions #> <chr> <int> #> 1 Canada 1098 #> 2 Australia 842 #> 3 Italy 842 #> 4 Japan 775 #> 5 Mongolia 750 #> 6 Singapore 746 #> 7 Philippines 745 #> 8 Netherlands 717 #> 9 Kazakhstan 716 #> 10 Russia 715 #> # ℹ 175 more rows