# NOT RUN {
# Run if HYDAT database has been downloaded (using tidyhydat::download_hydat())
if (file.exists(tidyhydat::hy_downloaded_db())) {
# Plot flow durations using a data frame and data argument with defaults
flow_data <- tidyhydat::hy_daily_flows(station_number = "08NM116")
plot_flow_duration(data = flow_data,
start_year = 1980)
# Plot flow durations using station_number argument with defaults
plot_flow_duration(station_number = "08NM116",
start_year = 1980)
# Plot flow durations and add custom stats for July-September
plot_flow_duration(station_number = "08NM116",
start_year = 1980,
custom_months = 7:9,
custom_months_label = "Summer")
}
# }
Run the code above in your browser using DataLab