bdrc
Fits a discharge rating curve based on the power-law and the generalized power-law from data on paired water elevation and discharge measurements in a given river using a Bayesian hierarchical model as described in Hrafnkelsson et al. (2022)
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 13 committers (7.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (19.1%) to scientific vocabulary
Keywords
Repository
Fits a discharge rating curve based on the power-law and the generalized power-law from data on paired water elevation and discharge measurements in a given river using a Bayesian hierarchical model as described in Hrafnkelsson et al. (2022)
Basic Info
- Host: GitHub
- Owner: sor16
- License: other
- Language: R
- Default Branch: master
- Homepage: https://sor16.github.io/bdrc/
- Size: 714 MB
Statistics
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 4
- Releases: 2
Topics
Metadata Files
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
)
```
## bdrc - Bayesian Discharge Rating Curves
[](https://app.codecov.io/gh/sor16/bdrc?branch=master)
[](https://github.com/sor16/bdrc/actions)
[](https://cran.r-project.org/package=bdrc)
The `bdrc` package provides tools for fitting discharge rating curves using Bayesian hierarchical models. It implements both the classical power-law and the novel generalized power-law models, offering flexibility in handling various hydrological scenarios.
This package implements four models as described in Hrafnkelsson et al. (2022):
* ```plm0() ``` - Power-law model with constant log-error variance.
* ```plm() ``` - Power-law model with stage-dependent log-error variance.
* ```gplm0() ``` - Generalized power-law model with constant log-error variance.
* ```gplm() ``` - Generalized power-law model with stage-dependent log-error variance.
## Installation
```{r, eval = FALSE}
# Install release version from CRAN
install.packages("bdrc")
# Install development version from GitHub
devtools::install_github("sor16/bdrc")
```
## Usage
Fitting a discharge rating curve with bdrc is straightforward:
```{r,eval=F}
library(bdrc)
data(krokfors)
gplm.fit <- gplm(Q ~ W, krokfors)
summary(gplm.fit)
plot(gplm.fit)
```
## Key-features
* Easy-to-use interface for fitting Bayesian discharge rating curves
* Features the novel Generalized power-law rating curve model (Hrafnkelsson et al., 2022)
* Multiple model options to suit different hydrological scenarios
* Built-in visualization tools for model results and diagnostics
* Integrates R and C++ for efficient MCMC sampling with parallel processing
## Getting started
For a deeper dive into the package's functionality, visualization options, and the underlying theory of the models, please check out our vignettes:
* [Background](https://sor16.github.io/bdrc/articles/background.html)
* [Introduction](https://sor16.github.io/bdrc/articles/introduction.html)
* [Power-law tournament (model selection)](https://sor16.github.io/bdrc/articles/tournament.html)
## References
Hrafnkelsson, B., Sigurdarson, H., Rögnvaldsson, S., Jansson, A. Ö., Vias, R. D., and Gardarsson, S. M. (2022). *Generalization of the power-law rating curve using hydrodynamic theory and Bayesian hierarchical modeling*, Environmetrics, 33(2):e2711. doi: https://doi.org/10.1002/env.2711
Owner
- Name: Sölvi Rögnvaldsson
- Login: sor16
- Kind: user
- Repositories: 17
- Profile: https://github.com/sor16
GitHub Events
Total
- Watch event: 2
- Push event: 4
Last Year
- Watch event: 2
- Push event: 4
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Sölvi Rögnvaldsson | s****6@h****s | 368 |
| sor16 | s****o@g****m | 128 |
| RafaelVias | r****s@p****m | 98 |
| Rafael Daniel Vias | V****s@t****s | 42 |
| Rafael Daníel Vias | 7****s | 29 |
| axelornj | a****8@h****s | 20 |
| axelornj | a****4@g****m | 11 |
| Rafael Daniel Vias | V****s@R****l | 9 |
| axelornj | a****3@c****u | 6 |
| Rafael | y****u@e****m | 4 |
| rcapell | r****l@g****m | 3 |
| Rafael Daniel Vias | V****s@h****s | 1 |
| Rafael Daniel Vias | V****s@r****s | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 10
- Total pull requests: 5
- Average time to close issues: about 1 month
- Average time to close pull requests: about 8 hours
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 0.9
- Average comments per pull request: 0.2
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 9
- Pull requests: 4
- Average time to close issues: about 1 month
- Average time to close pull requests: about 4 hours
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- RafaelVias (8)
- sor16 (1)
- thodson-usgs (1)
Pull Request Authors
- RafaelVias (7)
- rcapell (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 294 last-month
- Total docker downloads: 21,613
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: bdrc
Bayesian Discharge Rating Curves
- Documentation: http://cran.r-project.org/web/packages/bdrc/bdrc.pdf
- License: MIT + file LICENSE
-
Latest release: 1.1.0
published almost 3 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- ggplot2 * imports
- grid * imports
- gridExtra * imports
- rlang * imports
- scales * imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- vdiffr * suggests
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- actions/checkout v2 composite
- r-lib/actions/pr-fetch v1 composite
- r-lib/actions/pr-push v1 composite
- r-lib/actions/setup-r v1 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite