fetch_indicator: Fetch indicator

View source: R/fetch_indicator.R

fetch_indicatorR Documentation

Fetch indicator

Description

Fetch data for a specified indicator from available sources.

Usage

fetch_indicator(indicator, source)

Arguments

indicator

character: A CETS type indicator code. See details.

source

character: Data source.

Details

[Stable]

See ?indicatorlist for an overview of available indicators.

Value

tibble

Examples

## Not run: 
# Fetch population data from Eurostat
df <- fetch_indicator("SP.POP.TOTL", source = "eurostat")

# Fetch population data from UNPD
df <- fetch_indicator("SP.POP.TOTL", source = "unpd")

# Fetch bed nets data from UNICEF
df <- fetch_indicator("SH.MLR.NETS.ZS", source = "unicef")

# Fetch multiple indicators from the same source
df <- fetch_indicator(
  indicator = c("SH.STA.ANV4.ZS", "SN.ITK.VITA.ZS"),
  source = "unicef"
)

# Fetch multiple indicators from different sources
df <- fetch_indicator(
  indicator = c("SH.STA.ANV4.ZS", "SP.POP.TOTL"),
  source = c("unicef", "eurostat")
)

## End(Not run)

worldbank/pddcs documentation built on Nov. 20, 2024, 5:41 a.m.