← Back to all sparks
O

openair

INFRA · APIS
Velocity0.0

Tools for the Analysis of Air Pollution Data

Air quality analysis rebuilt on ggplot2, twenty years of lattice plotting dropped in one release.

air-qualityggplot2time-seriesdata-importenvironmental-sciencer-package
Current state
openair is the reference toolkit for UK and European air quality data analysis, covering import from national monitoring networks, time averaging, polar and trajectory plots, and trend estimation. Version 3.0.0 rewrote every plotting function in ggplot2 and removed lattice, latticeExtra, hexbin, and mapproj from the dependency tree; 3.1.0 followed six weeks later to settle how parameters reach those functions, remapping base and lattice graphics arguments to ggplot2 equivalents with a warning rather than failing outright.
Where it's heading
Two threads run through these releases. The first is the rendering migration and its long tail — deprecated arguments rehomed into breakOpts(), graphical parameters standardized on ggplot2 conventions, trajectory projections collapsed from three arguments into a single crs. The second is data access decaying underneath the package: importEurope() now errors for recent years because the database behind it was retired, while importUKAQ() gained automatic source detection and steadily more careful ratification handling. Correctness fixes keep landing in the analytical core too, including a corrected TheilSen intercept and more consistent bin boundaries in multi-period time averaging.
Prediction
The migration is not finished — 3.1.0 is still remapping legacy graphics arguments with warnings — so expect a release that turns those deprecations into removals, and continued churn around European data import while the replacement service settles.

Recent moves

  1. 3mo ago

    ggplot2 parameter conventions settled; timeAverage bins fixed

    The cleanup pass on the ggplot2 rewrite: graphical parameters now follow ggplot2 naming, base and lattice equivalents are remapped automatically with a warning, and arguments like strip.position move into the dots. Underneath the migration work sit two real analytical fixes — a corrected TheilSen intercept formula and fixed-period bin boundaries in timeAverage() that make multi-day averaging consistent across datasets with different start times.

    View source ↗
  2. 4mo ago

    All plotting rewritten in ggplot2; lattice dropped

    ⚡ SPARK

    The release that changes what openair is built on. Every plotting function moves to ggplot2, lattice and its satellites leave the dependency tree, and lattice-specific options and annotations stop working. Trajectory functions also drop three projection arguments for a single crs, and cutData() gains quarter-based splits alongside meteorological seasons.

    View source ↗
  3. 11mo ago

    European import deprecated; UK network source auto-detection

    The last release before the rewrite, and mostly about data access holding up. importEurope() now warns and errors outright for 2025 onward because the database behind it was retired, with users pointed at the EEA service and a separate package built for it. importUKAQ() gains automatic source assignment and more precise ratification labelling, both of which reduce the guesswork in getting the right measurements out of overlapping UK networks.

    View source ↗