search_eurostat_toc {restatapi} | R Documentation |
Search for pattern in the titles, units and short description of the TOC
Description
Lists names of dataset from Eurostat with the particular pattern in the title, units or short description.
Usage
search_eurostat_toc(pattern, lang = "en", verbose = FALSE, ...)
Arguments
pattern |
Character string to search for in the table of contents of Eurostat tables/datasets |
lang |
a character string either |
verbose |
A boolean with default |
... |
other additional parameters to pass to the |
Details
Downloads the list of all tables and datasets available in the Eurostat database and returns all the details from the table of contents of the tables/datasets that contains particular pattern in the dataset title, unit or short description. E.g. all tables/datasets mentioning 'energy'.
Value
A table with the following columns:
title | The name of dataset/table in the language provided by the lang parameter |
code | The codename of dataset/table which can be used by the get_eurostat function |
type | The type of information: 'dataset' or 'table' |
lastUpdate | The date when the data was last time updated for tables and datasets |
lastModified | The date when the structure of the dataset/table was last time modified |
dataStart | The start date of the data in the dataset/table |
dataEnd | The end date of the data in the dataset/table |
values | The number of values in the dataset/table |
unit | The unit name for tables in the language provided by the lang parameter, if the type 'dataset' this column is empty |
shortDescription | The short description of the values for tables in the language provided by the lang parameterif the type 'dataset' this column is empty |
metadata.html | The link to the metadata in html format |
metadata.sdmx | The link to the metadata in SDMX format |
downloadLink.tsv | The link to the whole dataset/table in tab separated values format in the bulk download facility |
The value in the code
column can be used as an id in the get_eurostat_data
, get_eurostat_bulk
, get_eurostat_raw
and get_eurostat_dsd
functions.
If there is no hit for the search query, it returns NULL
.
See Also
search_eurostat_dsd
, get_eurostat_data
, get_eurostat_toc
Examples
if (!(grepl("amzn|-aws|-azure ",Sys.info()['release']))) options(timeout=2)
head(search_eurostat_toc("energy",verbose=TRUE))
nrow(search_eurostat_toc("energy"))
head(search_eurostat_toc("energie",lang="de",ignore.case=TRUE))
nrow(search_eurostat_toc("energie",lang="de",ignore.case=TRUE))
options(timeout=60)