library(dplyr)
library(tidyr)
library(knitr)
library(kableExtra)
library(RegionalCurve)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

RegionalCurve

An R Package of Hydraulic Regional Curve Relationships

Package Status

LifeCycle Project Status: Active packageversion Last-changedate Licence Dependencies License: CC0 codecov

Need

Regional hydraulic dimension relationships have been produced in great numbers since the first development of the approach by Dunne and Leopold (1978). Although these regional relationships are in wide use, the authors are not aware of a comprehensive compilation of regional hydraulic dimension relationship studies into a single database that exists as open source. The RegionalCurve package seeks to fill that gap by:

Funding

Funding for development and maintenance of FluvialGeomorph has been provided by the following US Army Corps of Engineers (USACE) programs:

Authors

Install

To install the RegionalCurve package, install from GitHub using the devtools package:

library(devtools)
install_github(repo = "FluvialGeomorph/RegionalCurve", build_vignettes = TRUE)

Vignettes

View the vignettes to get started using the package.

# View the vignettes in a web browser
browseVignettes("RegionalCurve")

# Open a specific vignette in the RStudio help window
vignette("Get_Regional_Hydraulic_Dimensions")

Calculating Hyrdaulic Dimensions

To easily use the data in this database several assessor functions were created to calculate an estimate of a specified hydraulic dimension for any given drainage area. The RHG (Regional Hydraulic Geometry) function computes the hydraulic geometry dimension (cross sectional area, width, depth, discharge) from a built-in data frame of regional hydraulic equation coefficients (regional_curve).

# Calculate the discharge for a 200 sq mi watershed in Massachusetts.
RHG(region = "MA", drainageArea = 200,   dimensionType = "width")

The units of the value returned from the RHG function will depend on the requested dimension (see the RHG function help for details). In this case, the requested dimension was width, so the units will be in feet.

To determine which regions are available, the regional_curve data frame can be queried.

# Determine the available regions
levels(regional_curve$region_name)

This list of regions can be used to determine which regions are contained in the database and the input region string value to use for the RHG function.

Once you have determined which region to use, you will need to determine which dimensions that study derived a relationship for. Not all studies derive relationships for all hydraulic dimensions.

# Determine which dimensions were calculated for the Eastern United States region
regional_curve[regional_curve$region_name == "Eastern United States", c("dimension")]

As you can see, only area, width, and depth are available. Discharge was not derived by this study.

Regional Analyses Contained in this Database

The table below lists the regional hydraulic dimension relationship studies included in this package. It lists the dimensions calculated for each regional analysis.

# Create a summary table describing dimensions available for each region
regional_curve %>%
spread(key = dimension, value = slope) %>%
group_by(region_name, reference) %>%
summarise(width     = any(width > 0), 
          depth     = any(depth > 0), 
          area      = any(area  > 0),
          discharge = any(discharge > 0)) %>%
kable(col.names = c("Region","Reference","Width","Depth","Area","Discharge")) %>%
kable_styling(bootstrap_options = c("striped", "hover"))


FluvialGeomorph/RegionalCurve documentation built on Oct. 2, 2023, 9:35 a.m.