hicp.data {hicp}R Documentation

Download HICP data

Description

These functions are simple wrappers of functions in the restatapi package. Function hicp.datasets() lists all available HICP datasets in Eurostat's public database, while hicp.datafilters() gives the allowed values that can be used for filtering a dataset. hicp.dataimport() downloads a specific dataset with filtering on key parameters and time, if supplied.

Usage

hicp.datasets()

hicp.datafilters(id)

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

Arguments

id

A dataset identifier, which can be obtained from hicp.datasets().

filters

A named list of filters to be applied to the data request. Allowed values for filtering can be retrieved from hicp.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

A 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

A logical indicating if data flags should be returned or not.

Value

A data.table.

Author(s)

Sebastian Weinand

Source

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

See Also

get_eurostat_toc, get_eurostat_dsd, get_eurostat_data

Examples

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

# view available datasets:
hicp.datasets()

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

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

[Package hicp version 0.6.1 Index]