View source: R/get_istatdata.R
get_istatdata | R Documentation |
Download data sets from IstatData (new ISTAT provider). Alternatively, use get_i_stat to download data sets from I.Stat (old ISTAT provider). Note that in this first version of the package, only get_i_stat allows you to download variable labels, while get_istatdata has not this functionality yet. The parameters "agencyId","dataset_id" and "version" to download the data sets can be found using list_istatdata function or search_istatdata function.
get_istatdata(agencyId,
dataset_id,
version,
start=NULL,
end=NULL,
recent=FALSE,
csv=FALSE,
xlsx=FALSE)
agencyId |
data set agencyId |
dataset_id |
data set id |
version |
data set version |
start |
Time value for the start (NULL by default) |
end |
Time value for the end (NULL bu default) |
recent |
False by default, if TRUE, the function retrieves data from last 10 years |
csv |
False by default, if TRUE, the function saves the data set to directory as .csv |
xlsx |
False by default, if TRUE, the function saves the data set to directory as .xlsx |
It returns data set as data.frame. It can be saved to environment or as .csv/.xlsx.
Downloading may take some time. Future versions will speed up the process.
get_istatdata("IT1", "12_60_DF_DCCV_CONSACQUA_2" , "1.0",recent = TRUE)
get_istatdata("IT1", "12_60_DF_DCCV_CONSACQUA_2" , "1.0", start = 2015, end = 2018)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.