hicp.data | R Documentation |
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.
datasets(pattern="^prc_hicp", ...)
datafilters(id, ...)
data(id, filters=list(), date.range=NULL, flags=FALSE, ...)
pattern |
character for pattern matching on data set identifier. See also |
id |
data set identifier, which can be obtained from |
filters |
named list of filters to be applied to the data request. Allowed values for filtering can be retrieved from |
date.range |
vector of start and end date used for filtering on time dimension. These must follow the pattern |
flags |
logical indicating if data flags should be returned or not. |
... |
further arguments passed to functions:
|
A data.table.
Sebastian Weinand
See Eurostat's public database at https://ec.europa.eu/eurostat/web/main/data/database.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.