Lists names of dataset from eurostat with the particular pattern in the description.
Usage
search_eurostat(pattern, type = "dataset", fixed = TRUE)
grepEurostatTOC(pattern, type = "dataset")
Arguments
- pattern
Character, datasets, folder or tables with this pattern in the description will be returned (depending on the 'type' argument)
- type
Grep the Eurostat table of contents either for 'dataset' (default), 'folder', 'table' or "all" (for all types).
- fixed
logical. If TRUE, pattern is a string to be matched as is. Change to FALSE if more complex regex matching is needed.
Value
A tibble with eight columns
title: The name of dataset of theme
code: The codename of dataset of theme, will be used by the
get_eurostat()
andget_eurostat_raw()
functions.type: Is it a dataset, folder or table.
last.update.of.data, last.table.structure.change, data.start, data.end: Dates.
Details
Downloads list of all datasets available on eurostat and return list of names of datasets that contains particular pattern in the dataset description. E.g. all datasets related to education of teaching.
References
See citation("eurostat")
:
#
# Kindly cite the eurostat R package as follows:
#
# (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek.
# Retrieval and analysis of Eurostat open data with the eurostat
# package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019
# Package URL: http://ropengov.github.io/eurostat Article URL:
# https://journal.r-project.org/archive/2017/RJ-2017-019/index.html
#
# A BibTeX entry for LaTeX users is
#
# @Article{,
# title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package},
# author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek},
# journal = {The R Journal},
# volume = {9},
# number = {1},
# pages = {385--392},
# year = {2017},
# doi = {10.32614/RJ-2017-019},
# url = {https://doi.org/10.32614/RJ-2017-019},
# }
Author
Przemyslaw Biecek and Leo Lahti ropengov-forum@googlegroups.com
Examples
# \donttest{
tmp <- search_eurostat("education")
head(tmp)
#> # A tibble: 6 × 8
#> title code type `last update of data` last table structure…¹ `data start`
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Populat… cens… data… 01.04.2019 08.02.2021 2011
#> 2 Populat… cens… data… 26.08.2015 08.02.2021 2011
#> 3 Employe… cens… data… 26.03.2009 08.02.2021 2001
#> 4 Populat… cens… data… 26.03.2009 08.02.2021 2001
#> 5 Pupils … educ… data… 07.07.2023 07.07.2023 2013
#> 6 Pupils … educ… data… 07.07.2023 07.07.2023 2013
#> # ℹ abbreviated name: ¹`last table structure change`
#> # ℹ 2 more variables: `data end` <chr>, values <chr>
# Use "fixed = TRUE" when pattern has characters that would need escaping.
# Here, parentheses would normally need to be escaped in regex
tmp <- search_eurostat("Live births (total) by NUTS 3 region", fixed = TRUE)
# }