R/monitor_ggDailyByHour_archival.R
monitor_ggDailyByHour_archival.Rd
This function assembles various layers to create a production-ready archival diurnal plot for a single monitor.
The full range of data in monitor
will be used unless both
startdate
and enddate
are specified.
monitor_ggDailyByHour_archival(
monitor,
startdate = NULL,
enddate = NULL,
id = NULL,
style = c("large", "small"),
title = NULL,
timezone = NULL,
...
)
A mts_monitor object.
Desired startdate for data to include, in a format that can be parsed with parseDatetime.
Desired enddate for data to include, in a format that can be parsed with parseDatetime.
deviceDeploymentID to include in the plot. This can be NULL if
monitor
only has one unique deviceDeploymentID.
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.
Plot title. If NULL, a suitable title will be constructed.
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()
.
A ggplot object.
library(AirMonitorPlots)
AirMonitor::Carmel_Valley %>%
AirMonitor::monitor_trimDate() %>%
monitor_ggDailyByHour_archival()
#> Warning: The following aesthetics were dropped during statistical transformation: x and
#> y.
#> ℹ This can happen when ggplot fails to infer the correct grouping structure in
#> the data.
#> ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
#> variable into a factor?
#> Warning: Removed 23 rows containing missing values or values outside the scale range
#> (`geom_pm25points()`).
if (FALSE) {
monitor <- AirMonitor::airnow_loadLatest()
monitor_ggDailyByHour_archival(monitor, id = "51b9bcb4eaac7c9d_530330030")
}