event_plot | R Documentation |
This function creates an interactive plot using dygraphs
package
event_plot( dataframe, q, datetime, he, ssc, ylabel = "Water discharge", y2label = "Suspended Sediment Concentration" )
dataframe |
A data set object |
q |
Water discharge variable (or water stage) |
datetime |
Datetime variable (column in POSIXct format) |
he |
Hydrological event variable (or other day column) |
ssc |
Suspended sediment concentration variable (to plot on a second axis) |
ylabel |
Y-axis label |
y2label |
Second Y-axis label |
The 'event_plot' function returns object of class "dygraphs", "htmlwidget"
library(dplyr) data(djan) djan %>% hydro_events( q = discharge, datetime = time, window = 21 ) %>% event_plot(q = SS, datetime = time, he = he)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.