Title: | Pulls and Returns Tidy COVID-19 Data |
---|---|
Description: | What the package does (one paragraph). |
Authors: | Tim Essam [aut, cre], Aaron Chafetz [aut], Baboyma Kagniniwa [aut] |
Maintainer: | Tim Essam <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2024-12-03 04:58:38 UTC |
Source: | https://github.com/USAID-OHA-SI/COVIDutilities |
Import Our World in Data Vaccine rates
get_vax_countries(pepfar_only = TRUE)
get_vax_countries(pepfar_only = TRUE)
pepfar_only |
pepfar_only limit to just PEPFAR countries, default = TRUE |
Returns an object of the countries being tracked by Our World in Data
https://github.com/owid/covid-19-data
Other vax:
pull_vax_data()
## Not run: #all countries cntry_list <- get_vax_countries(pepfar_only = FALSE) df_vax <- get_vax_data(cntry_list) #pepfar only countries cntry_list <- get_vax_countries() df_vax_pepfar <- get_vax_data(cntry_list) ## End(Not run)
## Not run: #all countries cntry_list <- get_vax_countries(pepfar_only = FALSE) df_vax <- get_vax_data(cntry_list) #pepfar only countries cntry_list <- get_vax_countries() df_vax_pepfar <- get_vax_data(cntry_list) ## End(Not run)
Retrieves COVID-19 vaccination data for a given list of countries
get_vax_data(cntry)
get_vax_data(cntry)
cntry |
country, or list of countries, that appear in the our world in data page |
Import OWID vaccine data
Returns data frame of total vaccinations by day
A dataframe containing the PEPFAR country name and its associated ISO Code 3
pepfar_iso_map
pepfar_iso_map
A data frame with 71 rows and 2 variables:
PEPFAR country name
3 letter ISO code
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.
pull_covid_gov_measures(natl_lvl_only = TRUE, pepfar_only = TRUE)
pull_covid_gov_measures(natl_lvl_only = TRUE, pepfar_only = TRUE)
natl_lvl_only |
limit data to national level, default = TRUE |
pepfar_only |
limit to just PEPFAR countries, default = TRUE |
dataframe of countries and their types of government interventions by day
https://data.humdata.org/dataset/acaps-covid19-government-measures-dataset
## 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)
## 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)
%>% Returns a tidy data frame of JHU COVID-19 data. Returns a tidy data frame with columns for COVID-19 confirmed cases, recoveries and deaths.
pull_jhu_covid(pepfar_only = TRUE)
pull_jhu_covid(pepfar_only = TRUE)
pepfar_only |
limit to just PEPFAR countries, default = TRUE |
https://github.com/CSSEGISandData/COVID-19/
## Not run: covid_data <- pull_jhu_covid() ## End(Not run)
## Not run: covid_data <- pull_jhu_covid() ## End(Not run)
API pull of Oxford COVID-19 Government Response Tracker. The stringency index is a composite index across 7 indicators on how governments respond to the COVID epidemic, with scores between 0-100
pull_stringency_index( date_start = "2020-01-22", date_end = NULL, pepfar_only = TRUE )
pull_stringency_index( date_start = "2020-01-22", date_end = NULL, pepfar_only = TRUE )
date_start |
start date for stringency index as yyyy-mm-dd, default/min is Jan 22, 2020 |
date_end |
end date for stringency index as yyyy-mm-dd, default is NULL which will run through today |
pepfar_only |
limit to just PEPFAR countries, default = TRUE |
More info at https://covidtracker.bsg.ox.ac.uk/about-api
dataframe of all PEPFAR countries and their stringency index value by day
https://covidtracker.bsg.ox.ac.uk/about-api
## Not run: df_stringency <- pull_stringency_index(date_end = "2021-04-01") ## End(Not run)
## Not run: df_stringency <- pull_stringency_index(date_end = "2021-04-01") ## End(Not run)
Retrieves COVID-19 vaccination data for a given list of countries
pull_vax_data(cntry)
pull_vax_data(cntry)
cntry |
country, or list of countries, that appear in the our world in data page |
Import OWID vaccine data
Returns data frame of total vaccinations by day
https://github.com/owid/covid-19-data
Other vax:
get_vax_countries()
## Not run: #only one country df_vax_zmb <- get_vax_data("Zambia") #only PEPFAR countries cntry_list <- get_vax_countries() df_vax_pepfar <- get_vax_data(cntry_list) #all countries cntry_list <- get_vax_countries(pepfar_only = FALSE) df_vax <- get_vax_data(cntry_list) ## End(Not run)
## Not run: #only one country df_vax_zmb <- get_vax_data("Zambia") #only PEPFAR countries cntry_list <- get_vax_countries() df_vax_pepfar <- get_vax_data(cntry_list) #all countries cntry_list <- get_vax_countries(pepfar_only = FALSE) df_vax <- get_vax_data(cntry_list) ## End(Not run)
Returns a dataframe of when WHO declared COVID-19 a pandemic
who_pandemic()
who_pandemic()