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, ...)
Arguments
variable |
mandatory: the code of variable |
... |
Other optional parameters to filter according to the different dimensions. This can be: version, level, nutscode, year, unit, tercet and the additional dimensions depending by the selected varable |
Details
Each parameter have to be passed using notation <param-name>=‘<param-value>’.
For some Optional parameters it can be used a special notation increasing the filtering options.
FILTERING OPTION FOR PARAMETER nutscode
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 year and level
The parameters 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.
It's possible to require values satisfing multiple conditions, using the character ‘,’ to require values for different year or level.
For example: level=‘0,2’ return the values for level 0 and level 2. Remember to use quote to define the list of values.
It's also possible to filter data defining an interval of years/levels. It can be defined using this notation: ‘min-max’ where min and max are the minimun and maximus values. Remember to use quote to define the values interval.
For example: year=‘2000-2005’ return the values for the years starting from 2000 to 2005.
FILTERING OPTION FOR PARAMETERS tercet
The parameters tercet is a numeric parameter corresponding to a tercet class returned by ardeco_get_tercet_list() function.
Using this parameter, the returned values are related to the aggregated data at country level (nuts level 0) for the selected tercet class.
The parameters tercet and level cannot be use together
For example: tercet=0 return the values at country level relatet to the tecet class "Predominantly urban"
Value
This function return a data frame including the data related to the selected dataset. The data frame include the following fileds:
VARIABLE: code of the variable
VERSION: nuts version of NUTS code.
LEVEL: level of NUTS code. From 0 to 3 represent NUTS0-3 level; 4 refers to Metropolitan regions, 9 refers data at EU level.
NUTSCODE: code of the territorial unit of reference. It\'s one of the NUTS code (see EUROSTAT)
YEAR: year of reference of the value.
DIM(s): one or mode columns depending by the dimensions defined for the selected dataset
UNIT: unit of measure of the value.
VALUE: value of the selected variable related to the date, sector, territory_id, unit, variable
Examples
ardeco_get_dataset_data('SNPTN', version=2021, level=0, nutscode='IT', year=2020, sex='Males')
ardeco_get_dataset_data('SUVGD', version=2021, level='0,2', nutscode='EE', year='2018-2020')