Skip to contents

Retrieve WPP data

Usage

get_wpp(version_date, source = "surviving_infants")

Arguments

version_date

A string in the format of "yyyy", corresponding to the WPP version you wish to load.

source

A string used to determine which WPP file to load. Options are: "surviving_infants", "demographics", and "total_pop".

Value

a WPP data frame or list (if using the demographics file)

Examples

get_wpp("2022")
#> Reading in Surviving Infants from WPP 2022
#> Warning: cannot open compressed file 'C:/Users//Gavi/Measurement, Evaluation and Learning - Documents/CPMM/Datasets/Demographics/UNPD/wpp2022/outputs/surviving_infants_wpp2022.rds', probable reason 'No such file or directory'
#> Error in gzfile(file, "rb"): cannot open the connection
get_wpp("2022", "demographics")
#> Reading in Demographics from WPP 2022
#> Warning: cannot open compressed file 'C:/Users//Gavi/Measurement, Evaluation and Learning - Documents/CPMM/Datasets/Demographics/UNPD/wpp2022/outputs/demographics_wpp2022.rds', probable reason 'No such file or directory'
#> Error in gzfile(file, "rb"): cannot open the connection