Learn R Programming

readoecd (version 0.3.0)

get_oecd_cpi: Get OECD CPI inflation data

Description

Downloads (and caches) annual consumer price inflation for OECD member countries from the OECD Prices database (COICOP 1999 classification).

Usage

get_oecd_cpi(countries = "all", start_year = 1990, refresh = FALSE)

Value

A data frame with columns:

country

ISO 3166-1 alpha-3 country code (character)

country_name

English country name (character)

year

Calendar year (integer)

series

"CPI_INFLATION" (character)

value

Annual CPI inflation rate (numeric)

unit

"% change, year-on-year" (character)

Arguments

countries

Character vector of ISO 3166-1 alpha-3 country codes, or "all" for all available OECD members. Defaults to "all". Run list_oecd_countries() to see available codes.

start_year

Numeric. Earliest year to include. Defaults to 1990.

refresh

Logical. If TRUE, re-download even if a cached copy exists. Defaults to FALSE.

Details

Returns the year-on-year percentage change in the Consumer Price Index (CPI) for total expenditure, not seasonally adjusted. This is the standard harmonised measure of headline inflation used for cross-country comparisons.

Examples

Run this code
# \donttest{
cpi <- get_oecd_cpi(c("AUS", "GBR", "USA"), start_year = 2000)
head(cpi)
# }

Run the code above in your browser using DataLab