fq_wb: Download World Bank Data Using Quandl API

Description Usage Arguments Details Value Examples

View source: R/fq_wb.R

Description

A wrapper around Quandl. Downloads macroeconomic data for several indicators and countries covered by World Bank.

Usage

1
fq_wb(countries, indicators, verbose = TRUE, ...)

Arguments

countries

A vector or a list of character strings.

indicators

A vector or a list of character strings.

verbose

Should warning messages be printed? Default is TRUE.

...

Additional arguments to be passed into Quandl function.

Details

The countries argument can be passed as an ISO code or as a country name. The only requirement is that the call must be consistent (must contain only ISO codes or country names, but not both).

Sometimes the user may be interesoted in downloading data for certain regions, like Europe, Latin America, Middle East, etc. For that reason, the countries argument also accepts the following calls:

For any of those calls the fq_wb() will download data for all the countries in the requested region. A complete region list can be seen at: https://www.imf.org/external/pubs/ft/weo/2018/01/weodata/groups.htm.

The ... argument can be used to calibrate the query parameters. It accepts the following calls:

The full list can be seen at: https://docs.quandl.com/docs/r.

Quandl has a diverse of World Bank datasets. The following items give a brief description of what you could expect to find when trying to dig further into each one of them:

Value

A tidy tibble with four columns: date, country, indicator and value.

Examples

1
2
3
4
5
6
if (FALSE) {
  # Download al indicators related to Rule of Law for the G7 countries from 2010 ownwards...
  fq_wb(countries  = 'g7',
        indicators = c('RL_EST', 'RL_NO_SRC'),
        start_date = '2010-01-01')
}

Reckziegel/FromQuandl documentation built on Jan. 2, 2021, 9:20 p.m.