Watch on GitHub Star on GitHub Follow

R tools to access open data from Eurostat. Data search, download, manipulation and visualization.

Installation and use

Install stable version from CRAN:

install.packages("eurostat")
#> Installing package into '/Users/runner/work/_temp/Library'
#> (as 'lib' is unspecified)
#> also installing the dependencies 'sys', 'bit', 'prettyunits', 'proxy', 'utf8', 'askpass', 'bit64', 'withr', 'progress', 'wk', 'backports', 'ellipsis', 'generics', 'purrr', 'e1071', 'lifecycle', 'R6', 'tidyselect', 'vctrs', 'pillar', 'openssl', 'Rcpp', 'cli', 'clipr', 'crayon', 'hms', 'vroom', 'cpp11', 'tzdb', 'xml2', 'plyr', 'DBI', 's2', 'units', 'fansi', 'pkgconfig', 'broom', 'classInt', 'countrycode', 'curl', 'dplyr', 'httr', 'lubridate', 'RColorBrewer', 'readr', 'RefManageR', 'sf', 'tibble', 'tidyr'
#> 
#> The downloaded binary packages are in
#>  /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpAxhaCw/downloaded_packages

Alternatively, install development version from GitHub:

# Install from GitHub
library(devtools)
devtools::install_github("ropengov/eurostat")

The package provides several different ways to get datasets from Eurostat. Searching for data is one way, if you know what to look for.

# Load the package
library(eurostat)

# Perform a simple search and print a table
passengers <- search_eurostat("passenger transport")
knitr::kable(head(passengers))
title code type last update of data last table structure change data start data end values
Air passenger transport enps_avia_pa dataset 16.04.2021 NA 2005 2020 NA
Volume of passenger transport relative to GDP tran_hv_pstra dataset 07.07.2021 07.07.2021 1990 2019 NA
Modal split of passenger transport tran_hv_psmod dataset 07.07.2021 07.07.2021 1990 2019 NA
Air passenger transport by reporting country avia_paoc dataset 27.08.2021 27.08.2021 1993 2021Q2 NA
Air passenger transport by main airports in each reporting country avia_paoa dataset 27.08.2021 27.08.2021 1993 2021Q2 NA
Air passenger transport between reporting countries avia_paocc dataset 27.08.2021 27.08.2021 1993 2021Q2 NA

See the Tutorial and other resources at the package homepage for more information and examples.

Contribute

Contributions are very welcome:

Acknowledgements

Kindly cite this work as follows: Leo Lahti, Przemyslaw Biecek, Markus Kainu and Janne Huovari. Retrieval and analysis of Eurostat open data with the eurostat package. R Journal 9(1):385-392, 2017. R package version 3.7.5. URL: https://ropengov.github.io/eurostat/

We are grateful to all contributors, including Daniel Antal, Joona Lehtomäki, Francois Briatte, and Oliver Reiter, and for the Eurostat open data portal! This project is part of rOpenGov.

Disclaimer

This package is in no way officially related to or endorsed by Eurostat.