Wrapper function that retrieves the DHS data used for modelling the proportion of modern contraceptives supplied by the public and private sectors at the national and subnational administration levels.
get_data.Rd
Wrapper function that retrieves the DHS data used for modelling the proportion of modern contraceptives supplied by the public and private sectors at the national and subnational administration levels.
Usage
get_data(
national = TRUE,
local = FALSE,
mycountry = NULL,
fp2030 = TRUE,
surveydata_filepath = NULL,
trunc = FALSE
)
Arguments
- national
TRUE/FALSE. Default is TRUE for national administration level data. FALSE retrieves subnational level data.
- local
TRUE/FALSE. Default is FALSE for global runs. Decides if this is a single-country or global run.
- mycountry
The name of country of interest. Default is NULL. For the names of potential countries, review vigentte.
- fp2030
Default is TRUE. Filter raw data to only include the Family Planning 2030 focus countries discussed in the Comiskey et al. paper.
- surveydata_filepath
Path to survey data. Default is NULL. Survey data should be a .xlsx with the following format
national_FPsource_data
.- trunc
Default is FALSE. This argument indicates to function to use a small 4 country dataset for illustration purposes. See ?mcmsupply::trunc_subnat_FPsource_data or ??mcmsupply::trunc_national_FPsource_data for details.