importData {eurodata}R Documentation

Download and import a Eurostat dataset

Description

Download and import a Eurostat dataset

Usage

importData(EurostatDatasetCode, filters = NULL)

Arguments

EurostatDatasetCode

A string (upper/lower-case difference is not relevant) with Eurostat dataset code name, e.g. nama_10_gdp or bop_its6_det. See https://ec.europa.eu/eurostat/databrowser/explore/all/all_themes to find a dataset code – the dataset codes are in tiny font in square brackets.

filters

Optional: a list of atomic vectors. The names of the elements of the list should correspond to the names of the dimensions of the dataset (defined in EurostatDatasetCode), e.g. geo, nace_r2, indic_esb etc. The elements of each vector in that list should correspond to each respective dimension's values available in the dataset. Only these dimension values will be downloaded. For TIME_PERIOD it's enough to provide 1 or 2 values – the lowest one will be used as a start of the data period and the highest as the end of the data period downloaded. Use filters if you need only a few dimension values as it will be faster than downloading the full dataset.

Value

A Eurostat dataset as a ‘flat’ data.frame. A ‘flat’ dataset has all numeric values in one column, with each row representing one of the available combinations of all dimensions (e.g. if dimensions are: countries, years, sectors, and indicators, there can be a row for value added in retail in Germany in 2013).

Examples

## Not run: 
# Full dataset import:
importData('nama_10_gdp')
# Import only a subset of a dataset:
importData('bop_its6_det',
           filters = list(geo=c('AT','BG'),
                          TIME_PERIOD=2014:2020,
                          bop_item='SC'))

## End(Not run)

[Package eurodata version 1.7.0 Index]