get_eurostat_dsd {restatapi} | R Documentation |
Download the Data Structure Definition of a dataset
Description
Download Data Structure Definition (DSD) of a Eurostat dataset if it is not cached previously.
Usage
get_eurostat_dsd(
id,
lang = "en",
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
compress_file = TRUE,
verbose = FALSE,
...
)
Arguments
id |
a character string with the id of the dataset. It is a value from the |
lang |
a character string either |
cache |
a boolean whether to load/save the DSD from/in the cache or not. The default value is |
update_cache |
a boolean to update cache or not. The default value is |
cache_dir |
a path to a cache directory. The default is |
compress_file |
a logical whether to compress the RDS-file in caching. Default is |
verbose |
A boolean with default |
... |
parameter to pass on the |
Details
The DSD is downloaded from Eurostat's website, through the REST API in XML (SDMX-ML) format.
Value
If the DSD does not exist it returns NULL
otherwise the result is a table with the 3 columns:
concept | The name of the concepts in the order of the data structure |
code | The possible list of codes under the concept |
name | The name/description of the code |
References
For more information see the detailed documentation of the API.
See Also
get_eurostat_data
, search_eurostat_toc
.
Examples
if (!(grepl("amzn|-aws|-azure ",Sys.info()['release']))) options(timeout=2)
head(get_eurostat_dsd("med_rd6",lang="de",cache=FALSE,verbose=TRUE))
options(timeout=60)