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 …¹ last …² data …³ data …⁴ values
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Population by current acti… cens… data… 01.04.… 08.02.… 2011 2011 NA
#> 2 Population by group of cou… cens… data… 26.08.… 08.02.… 2011 2011 NA
#> 3 Employed persons by sex, a… cens… data… 26.03.… 08.02.… 2001 2001 NA
#> 4 Population by sex, age gro… cens… data… 26.03.… 08.02.… 2001 2001 NA
#> 5 Pupils enrolled in early c… educ… data… 20.07.… 13.06.… 2013 2020 NA
#> 6 Pupils enrolled in primary… educ… data… 07.06.… 13.06.… 2013 2020 NA
#> # … with abbreviated variable names ¹`last update of data`,
#> # ²`last table structure change`, ³`data start`, ⁴`data end`
# 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)
# }