Get air quality data for the United Kingdom using the rdefra package
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Whether you are an environmental scientist, a pollution expert or just concerned about the air you breathe when cycling in the United Kingdom, the ropensci rdefra package can help find the information you need. This package gives you access to the UK-AIR database, hosted by the Department for Environment, Food & Rural Affairs in the United Kingdom, directly from R. The database comprises hundreds of air quality monitoring sites and each provides time series of concentration for different pollutants such as ozone, carbon dioxide and nitrogen oxides amongst others. It allows you to efficiently download, plot and compare data for multiple years/stations so that you can easily carry out spatio-temporal analysis or simply plan an healthier route for you bike ride. The package is fully documented and the vignette contains examples for a number of applications, such as how to generate the interactive map of the monitoring stations (see screenshot below).
Installation
The stable version of the package is available from CRAN:
install.packages("rdefra")
While the development version can be installed from github using devtools:
devtools::install_github("ropensci/rdefra")
This package depends on the Geospatial Data Abstraction Library (GDAL) library, which should be previously installed on your machine.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.