`R/compute_hydat_peak_frequencies.R`

`compute_hydat_peak_frequencies.Rd`

Performs a volume frequency analysis on annual peak statistics (instantaneous minimums or maximums) extracted from
HYDAT. Calculates statistics from all years, unless specified. The `data`

argument is not available. Analysis
methodology replicates that from HEC-SSP. Returns a list of tibbles
and plots.

compute_hydat_peak_frequencies( station_number, use_max = FALSE, use_log = FALSE, prob_plot_position = c("weibull", "median", "hazen"), prob_scale_points = c(0.9999, 0.999, 0.99, 0.9, 0.5, 0.2, 0.1, 0.02, 0.01, 0.001, 1e-04), fit_distr = c("PIII", "weibull"), fit_distr_method = ifelse(fit_distr == "PIII", "MOM", "MLE"), fit_quantiles = c(0.975, 0.99, 0.98, 0.95, 0.9, 0.8, 0.5, 0.2, 0.1, 0.05, 0.01), start_year, end_year, exclude_years, plot_curve = TRUE )

station_number | A character string vector of seven digit Water Survey of Canada station numbers (e.g. |
---|---|

use_max | Logical value to indicate using maximums rather than the minimums for analysis. Default |

use_log | Logical value to indicate log-scale transforming of flow data before analysis. Default |

prob_plot_position | Character string indicating the plotting positions used in the frequency plots, one of |

prob_scale_points | Numeric vector of probabilities to be plotted along the X axis in the frequency plot. Inverse of
return period. Default |

fit_distr | Character string identifying the distribution to fit annual data, one of |

fit_distr_method | Character string identifying the method used to fit the distribution, one of |

fit_quantiles | Numeric vector of quantiles to be estimated from the fitted distribution.
Default |

start_year | Numeric value of the first year to consider for analysis. Leave blank to use the first year of the source data. |

end_year | Numeric value of the last year to consider for analysis. Leave blank to use the last year of the source data. |

exclude_years | Numeric vector of years to exclude from analysis. Leave blank to include all years. |

plot_curve | Logical value to indicate plotting the computed curve on the probability plot. Default |

A list with the following elements:

Data frame with computed annual summary statistics used in analysis.

Data frame with co-ordinates used in frequency plot.

ggplot2 object with frequency plot

List of fitted objects from fitdistrplus.

Data frame with fitted quantiles.

if (FALSE) { # Working examples (see arguments for further analysis options): # Compute an annual peak frequency analysis using default arguments (instantaneous lows) results <- compute_hydat_peak_frequencies(station_number = "08NM116", start_year = 1980, end_year = 2010) # Compute an annual peak frequency analysis using default arguments (instantaneous highs) results <- compute_hydat_peak_frequencies(station_number = "08NM116", start_year = 1980, end_year = 2010, use_max = TRUE) }