R tools to access open data fromEurostat. Data search, download, manipulation and visualization.
Installation and use
Install stable version from CRAN:
install.packages("eurostat")Alternatively, install development version from GitHub:
Development version can be also installed using ther-universe:
# Enable this universeoptions(repos=c( ropengov="https://ropengov.r-universe.dev", CRAN="https://cloud.r-project.org"))install.packages("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 packagelibrary(eurostat)# Perform a simple search and print a tablepassengers<-search_eurostat("passenger transport")knitr::kable(head(passengers))| title | code | type | last.update.of.data | last.table.structure.change | data.start | data.end | values | hierarchy |
|---|---|---|---|---|---|---|---|---|
| Air passenger transport | enps_avia_pa | dataset | 13.03.2023 | 13.03.2023 | 2005 | 2021 | 406 | 6 |
| Modal split of air, sea and inland passenger transport | tran_hv_ms_psmod | dataset | 29.06.2023 | 29.06.2023 | 2008 | 2021 | 2100 | 4 |
| Modal split of inland passenger transport | tran_hv_psmod | dataset | 29.06.2023 | 29.06.2023 | 1990 | 2021 | 4219 | 4 |
| Volume of passenger transport relative to GDP | tran_hv_pstra | dataset | 11.08.2023 | 29.06.2023 | 1990 | 2021 | 969 | 4 |
| Maritime passenger transport performed in the Exclusive Economic Zone (EEZ) of the countries | mar_tp_pa | dataset | 21.02.2023 | 21.02.2023 | 2005 | 2021 | 1752 | 4 |
| Air passenger transport by reporting country | avia_paoc | dataset | 04.12.2023 | 28.11.2023 | 1993 | 2023-Q3 | 2482969 | 5 |
See theTutorial and other resources at thepackage homepage for more information and examples.
Recommended packages
It is recommended to install thegiscoR package (https://dieghernan.github.io/giscoR/). This is another API package that provides R tools for Eurostat geographic data to support geospatial analysis and visualization.
Contribute
Contributions are very welcome:
- Use issue tracker for feedback and bug reports.
- Send pull requests
- Star us on the Github page
- Join the discussion in Gitter
Acknowledgements
Kindly cite this package by citing the following R Journal article:
Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package.The R Journal 9(1), pp. 385-392. doi:10.32614/RJ-2017-019.
In addition, please provide a citation to the specific software version used:
Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0.9003.https://github.com/rOpenGov/eurostat
We are grateful to allcontributors, including Daniel Antal, Joona Lehtomäki, Francois Briatte, and Oliver Reiter, and for theEurostat open data portal! This project is part ofrOpenGov.
This project has received funding from the European Union under grant No 101095295 (OpenMUSE), the FIN-CLARIAH research infrastructure and the Strategic Research Council’s YOUNG program by the Research Council of Finland (decisions 345630, 358720, 367756, 352604).
Disclaimer
This package is in no way officially related to or endorsed by Eurostat.
When using data retrieved from Eurostat database in your work, please indicate that the data source is Eurostat. If your re-use involves some kind of modification to data or text, please state this clearly to the end user. See Eurostat policy oncopyright and free re-use of data for more detailed information and certain exceptions.
