Calculates a suite of hydrologic indices for daily time series data that are widely used in hydrology and stream ecology.
hydrostats is a set of tools to compute streamflow indices commonly used in hydrology and ecology such as:
Most of the functions can be used with the packages plyr and dplyr to return a dataframe of indices based on an additional grouping variable. This allows the analysis (for example) of data from multiple gauges simultaneously, without the need to write a for loop. While most functions return a single row dataframe, several functions will instead return a dataframe of individual spell charactersistics for use in subsequent analysis and plotting.
#Installation To install the latest development version run the following code:
Current version on github and CRAN is 0.2.5.
# install dependencies/suggests:
# devtools required only to install from Github;
# plyr required for examples
install.packages(c("devtools", "plyr"))
#install pacakge
devtools::install_github("nickbond/hydrostats")
# Remove the package zip after installation
unlink("hydrostats.zip")
#Developer Nick Bond n.bond@latrobe.edu.au
BUG FIXES AND MINOR IMPROVEMENTS *The high.spells function was fixed to correct an error in the calculation of summary statistics for peaks (mean and sd). Formerly these included all flows above the threshold. (Thanks to Scott Hardie for picking this up).
*The Colwells function was modified to use log base 2 for the entropy calculations. This value can now be set by the user. (Thanks to Benedikt Heudorfer for modifying the code to include this functionality).
*A typo was corrected in the monthly.cv function help file to allow the examples to run correctly. (Thanks to Sunny Yu).
BUG FIXES AND MINOR IMPROVEMENTS
The high.spell.lengths function was fixed so that missing values do not result in incorrect start dates being returned (Thanks to Bastian Pöschl).
Fixed a typo in the help for daily.cv (Thanks to Tony Ladson).
The baseflows function now reflects the start and end values from the time-series (n.reflected) before calculating the baseflow component to reduce sensitivity to the starting conditions (as recommended by Ladson, A. R., R. Brown, B. Neal and R. Nathan (2013). “A standard approach to baseflow separation using the Lyne and Hollick filter.” Australian Journal of Water Resources 17(1): 173-180.).
corrected year count in the baseflow function.
BUG FIXES AND MINOR IMPROVEMENTS
Modified a number of functions (including partial.series and baseflow) to prevent an error when used with group_by and 'do' from the dplyr package (useful for analysing multiple flow series simultaneously).
added minimum and median spell duration to the results returned by the low.spells and high.spells functions.
added number of years and ARI to the partial series output.
fixed an error in high.spells and low.spells, which could produce an error in the duration statistics for annual series.
BUG FIXES AND MINOR IMPROVEMENTS
BUG FIXES AND MINOR IMPROVEMENTS
fixed a bug in baseflow function that caused issues when date and discharge data were in columns other than columns 1 and 2.
added to Colwells function the ability to output a dataframe of the indices only.
shifted the reporting of record length from high.spells to baseflows function so that if outputs are combined in a dataframe, record length is now the first variable if baseflows is the first function run.
various corrections/edits to the manual pages.