README.md

europollution

Package description

This package is R wrapper to access air pollution data (AirBase and Air Quality e-Reporting data) from the European Environment Agency, along with some potentially useful data wrangling functions.

Air quality data from the European Environment Agency comes in a specific format and it requires some coding to gather it in a nice data frame that can be used in R. The following package provides this short coding and wrangles the data into a user-friendly R format.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("vincentbagilet/europollution")

Note: the function in this package start with the prefix ep_.

Data sources

All information on the data can be accessed through the European Air Quality Portal. The europollution package enables to download data from two data sets: AirBase for data from 2000 to 2012 and the AQ e-Reporting dataset. The air quality time series through two somehow cumbersome forms, one for AQeR and one for AirBase.[1]

The present package enables to simplify and somehow automatize the download process in R. It also provides simple cleaning functions.

Example

For a detailled presentation of the different functions in this package, refer to the package vignette.

The most usefull function rt enables to download the data and to wrangle it into a nice usable format. It is built on other functions in this package and thus enable to complete only some of the steps.

Once the data has been downloaded and since the download process may take some time, I recommand to save it using the save command:

save(europollution_data, file = "europollution.Rda")
  1. Note that the whole AirBase dataset can be downloaded in XML from the EU Open Data portal. Per country data is also available.


vincentbagilet/europollution documentation built on May 22, 2020, 12:07 a.m.