montagu_demographic_data: Download demographic data for a given touchstone.

Description Usage Arguments Value

View source: R/demographics.R

Description

Montagu provides standardised demographic data for the groups to use in their models. The source of the data is UNWPP, although various procedures are applied for convenience, including work on some smaller countries, people above the age of 80 in certain time periods, and extrapolating both cohorts backwards in time to their origins before 1950. Internal documents in the reporting portal describe the methods and motivations for these extensions.

Usage

1
2
montagu_demographic_data(type_code, touchstone_id, gender_code = NULL,
  wide = FALSE, source_code = NULL, location = NULL)

Arguments

type_code

The demographic type code (something like cbr for Fertility: Crude birth rate (CBR). Get the possible values from montagu_demographics_list

touchstone_id

Touchstone identifier

gender_code

One of "male", "female" or "both" (if omitted montagu will return "both"). Not applicable to all statistics.

wide

Logical, if TRUE returns data in wide format rather than long.

source_code

Optional source code, may be useful if one type_code can come from two sources within a touchstone.

location

The location of the montagu api server.

Value

A data frame, giving the code and description for each demographic statistic, whether the data are stratified by gender, and a code indicating the source of the demographic data, which will change if there are future updates to any of the demographic data fields.


vimc/montagu-r documentation built on Oct. 10, 2019, 9:10 p.m.