View source: R/extract_DemoData_tier1.R
DDextract_ccmppWPPinputs_tier1 | R Documentation |
This function extracts from the DemoData SQL database population counts by age and sex, annual births by sex to compute sex ratio at birth, 1x1 age specific fertility rates from the Human Fertility Database and EuroStat and mortality rates from the Human Mortality Database and EuroStat. It compiles those data into the input file required by ccmppWPP. It also compiles a refernce dataset of population counts by age and sex for various reference periods
DDextract_ccmppWPPinputs_tier1( LocID, times = 1950:2020, times_censored_common = FALSE, data_source_pop = c("HMD", "EuroStat"), data_source_mort = c("HMD", "EuroStat"), data_source_fert = c("HFD", "EuroStat", "HFC-STAT"), data_source_year_hmd = 2020, data_source_year_hfd = 2020, data_source_year_eurostat = 2020, data_source_year_hfc = c(2012, 2014, 2015), revision = "test", variant = "estimates" )
LocID |
numeric. Location id of country. |
times |
numeric. Vector of years for which data should be extracted |
times_censored_common |
logical. If true, the time period covered by each series is censored such that ouput times are only those for which population counts, asfr and mortality rates are all available. If false, then all available data are output, but additional processing may be required (e.g., interpolation) to harmonize the times across indicators before ccmppWPP workflow can be executed successfully. |
data_source_pop |
character. Vector of data sources for population counts (HMD and/or EuroStat) |
data_source_mort |
character. Vector of data sources for age-specific mortality rates (HMD and/or EuroStat) |
data_source_fert |
character. Vector of data sources for age-specific fertility rates (HFD and/or EuroStat) |
data_source_year_hmd |
numeric. DataSourceYear for the HMD series to use. |
data_source_year_hfd |
numeric. DataSourceYear for the HFD series to use. |
data_source_year_eurostat |
numeric. DataSourceYear for the EuroStat series to use. |
data_source_year_hfc |
numeric. DataSourceYear for the HFC series to use. |
revision |
character. Revision attribute for output ccmppWPP_inputs list. |
variant |
character. Variant attribute for output ccmppWPP_inputs list. |
currently extracts from Valencia server. Data source name vectors should be in order of preference. For example data_source_mort = c("HMD", "EuroStat") will prioritize HMD, but fill in any missing years with EuroStat
a list of two objects. 1) the ccmppWPP_inputs list required to run the population projection; and 2) a pop_counts_age_sex_reference data frame for reconciliation
Sara Hertog
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.