Skip to contents

This function provides a way of showing the differences in concentrations between two time periods as a polar plot. There are several uses of this function, but the most common will be to see how source(s) may have changed between two periods.

Usage

polarDiff(before, after, pollutant = "nox", x = "ws", limits = NA, ...)

Arguments

before

A data frame that represents the "before" case. See polarPlot for details of different input requirements.

after

A data frame that represents the "after" case. See polarPlot for details of different input requirements.

pollutant

The pollutant to analyse.

x

The variable used for the radial axis (default = "ws").

limits

The colour scale limits e.g. limits = c(-10, 10).

...

Other arguments to polarPlot.

Value

Only plot at the moment.

Details

While the function is primarily intended to compare two time periods at the same location, it can be used for any two data sets that contain the same pollutant. For example, data from two sites that are close to one another, or two co-located instruments.

The analysis works by calculating the polar plot surface for the before and after periods and then subtracting the before surface from the after surface.

Examples


if (FALSE) {

before_data <- selectByDate(mydata, year = 2002)
after_data <- selectByDate(mydata, year = 2003)

polarDiff(before_data, after_data, pollutant = "no2")

# with some options
polarDiff(before_data, after_data, pollutant = "no2", cols = "RdYlBu", limits = c(-20, 20))

}