ardeco_get_dataset_data {ARDECO}R Documentation

ardeco_get_dataset_data

Description

The function recover the data via API of the dataset specified in input applying the optional filters and return the list of data in data frame format.

Usage

ardeco_get_dataset_data(variable, unit, sector, version, nutscode, year, level)

Arguments

variable

mandatory: the code of variable

unit

optional: unit of measure. If not defined, return all units data

sector

optional: reference sector. If not defined, return all sectors data

version

optional: filter data for inserted nuts version. It can be composed as a set of values (see details). If not defined, return data for all available nuts versions

nutscode

optional: filter data for inserted nutscode, as defined by Eurostat. It can be a regular expression refining the searching criteria (see details). If not defined, return data for all available nutscode

year

optional: filter data for inserted year. It can be composed as a set of values (see details). If not defined, return data for all available year

level

optional: filter data for inserted levels. It can be composed as a set of values (see details). If not defined, return data for all available levels

Details

Optional parameters can be inserted using a special notation increasing the filtering options.

FILTERING OPTION FOR PARAMETER nutscode

It can be a simple string. In this case the function return all nuts codes including the inserted string.

For example: nutscode=‘EE’ return the values having into the nuts code the string ‘EE’, i.e. all the nuts codes starting with ‘EE’ but also the nutscodes like ‘DEE...’

It's possible to require the values with the nuts codes starting with a specific string, inserting the character ‘^’ at the beginning of the filter.

For example: nutscode=‘^EE’ return the values with nuts code starting with ‘EE’

In addition it's possible to require values with nuts codes satisfing multiple conditions, using the character ‘|’ to sepatare the different conditions.

For example: nutscode=‘^EE|^IT’ return only the nuts codes related starting with ‘EE’ or ‘IT’, i.e. return all values for Estonia and Italy.

FILTERING OPTION FOR PARAMETERS version year level

The parameters version, year and level are numeric parameters.

A numeric parameter can have a simple value. In this case the function return the values in which the specific parameter is EQUAL to the inserted value.

For example: level=0 return the values at NUTS0 level.

To filter data for one value to another, it can be defined using this notation: c(min:max) where min and max are the minimun and maximus values.

For example: year=c(2000:2005) return the values for the years starting from 2000 to 2005.

It's also possible to combine the two notations in this way: year=c(2005, 2008:2010) return the values for the year 2005 and for the year from 2008 and 2010.

Value

This function return a data frame including the data related to the selected dataset. The data frame include the following fileds:

Examples

ardeco_get_dataset_data('SNPTN', version=2021, level=0, nutscode='IT', year=2020)
ardeco_get_dataset_data('SNETD', version=2021, level=c(0:1,9), nutscode='^IT|^EU')

[Package ARDECO version 1.0.0 Index]