View source: R/fetch_indicator.R
fetch_indicator | R Documentation |
Fetch data for a specified indicator from available sources.
fetch_indicator(indicator, source)
indicator |
character: A CETS type indicator code. See details. |
source |
character: Data source. |
See ?indicatorlist
for an overview of available indicators.
tibble
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.