View source: R/stat_dailyAQCategory.R
stat_dailyAQCategory | R Documentation |
This function calculates the daily averaged AQI PM25 categories for the data and colors the data by AQI cateogry when it is added to a plot. The default is to add them as bars.
stat_dailyAQCategory(
mapping = NULL,
data = NULL,
mv4Colors = FALSE,
timezone = NULL,
minHours = 18,
width = 0.8,
adjustylim = FALSE,
missingDataBar = TRUE,
geom = "bar",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options:
if |
mv4Colors |
If |
timezone |
timezone for day start and end for averaging. If |
minHours |
Minimum number oof valid data hours required to calculate each daily statistic |
width |
bar width in units of days. |
adjustylim |
if |
missingDataBar |
if |
geom |
The geometic object to display the data |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
remove NA values from data |
show.legend |
logical indicating whether this layer should be included in legends. |
inherit.aes |
if |
... |
additional arguments passed on to |
## Not run:
library(AirMonitorPlots)
monitor <- airsis_loadLatest()
ggplot_pm25Timeseries(monitor) +
stat_AQCategory(color = NA, width = 3000) +
stat_dailyAQCategory(alpha = .5, missingDataBar = FALSE, width = 1, size = 1) +
facet_wrap(~deviceDeploymentID)
monitor <-
airnow_loadLatest() %>%
monitor_filter(id = "a18dacf2eabb6c79_160590004_04")
ggplot_pm25Timeseries(mts_monitor) +
stat_dailyAQCategory()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.