FetchPopWpp2019: Fetch population data from WPP2019

View source: R/wpp_fetch.R

FetchPopWpp2019R Documentation

Fetch population data from WPP2019

Description

Fetch population data from WPP2019

Usage

FetchPopWpp2019(
  locations = NULL,
  year,
  ages = 0:100,
  age_interval = 1,
  sex = "total"
)

Arguments

locations

location codes or names from WPP 2019 data

year

period of reference of population data (numeric)

ages

selected ages to retrieve pop data (default - 0:100, all)

age_interval

how to display ages in result - single ages (1 - default) or 5-year age group (5)

sex

sex to retrieve information from (default - 'total', 'male', 'female')

Value

a data.frame with 3 elements: 'LocID': location code 'ages': age group starting age of population count 'pop': population count (in thousands)

Examples

# Argentina 10:69 females 2010
FetchPopWpp2019( 32, 2010, 10:69, 1, 'female')

# Ecuador 15:59 males 2004 in five year age groups
 FetchPopWpp2019( 'Ecuador', 2004, 15:59, 5, 'male')

 # Mexico and Panama 10:15 males 2001 in single year age groups
 FetchPopWpp2019( c( 'Mexico', 'Panama'), 2001, 10:15, 1, 'male')




josehcms/fertestr documentation built on Oct. 9, 2024, 9:03 p.m.