polarDiff | R Documentation |
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.
polarDiff(
before,
after,
pollutant = "nox",
x = "ws",
limits = NULL,
plot = TRUE,
...
)
before |
A data frame that represents the "before" case. See
|
after |
A data frame that represents the "after" case. See |
pollutant |
Mandatory. A pollutant name corresponding to a variable in a
data frame should be supplied e.g. |
x |
Name of variable to plot against wind direction in polar coordinates, the default is wind speed, “ws”. |
limits |
The function does its best to choose sensible limits
automatically. However, there are circumstances when the user will wish to
set different ones. An example would be a series of plots showing each year
of data separately. The limits are set in the form |
plot |
Should a plot be produced? |
... |
Arguments passed on to
|
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.
an openair plot.
Other polar directional analysis functions:
percentileRose()
,
polarAnnulus()
,
polarCluster()
,
polarFreq()
,
polarPlot()
,
pollutionRose()
,
windRose()
## Not run:
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))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.