monitor_dailyBarplot: Create daily barplot

View source: R/monitor_dailyBarplot.R

monitor_dailyBarplotR Documentation

Create daily barplot

Description

Creates a daily barplot of data from a mts_monitor object.

Reasonable defaults are chosen for annotations and plot characteristics. Users can override any defaults by passing in parameters accepted by graphics::barplot.

Usage

monitor_dailyBarplot(
  monitor = NULL,
  id = NULL,
  add = FALSE,
  addAQI = FALSE,
  palette = c("EPA", "subdued", "deuteranopia"),
  opacity = NULL,
  ...,
  minHours = 18,
  dayBoundary = c("clock", "LST")
)

Arguments

monitor

mts_monitor object.

id

deviceDeploymentID for a single time series found in monitor. (Optional if monitor contains only a single time series.)

add

Logical specifying whether to add to the current plot.

addAQI

Logical specifying whether to add visual AQI decorations.

palette

Named color palette to use when adding AQI decorations.

opacity

Opacity to use for bars.

...

Additional arguments to be passed to graphics::barplot().

minHours

Minimum number of valid hourly records per day required to calculate statistics. Days with fewer valid records will be assigned NA.

dayBoundary

Treatment of daylight savings time: "clock" uses daylight savings time as defined in the local timezone, "LST" uses "local standard time" all year round.

Value

No return value. This function is called to draw an air quality daily average plot on the active graphics device.

Note

The underlying axis for this plot is not a time axis so you cannot use this function to "add" bars on top of a monitor_timeseriesPlot(). See the AirMonitorPlots package for more flexibility in plotting.

Examples

library(AirMonitor)

Carmel_Valley %>%
  monitor_dailyBarplot()


AirMonitor documentation built on Aug. 26, 2023, 1:08 a.m.