This function creates interactive graphs that will be displayed in RStudio's 'Viewer' tab.
The list of available parameters include:
pm25
-- A and B channel PM2.5 (ug/m3)
temperature
-- temperature (F)
humidity
-- humidity (%)
pressure
-- pressure (hPa)
pat_dygraph( pat = NULL, parameter = "pm25", sampleSize = 5000, title = NULL, xlab = NULL, ylab = NULL, tlim = NULL, rollPeriod = 1, showLegend = TRUE, colors = NULL, timezone = NULL )
pat | PurpleAir Timeseries pat object from |
---|---|
parameter | Data to display: "pm25", "humidity", "temperature" |
sampleSize | Either an integer or fraction to determine sample size |
title | title text |
xlab | optional title for the x axis |
ylab | optional 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 |
colors | string vector of colors to be used for plotting |
timezone | Olson timezone used to interpret |
Initiates the interactive dygraph plot in RStudio's 'Viewer' tab.
# \donttest{ library(AirSensor) North_Bend_Weather <- pat_createNew( label = "North Bend Weather", pas = example_pas, startdate = 20180801, enddate = 20180901, verbose = TRUE )#>#>#>#>#>#>if ( interactive() ) { North_Bend_Weather %>% pat_sample(sampleSize = 1000, setSeed = 1) %>% pat_dygraph(xlab = "2018", rollPeriod = 6) } # }