get_wb_gender_age_pop_data: Get World Bank population data by gender and age group for...

Description Usage Arguments Value Author(s) Examples

View source: R/get_wb_gender_age_pop_data.R

Description

Get World Bank population data by gender and age group for several years.

Usage

1
2
3
4
5
6
7
get_wb_gender_age_pop_data(
  country_iso = "KEN",
  indicator_code,
  start = 2016,
  end = 2019,
  new_date = 2020
)

Arguments

country_iso

The three letter ISO code for a country in capital letters as character string. Default value is "KEN" for Kenya.

indicator_code

The World Bank data indicator code in all capitals for the dataset in question - can be obtained by running wb_indicators() as character string e.g. SP.POP.1014.FE. No default value. Should be one of SP.POP.1014.FE, SP.POP.1014.ME, SP.POP.1519.FE or SP.POP.15.19.ME.

start

The start year from which to collect data from the original dataset - numerical. Default is 2016.

end

The end year until which to collect data from the original dataset - numerical. Default is 2019.

new_date

The new year for which to calculate population data based on existing years in the dataset - as numerical. Default is 2020

Value

A dataframe containing population data from start to end for the indicator indicator_code with an additional row for the new year.

Author(s)

Anelda van der Walt

Examples

1
2
ken_1014_fem <- get_wb_gender_age_pop_data(country_iso = "KEN", indicator_code = "SP.POP.1014.FE",
start = 2016, end = 2019, new_date = 2020)

afrimapr/WiGISKeDataViz3 documentation built on Aug. 24, 2020, 1:45 p.m.