Creates a timeseries leaflet map that displays point location time series data and allows playback with a slider and "Play" button.
timeseriesMap(data, meta, index = "monitorID", label = "label", ...)
data | Dataframe that contains point location time series data. See Details. |
---|---|
meta | Dataframe that contains the point location metadata. See Details. |
index | Column name in |
label | Column name in |
... | Additional arguments. See details. |
Use of this function requires data
and meta
dataframes that
are linked by location-specific unique identifiers. In meta
, each row
contains location metadata associated with a unique timeseries. The unique
identifiers for are found in meta[[index]]
. The data
dataframe
uses these identifiers as column names with a separate column of data for
each timeseries.
data
must be a dataframe of regular time series data.
The data
dataframe must contain one 'datetime' column. All other
columns must have the names specified in meta[[index]]
.
meta
must be a dataframe that contains location information associated
with the timeseries found in data
. The meta
dataframe must
contain a column with the name specified with index
and another with
the column name specified with label
.
...
Additional (optional) configuration arguments:
width
-- widget width
height
-- widget_height
colors
-- colors
breaks
-- color ramp breaks
elementId
-- HTML element ID
inputId
-- shiny input ID
When specifying colors
and breaks
, you must use the
d3 idiom where the vector of colors is one longer than the vector of
breaks. Everything below the lowest break gets the lowest color. Everything
above the highest break gets the highest color.
library(tiotemp) # Example using PWFSLSmoke 'ws_monitor' object sensor <- example_pwfslsmoke_object timeseriesMap( data = sensor$data, meta = sensor$meta, index = "monitorID", label = "siteName", colors = c("#00E400","#FFFF00","#FF7E00","#FF0000","#8F3F97","#7E0023"), breaks = c(12.0, 35.5, 55.5, 150.5, 250.5) ) # Example using AirSensor 'airsensor' object sensor <- example_airsensor_object timeseriesMap( data = sensor$data, meta = sensor$meta, index = "deviceDeploymentID", label = "label" )