fq_imf: Download IMF data using Quandl API

Description Usage Arguments Details Value Examples

View source: R/fq_imf.R

Description

A wrapper around Quandl. Downloads macroeconomic data for several indicators and countries covered by the IMF.

Usage

1
fq_imf(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 interested 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_imf() 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.

Value

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

Examples

1
2
3
4
5
6
7
8
# Download the US Output Gap
if (FALSE) {
  fq_imf('United States', 'NGAP_NPGDP')

# The example above is identical to
# fq_imf('USA', 'NGAP_NPGDP')

}

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