compute_hydat_peak_frequencies {fasstr} | R Documentation |
Perform a frequency analysis on annual peak statistics from HYDAT
Description
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.
Usage
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
)
Arguments
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 or set well before start date (i.e.
|
end_year |
Numeric value of the last year to consider for analysis. Leave blank or set well after end date (i.e.
|
exclude_years |
Numeric vector of years to exclude from analysis. Leave blank or set to |
plot_curve |
Logical value to indicate plotting the computed curve on the probability plot. Default |
Value
A list with the following elements:
Freq_Analysis_Data |
Data frame with computed annual summary statistics used in analysis. |
Freq_Plot_Data |
Data frame with co-ordinates used in frequency plot. |
Freq_Plot |
ggplot2 object with frequency plot |
Freq_Fitting |
List of fitted objects from fitdistrplus. |
Freq_Fitted_Quantiles |
Data frame with fitted quantiles. |
See Also
Examples
## Not run:
# 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)
## End(Not run)