Learn R Programming

#Hydrostats

hydrostats is a set of tools to compute streamflow indices commonly used in hydrology and ecology such as:

  • basic summary statistics

  • high spells (magnitude, frequency, duration, timing etc.)

  • low spells

  • cease-to-flow spells

  • Colwell's indices

  • partial series

  • baseflow components

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 characteristics 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.9.

# 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

Copy Link

Version

Install

install.packages('hydrostats')

Monthly Downloads

358

Version

0.2.9

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Nick Bond

Last Published

June 1st, 2022

Functions in hydrostats (0.2.9)

hydro.year

Determine hydrologic year for the purposes of deriving spell characteristics
ts.format

Format dates as POSIXct
get.days

Function to determine the number of days 365 or 366 in a given year.
high.spells

Calculates high flow spell statistics
Colwells

Colwells indices
high.spell.lengths

Calculate the length of all high flow spells
seasonality

Calculate seasonality of discharge
hydrostats

calculate hydrologic statistics
low.spell.lengths

Calculate the length of all low flow spells
recode

recode
low.spells

Calculate low flow spell statistics
monthly.cv

Calculate monthly coefficient of variation
partial.series

Partial and annual exceedence series.
ann.cv

Calculate interannual coefficient of variation
Acheron

Acheron River flow data
baseflows

Measures of central tendency and baseflow via the Lynne-Hollick (LH) baseflow filter
flood.length.max

Calculates the maximum flood length in a time series.
CTF

Cease-to-flow (CTF) spell statistics
day.dist

Calculate average timing of events (doy)
daily.cv

Calculate daily cofficient of variation
Cooper

Cooper Creek flow data
four.digit.year

Correct conversion of years to four digit format