pull_covid_gov_measures: Pull HDX COVID Government Measures data

View source: R/pull_covid_gov_measures.R

pull_covid_gov_measuresR Documentation

Pull HDX COVID Government Measures data

Description

Downloads the UNOCHA HDX COVID Government Measures dataset and loads it into R. The COVID Government Measures dataset "puts together all the measures implemented by governments worldwide in response to the Coronavirus pandemic." For more information, see https://data.humdata.org/dataset/acaps-covid19-government-measures-dataset.

Usage

pull_covid_gov_measures(natl_lvl_only = TRUE, pepfar_only = TRUE)

Arguments

natl_lvl_only

limit data to national level, default = TRUE

pepfar_only

limit to just PEPFAR countries, default = TRUE

Value

dataframe of countries and their types of government interventions by day

Source

https://data.humdata.org/dataset/acaps-covid19-government-measures-dataset

Examples

## Not run: 
df_gov_measures <- pull_covid_gov_measures()
df_restrictions <- df_gov_measures %>% 
  filter(countryname == "Nigeria",
         measure %in% c("Domestic travel restrictions",
                        "Partial lockdown", "Full lockdown",
                        "Checkpoints within the country",
                        "Curfews"),
         log_type == "Introduction / extension of measures") %>% 
  select(countryname, 
         date = date_implemented, 
         restrict_cat = category, 
         restrict_measure = measure) 
## End(Not run)
         

USAID-OHA-SI/COVIDutilities documentation built on Aug. 18, 2022, 2:28 a.m.