DDextract_get_pop_count_age_sex_reference: Get reference population counts from a DDSQL query

View source: R/extract_DemoData_tier1_post_process.R

DDextract_get_pop_count_age_sex_referenceR Documentation

Get reference population counts from a DDSQL query

Description

Extracts and (optionally) subsets reference population data from a list of the kind returned by DDextract_ccmppWPPinputs_tier1. The result is returned as a demog_change_component_df object.

Usage

DDextract_get_pop_count_age_sex_reference(
  x,
  times = c("all", "excl_baseline", "census", "census_excl_baseline")
)

Arguments

x

A list of the form returned by DDextract_ccmppWPPinputs_tier1.

times

Either a numeric vector containing years for which reference population counts should be extracted from x, or a character string specifying a pre-defined set of times; see “Details”.

...

Passed to other methods.

Value

An object of class demog_change_component_df containing the reference population counts.

Note

Census times cannot be determined by default because the object returned by DDextract_ccmppWPPinputs_tier1 does not record the location to which the data pertain. Use get_census_years to separately look up census years.

Author(s)

Mark Wheldon

Examples


data("france_wpp_1950_2020_population_data")
data("census_years")

all_years <-
  DDextract_get_pop_count_age_sex_reference(france_wpp_1950_2020_population_data)

census_years_only <-
  DDextract_get_pop_count_age_sex_reference(france_wpp_1950_2020_population_data,
                                   times = "census")

selected_years <-
  DDextract_get_pop_count_age_sex_reference(france_wpp_1950_2020_population_data,
                                   times = 1950:1955)


markalava/ccmppWPP documentation built on April 21, 2022, 12:36 a.m.