pollutionRose | R Documentation |
The traditional wind rose plot that plots wind speed and wind direction by different intervals. The pollution rose applies the same plot structure but substitutes other measurements, most commonly a pollutant time series, for wind speed.
pollutionRose(
mydata,
pollutant = "nox",
key.footer = pollutant,
key.position = "right",
key = TRUE,
breaks = 6,
paddle = FALSE,
seg = 0.9,
normalise = FALSE,
alpha = 1,
plot = TRUE,
...
)
mydata |
A data frame containing fields |
pollutant |
Mandatory. A pollutant name corresponding to a variable in a
data frame should be supplied e.g. |
key.footer |
Adds additional text/labels below the scale key. See
|
key.position |
Location where the scale key is to plotted. Allowed arguments currently include “top”, “right”, “bottom” and “left”. |
key |
Fine control of the scale key via |
breaks |
Most commonly, the number of break points for pollutant
concentrations. The default, 6, attempts to breaks the supplied data at
approximately 6 sensible break points. However, |
paddle |
Either |
seg |
When |
normalise |
If |
alpha |
The alpha transparency to use for the plotting surface (a value
between 0 and 1 with zero being fully transparent and 1 fully opaque).
Setting a value below 1 can be useful when plotting surfaces on a map using
the package |
plot |
Should a plot be produced? |
... |
Arguments passed on to
|
pollutionRose()
is a windRose()
wrapper which brings pollutant
forward in the argument list, and attempts to sensibly rescale break points
based on the pollutant
data range by by-passing ws.int
.
By default, pollutionRose()
will plot a pollution rose of nox
using
"wedge" style segments and placing the scale key to the right of the plot.
It is possible to compare two wind speed-direction data sets using
pollutionRose()
. There are many reasons for doing so e.g. to see how one
site compares with another or for meteorological model evaluation. In this
case, ws
and wd
are considered to the the reference data sets
with which a second set of wind speed and wind directions are to be compared
(ws2
and wd2
). The first set of values is subtracted from the
second and the differences compared. If for example, wd2
was biased
positive compared with wd
then pollutionRose
will show the bias
in polar coordinates. In its default use, wind direction bias is colour-coded
to show negative bias in one colour and positive bias in another.
an openair object. Summarised proportions can be
extracted directly using the $data
operator, e.g.
object$data
for output <- windRose(mydata)
. This returns a
data frame with three set columns: cond
, conditioning based on
type
; wd
, the wind direction; and calm
, the
statistic
for the proportion of data unattributed to any specific
wind direction because it was collected under calm conditions; and then
several (one for each range binned for the plot) columns giving proportions
of measurements associated with each ws
or pollutant
range
plotted as a discrete panel.
Other polar directional analysis functions:
percentileRose()
,
polarAnnulus()
,
polarCluster()
,
polarDiff()
,
polarFreq()
,
polarPlot()
,
windRose()
# pollutionRose of nox
pollutionRose(mydata, pollutant = "nox")
## source apportionment plot - contribution to mean
## Not run:
pollutionRose(mydata, pollutant = "pm10", type = "year", statistic = "prop.mean")
## End(Not run)
## example of comparing 2 met sites
## first we will make some new ws/wd data with a postive bias
mydata$ws2 = mydata$ws + 2 * rnorm(nrow(mydata)) + 1
mydata$wd2 = mydata$wd + 30 * rnorm(nrow(mydata)) + 30
## need to correct negative wd
id <- which(mydata$wd2 < 0)
mydata$wd2[id] <- mydata$wd2[id] + 360
## results show postive bias in wd and ws
pollutionRose(mydata, ws = "ws", wd = "wd", ws2 = "ws2", wd2 = "wd2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.