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: 186 × 2 #> country number_of_interventions #> <chr> <int> #> 1 Canada 998 #> 2 Italy 835 #> 3 Australia 793 #> 4 Mongolia 736 #> 5 Germany 723 #> 6 Japan 714 #> 7 Peru 680 #> 8 Netherlands 679 #> 9 Chile 675 #> 10 Singapore 675 #> # … with 176 more rows