openair - Data Analysis Tools for the Air Quality Community

The openair package contains data analysis tools for the air quality community. This paper provides an overview of data importers, main functions, and selected utilities and workhorse functions within the package and the function output class, as of package version 0.4-14. It is intended as an explanation of the rationale for the package and a technical description for those wishing to work more interactively with the main functions or develop additional functions to support ‘higher level’ use of openair and R. Large volumes of air quality data are routinely collected for regulatory purposes, but few of those in local authorities and government bodies tasked with this responsibility have the time, expertise or funds to comprehensively analyse this potential resource (Chow and Watson, 2008). Furthermore, few of these institutions can routinely access the more powerful statistical methods typically required to make the most effective use of such data without a suite of often expensive and niche-application proprietary software products. This in turn places large cost and time burdens on both these institutions and others (e.g. academic or commercial) wishing to contribute to this work. In addition, such collaborative working practices can also become highly restricted and polarised if data analysis undertaken by one partner cannot be validated or replicated by another because they lack access to the same licensed products. Being freely distributed under general licence, R has the obvious potential to act as a common platform for those routinely collecting and archiving data and the wider air quality community. This potential has already been proven in several other research areas, and commonly cited ex amples include the Bioconductor project (Gentleman et al, 2004) and the Epitools collaboration ( However, what is perhaps most inspiring is the degree of trans parency that has been demonstrated by the recent public analysis of climate change data in R and as sociated open debate ( tool/). Anyone affected by a policy decision, could potentially have unlimited access to scrutinise both the tools and data used to shape that decision.

Karl Ropkins , David C. Carslaw

CRAN packages used

openair, openair, lattice, latticeExtra, hexbin, grDevices, mgcv, stats, grDevices, RColorBrewer

CRAN Task Views implied by cited packages

Graphics, Environmetrics, SpatioTemporal, Bayesian, Econometrics, Multivariate, Pharmacokinetics, SocialSciences, Spatial


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Ropkins & Carslaw, "The R Journal: openair - Data Analysis Tools for the Air Quality Community", The R Journal, 2012

BibTeX citation

  author = {Ropkins, Karl and Carslaw, David C.},
  title = {The R Journal: openair - Data Analysis Tools for the Air Quality Community},
  journal = {The R Journal},
  year = {2012},
  note = {},
  doi = {10.32614/RJ-2012-003},
  volume = {4},
  issue = {1},
  issn = {2073-4859},
  pages = {20-29}