sdmx_codelist | R Documentation |
sdmx_codelist
constructs an URL for rsdmx::readSDMX
and
extracts the code IDs. Code lists are downloaded once and cached for the
duration of the R session.
estat_codelist
gets a code list from the REST API provided at
ec.europa.eu/tools/cspa_services_global/sdmxregistry
. It is a
convenience wrapper that calls sdmx_codelist
.
global_codelist
gets a code list from the REST API provided at
https://registry.sdmx.org/webservice/data.html
. It is a convenience
wrapper that calls sdmx_codelist
.
sdmx_codelist(
endpoint,
agency_id,
resource_id,
version = "latest",
what = c("id", "all")
)
estat_codelist(resource_id, agency_id = "ESTAT", version = "latest")
global_codelist(resource_id, agency_id = "SDMX", version = "latest")
endpoint |
|
agency_id |
|
resource_id |
|
version |
|
what |
|
Other sdmx:
sdmx_endpoint()
,
validator_from_dsd()
Other sdmx:
sdmx_endpoint()
,
validator_from_dsd()
# here we download the CL_ACTIVITY codelist from the ESTAT registry.
## Not run:
codelist <- sdmx_codelist(
endpoint = "https://registry.sdmx.org/ws/public/sdmxapi/rest/"
, agency_id = "ESTAT"
, resource_id = "CL_ACTIVITY"
## End(Not run)
## Not run:
estat_codelist("CL_ACTIVITY")
## End(Not run)
## Not run:
global_codelist("CL_AGE") )
global_codelist("CL_CONF_STATUS")
global_codelist("CL_SEX")
## End(Not run)
# An example of using SDMX information, downloaded from the SDMX global
# registry
## Not run:
# economic data from the country of Samplonia
data(samplonomy)
head(samplonomy)
rules <- validator(
, freq %in% global_codelist("CL_FREQ")
, value >= 0
)
cf <- confront(samplonomy, rules)
summary(cf)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.