hicp.data: Download HICP data

hicp.dataR Documentation

Download HICP data

Description

These functions are simple wrappers of functions in the restatapi package.

The function datasets() lists all available HICP data sets in Eurostat's public database, while datafilters() gives the allowed values that can be used for filtering a data set. The function data() downloads a specific data set with filtering on key parameters and time, if supplied.

Usage

datasets(pattern="^prc_hicp", ...)

datafilters(id, ...)

data(id, filters=list(), date.range=NULL, flags=FALSE, ...)

Arguments

pattern

character for pattern matching on data set identifier. See also grepl.

id

data set identifier, which can be obtained from datasets().

filters

named list of filters to be applied to the data request. Allowed values for filtering can be retrieved from datafilters(). For HICP data, typical filter variables are the index reference period (unit: I96, I05, I15), the country (geo: EA, DE, FR,...), or the COICOP code (coicop: CP00, CP01, SERV, ...).

date.range

vector of start and end date used for filtering on time dimension. These must follow the pattern YYYY(-MM)?. An open interval can be defined by setting one date to NA.

flags

logical indicating if data flags should be returned or not.

...

further arguments passed to functions:

  • get_eurostat_toc for datasets()

  • get_eurostat_dsd for datafilters()

  • get_eurostat_data for data()

Value

A data.table.

Author(s)

Sebastian Weinand

Source

See Eurostat's public database at https://ec.europa.eu/eurostat/web/main/data/database.

Examples

# set cores for testing on CRAN:
library(restatapi)
options(restatapi_cores=1)

# view available HICP data sets:
datasets()

# get allowed filters for item weights:
datafilters(id="prc_hicp_inw")

# download item weights since 2015 for euro area:
data(id="prc_hicp_inw", filters=list("geo"="EA"), date.range=c("2015", NA))

hicp documentation built on Aug. 8, 2025, 6:30 p.m.