get_eurostat_codelist {restatapi} | R Documentation |
Download the codelist of a concept
Description
Download codelist of a concept from Eurostat if it is not cached previously.
Usage
get_eurostat_codelist(
id,
lang = "en",
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
compress_file = TRUE,
verbose = FALSE,
...
)
Arguments
id |
a character string with id of the concept. It is a value from the |
lang |
a character string either |
cache |
a boolean whether to load/save the TOC 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 codelist is downloaded from Eurostat's website, through the REST API in XML (SDMX-ML) format.
Value
If the codelist does not exist it returns NULL
otherwise the result is a table with the 2 columns:
code | All the possible codes under the concept |
name | The name/description of the code |
References
For more information see the detailed documentation of the API.
See Also
Examples
if (!(grepl("amzn|-aws|-azure ",Sys.info()['release']))) options(timeout=2)
get_eurostat_codelist("freq",lang="de",cache=FALSE,verbose=TRUE)
options(timeout=60)