-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
157 lines (122 loc) · 7.02 KB
/
README.Rmd
File metadata and controls
157 lines (122 loc) · 7.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
title: "ReadMe"
output: md_document
always_allow_html: yes
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- rmarkdown::render(input="README.Rmd", output_file = "README.md", output_format = "md_document") -->
```{r, echo = FALSE, message = FALSE, warning = FALSE}
library(dplyr)
library(tidyr)
library(knitr)
library(kableExtra)
library(RegionalCurve)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
<img src="man/figures/rc-3-logo.png" width="250" align="right"/>
# RegionalCurve
An R Package of Hydraulic Regional Curve Relationships
## Package Status
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://www.repostatus.org/#active)
[](commits/master)
[)`-yellowgreen.svg)](/commits/main)
[](http://choosealicense.com/licenses/cc0-1.0/)
[](#)
[](https://choosealicense.com/licenses/cc0-1.0/)
[](https://codecov.io/gh/FluvialGeomorph/RegionalCurve)
<!-- badges: end -->
## 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:
- Compiling regional hydraulic relationships into a single database.
- Providing assessor functions to streamline application of these
relationships in other studies.
## Funding
<img src="man/figures/chl.png" width=125 align="right" />
Funding for development and maintenance of FluvialGeomorph has been provided by the following US Army Corps of Engineers (USACE) programs:
* [Flood and Coastal Risk Management](https://www.erdc.usace.army.mil/Locations/CHL/Flood-Coastal-Risk-Management/)
* [Ecosystem Management and Restoration Research Program (EMRRP)](https://emrrp.el.erdc.dren.mil)
* [Regional Sediment Management Program (RSM)](https://rsm.usace.army.mil/)
* [Mississippi River Geomorphology and Potamology Program (MRG&P)](https://www.mvd.usace.army.mil/Missions/Mississippi-River-Science-Technology/MS-River-Geomorphology-Potamology/)
* [Flood Risk Management Program (FRM)](https://www.iwr.usace.army.mil/Missions/Flood-Risk-Management/Flood-Risk-Management-Program/)
* [Engineering With Nature (EWN)](https://ewn.el.erdc.dren.mil/)
<p float="left">
<img src="man/figures/chl.png" height=75 />
<img src="man/figures/EMRRP_logo_200.png" height=75 />
<img src="man/figures/RSM_200.png" height=75 />
<img src="man/figures/MRG&P_300.png" height=75 />
<img src="man/figures/FRMP_200.png" height=75 />
<img src="man/figures/SilverJackets_200.png" height=75 />
<img src="man/figures/EWN_200.png" height=75 />
</p>
## Authors
* Christopher Haring, Fluvial Geomorphologist/Research Physical Scientist, U.S. Army Corps of Engineers
<div itemscope itemtype="https://schema.org/Person"><a itemprop="sameAs" content="https://orcid.org/0009-0004-3834-9811" href="https://orcid.org/0009-0004-3834-9811" target="orcid.widget" rel="me noopener noreferrer" style="vertical-align:top;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" alt="ORCID iD icon" style="width:1em;margin-right:.5em;"/>https://orcid.org/0009-0004-3834-9811</a></div>
* Michael Dougherty, Geographer, U.S. Army Corps of Engineers
<div itemscope itemtype="https://schema.org/Person"><a itemprop="sameAs" content="https://orcid.org/0000-0002-1465-5927" href="https://orcid.org/0000-0002-1465-5927" target="orcid.widget" rel="me noopener noreferrer" style="vertical-align:top;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" style="width:1em;margin-right:.5em;" alt="ORCID iD icon">https://orcid.org/0000-0002-1465-5927</a></div>
## Install
To install the `RegionalCurve` package, install from GitHub using the
`remotes` package:
``` r
remotes::install_github(repo = "FluvialGeomorph/RegionalCurve@*release)
```
## 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`).
``` r
# 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.
``` r
# 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.
``` r
# 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.
```{r list_regions, echo=FALSE, fig.cap="Regional Hydraulic Dimension by Drainage Area Studies Included in this Package.", message = FALSE, warning = FALSE}
# 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"))
```