monitor_ggDailyByHour: Create a diurnal plot for one or more monitors

View source: R/monitor_ggDailyByHour.R

monitor_ggDailyByHourR Documentation

Create a diurnal plot for one or more monitors

Description

This function assembles various layers to create a production-ready diurnal plot for a single monitor.

The full range of data in monitor will be used unless both startdate and enddate are specified.

Usage

monitor_ggDailyByHour(
  monitor,
  startdate = NULL,
  enddate = NULL,
  id = NULL,
  style = c("small", "large"),
  title = NULL,
  timezone = NULL,
  ...
)

Arguments

monitor

A mts_monitor object.

startdate

Desired startdate for data to include, in a format that can be parsed with parseDatetime.

enddate

Desired enddate for data to include, in a format that can be parsed with parseDatetime.

id

deviceDeploymentID to include in the plot. This can be NULL if monitor only has one unique deviceDeploymentID.

style

String indicating plotting style. Either "large" or "small". style = "large" is suitable for plots larger than 450x450px, and "small" is suitable for plots 450x450px or smaller.

title

Plot title. If NULL, a suitable title will be constructed.

timezone

Olson timezone name for x-axis scale and date parsing. If NULL the timezone of the specified monitor will be used.

...

Extra arguments passed to ggplot_pm25Diurnal().

Value

A ggplot object.

Examples

## Not run: 
monitor <- airnow_loadLatest()
monitor_ggDailyByHour(monitor, id = "51b9bcb4eaac7c9d_530330030")

## End(Not run)

AirMonitor::Carmel_Valley %>%
  monitor_ggDailyByHour(startdate = 20160801, enddate = 20160810)


MazamaScience/AirMonitorPlots documentation built on May 8, 2024, 6:16 a.m.