This function creates interactive graphs that will be displayed in RStudio's 'Viewer' tab.
monitor_dygraph( ws_monitor, title = "title", ylab = "PM2.5 Concentration", tlim = NULL, rollPeriod = 1, showLegend = TRUE )
ws_monitor | ws_monitor object |
---|---|
title | title text |
ylab | title for the y axis |
tlim | optional vector with start and end times (integer or character representing YYYYMMDD[HH]) |
rollPeriod | rolling mean to be applied to the data |
showLegend | logical to toggle display of the legend |
Initiates the interactive dygraph plot in RStudio's 'Viewer' tab.
# \donttest{ # Fail gracefully if any resources are not available try({ library(PWFSLSmoke) # Napa Fires -- October, 2017 ca <- airnow_load(2017) %>% monitor_subset(tlim=c(20171001,20171101), stateCodes='CA') Vallejo <- monitor_subset(ca, monitorIDs='060950004_01') Napa_Fires <- monitor_subsetByDistance( ca, longitude = Vallejo$meta$longitude, latitude = Vallejo$meta$latitude, radius = 50 ) if ( interactive() ) { monitor_dygraph(Napa_Fires, title='Napa Fires in California, Oct. 2017') } }, silent = FALSE) # }