Package 'populaR'

Title: World Population Data from the UN
Description: Pulls data from the UN's World Population API, pre-bakes some commonly used datasets
Authors: Chitra Saraswati [aut, cre], Janith Wanniarachchi [aut], James Goldie [aut], Michael Lydeamore [aut]
Maintainer: Chitra Saraswati <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.1003
Built: 2024-11-01 07:16:27 UTC
Source: https://github.com/chitrams/populaR

Help Index


Get parameter inputs for population data API

Description

Gets information about indicators (i.e. dataset) and locations for further querying from the WPP API

Usage

get_base_levels(target, .progress = TRUE)

Arguments

target

String, one of "Indicators" or "locations"

.progress

Boolean, whether to show progress bars for query progress. Default TRUE

Value

tibble containing a wide range of information about the requested endpoint

Examples

get_base_levels("Indicators")
get_base_levels("locations")

IDs of indicators

Description

Get numeric IDs of indicators and locations for the WPP API

Usage

get_id(name, type, search = TRUE, .progress = TRUE)

Arguments

name

Name of the variable to search for

type

One of "locations" or "Indicators", which dataset to search

search

Whether to perform simple search/matching. Defaults to TRUE

.progress

Boolean, whether to show progress bars for query progress. Default TRUE

Value

tibble containing only the matching records. Column id is the numeric id which will be needed downstream

Examples

get_id("Australia", type = "locations")