Description Usage Arguments Details Note Author(s) Examples
The function to plot a hyetograph over a hydrograph based on ggplot functions.
1 2 3 4 5 6 7 8 9 | hydrograph(
data,
time = time,
runoff = Runoff,
rain = Rain,
agg.time_unit = "3 hours",
agg.window = 8,
vsep = 0.5
)
|
data |
tbl or Data frame object. |
time |
Vector name of timestamp variable in 'data'. |
runoff |
Vector name of Runoff variable in 'data'. |
rain |
Vector name of Rainfall variable in 'data'. |
agg.time_unit |
Integrer. Default "3 hours". Time lag unit to aggregate rainfall bars by sum function. This will be showed as light blue line of hyetrograph. |
agg.window |
Integrer. Default 8. Value of number o values from rainfall data to aggregate by rolling mean function. This will be showed as dark blue line of hyetrograph. |
vsep |
numeric. Default 0.5. Value between 0 and 1 to scale the vertical separation of hyetograph from hydrograph. 1 means 100 between min and max runoff. |
ggplot2 object is generated. Other functions passed to theme()
guides() or labs() can be used to customize the hydrograph.
Based on the request at https://stackoverflow.com/q/42057832
Gabriel Gaona
1 2 3 4 5 6 7 8 9 10 11 | # ploting soil moisture
data("soil_moisture")
#
hydrograph(data = soil_moisture,
time = timestamp,
runoff = runoff,
rain = rain,
agg.time_unit = "day",
agg.window = 7) +
ggplot2::theme_light()+
ggplot2::theme(legend.position = "bottom")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.