# NOT RUN {
# Run if HYDAT database has been downloaded (using tidyhydat::download_hydat())
if (file.exists(tidyhydat::hy_downloaded_db())) {
# Plot monthly statistics using a data frame and data argument with defaults
flow_data <- tidyhydat::hy_daily_flows(station_number = "08NM116")
results <- plot_monthly_stats(data = flow_data,
start_year = 1980,
percentiles = 10)
# Plot monthly statistics for water years starting in October
results <- plot_monthly_stats(station_number = "08NM116",
start_year = 1980,
end_year = 2010,
water_year_start = 10,
percentiles = 10)
}
# }
Run the code above in your browser using DataLab