load.WB.data: Download Data from the World Bank data catalog using an API

View source: R/src_WorldBank.R

load.WB.dataR Documentation

Download Data from the World Bank data catalog using an API

Description

This function downloads the requested information using the World Bank API

Usage

load.WB.data(pIndicators, pCountry = "all", pStart = 2010, pEnd = 2015)

Arguments

country

Character vector of country or region codes. Default value is special code of all. Other permissible values are codes in the following fields from the ai_cachelist countries_idb data frame. iso2c

indicator

Character vector of indicator codes. These codes correspond to the src_id_ind column from the indicator data frame of ai_cache or ai_cachelist, or the result of ai_search

startdate

Numeric. Year (four digit) of the start of the requested date range.

enddate

Numeric. Year (four digit) of the end of the requested date range.

cache

List of data frames returned from ai_cache. If omitted, ai)_cachelist is used

lang

Language in which to return the results. If lang is unspecified, english is the default.

Value

Data frame with all available requested data.

Note

Not all data returns have support for langauges other than english. If the specific return does not support your requested language by default it will return NA. The options for lang are:

  • en: English

  • es: Spanish

  • fr: French

  • ar: Arabic

  • zh: Mandarin

If there is no data available that matches the request parameters, an empty data frame is returned along with a warning.

@examples load.WB.data(pIndicators=c("SL.UEM.TOTL.NE.ZS"))

load.WB.data(pIndicators=c("SL.UEM.TOTL.NE.ZS"),pStart=2013,pEnd=2015, pCountry='all')


EL-BID/Agregador-de-indicadores documentation built on Sept. 15, 2024, 7:43 p.m.