The openair book

A Guide to the Analysis of Air Pollution Data

Authors

David C Carslaw

Jack Davison

Published

April 4, 2026

Preface

Hello and welcome

Noteopenair Version 3 Released

Version 3 of openair has been released! This major update converts all plotting functions from lattice to ggplot2, among other changes. Click here to learn more about why this change has been made and what it means for openair users going forward.

The openair project started with funding from the UK Natural Environment Research Council (NERC) over 10 years ago. The main aim was to fill a perceived gap in that there was a lack of a dedicated set of easily accessible, open source tools for analysing air quality data. At that time R was becoming increasingly popular but far, far less than it is today. Earlier pdf versions of the the book tried to minimise the use of R for new users who may not have even heard of R. However, the popularity of R has increased dramatically and it is now the case that many users of openair are also using R for other purposes. This has led to a much more integrated use of R in the book. The book is now much more focused on the use of R and how to use it effectively for air quality data analysis.

The book is split into broad sections that cover common aspects of air quality data analysis.

  • Data Import Mostly focused on the easy access of UK air quality data across national and regional networks and accessing global meteorological data.

  • Directional Analysis Many common functions such as wind and pollution roses, bivariate polar plots and back trajectories.

  • Time Series and Trends Various ways of considering changes in time and flexible methods for trend assessment.

  • Model Evaluation Functions such as Taylor Diagrams, common model evaluation statistics and conditional quantile plots.

  • Interactive Maps Considers effective ways of viewing UK air quality networks and plotting directional analyses on interactive plots; particularly useful for source characterisation.

  • Utility functions various functions to flexibly carry out time-averaging, correlation analysis and other common tasks of relevance to air pollution.

openair does not of course cover every conceivable analysis that users might be interested in, but a selection of flexible methods that should have wide appeal. However, by using R as the basis of development, users can greatly extend the types of analysis in many powerful and innovative ways.

The reason for writing this book (or manual) in this form i.e. a website rather than a pdf or Word document is convenience for all involved. For us it makes it much easier to keep the information up to date and ensure that the information is reproducible. For the reader it is something that can easily be read and navigated in a browser. Where code is involved — as it is heavily in this book — it is very easy to use the copy icon at the top right of each code block to make it easy to copy into R. Finally, it is increasingly the case that information can be plotted interactively, which is not something that can easily be done in a pdf or Word document.

To cite openair please use:

Carslaw, D. C., and K. Ropkins. 2012. “openair — An R package for air quality data analysis.” Environmental Modelling & Software 27–28 (0): 52–61. https://doi.org/10.1016/j.envsoft.2011.09.008.

This book was authored on 2026-04-02 using:

  • R version 4.5.2.

  • openair version 3.0.0.

  • openairmaps version 0.9.1.9011.

  • worldmet version 1.0.0.9000.

  • deweather version 1.0.0.