PWFSLSmoke (version 1.2.100)

monitor_dygraph: Create Interactive Time Series Plot

Description

This function creates interactive graphs that will be displayed in RStudio's 'Viewer' tab.

Usage

monitor_dygraph(ws_monitor, title = "title",
  ylab = "PM2.5 Concentration", tlim = NULL, rollPeriod = 1,
  showLegend = TRUE)

Arguments

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

Value

Initiates the interactive dygraph plot in RStudio's 'Viewer' tab.

Examples

Run this code
# NOT RUN {
# 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)
monitor_dygraph(Napa_Fires, title='Napa Fires in California, Oct. 2017')
# }

Run the code above in your browser using DataLab