imf_ifs: Fetch a legacy IFS series from its new home

View source: R/ifs.R

imf_ifsR Documentation

Fetch a legacy IFS series from its new home

Description

International Financial Statistics (IFS) was retired when the IMF moved to the 'SDMX' 3.0 portal. Its content was split across several thematic data flows (consumer prices, exchange rates, monetary statistics and others) with no official code crosswalk, which broke every workflow built on the old IFS series codes. imf_ifs() accepts a legacy IFS indicator code and routes the request to the correct new data flow and key.

Use imf_ifs_map() to see which legacy series are supported and where each one now lives. Country coverage in the new data flows varies, especially for interest rates; if a country returns nothing, try another.

Usage

imf_ifs(indicator, country = NULL, freq = NULL, start = NULL, end = NULL)

Arguments

indicator

A legacy IFS indicator code, for example "PCPI_IX" (consumer price index) or "ENDA_XDC_USD_RATE" (exchange rate per USD).

country

Character vector of ISO 3-letter country codes, for example c("GBR", "USA"). Required: the underlying data flows do not serve wildcard country queries without an API key.

freq

Frequency code ("A", "Q" or "M"). Defaults to the series' usual frequency.

start, end

Optional first and last year to keep.

Value

An object of class imf_tbl (a data frame). The originating IFS code is retained in the imf_ifs_code attribute.

See Also

imf_ifs_map(), imf_data()

Examples


# UK consumer price index, the series formerly known as IFS PCPI_IX
imf_ifs("PCPI_IX", country = "GBR", start = 2015)


readimf documentation built on June 15, 2026, 5:07 p.m.