https://github.com/lter/heron
HERON: HElpers for River ObservatioN
https://github.com/lter/heron
data-science lter-science r r-package
Last synced: 6 months ago
JSON representation
HERON: HElpers for River ObservatioN
- Host: GitHub
- URL: https://github.com/lter/heron
- Owner: lter
- License: other
- Created: 2022-09-30T16:11:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T16:48:24.000Z (almost 2 years ago)
- Last Synced: 2025-03-20T09:40:32.741Z (over 1 year ago)
- Topics: data-science, lter-science, r, r-package
- Language: R
- Homepage: https://lter.github.io/HERON/
- Size: 404 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>",
fig.path = "man/figures/README-", out.width = "100%")
```
# `HERON` - *HE*lpers for *R*iver *O*bservatio*N*
[](https://github.com/lter/HERON/actions/workflows/R-CMD-check.yaml)



The goal of HERON is to provide a suite of helpful supplementary functions for workflows involving the `EGRET` and `SiZer` R packages.
## Installation
You can install the development version of HERON from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("lter/HERON")
```
## `HERON` Functions
Here are the functions currently included in `HERON`:
### `EGRET` Helper Functions
- **`egret_report`**: Generate a coarse PDF report containing plots of `EGRET` function outputs. Useful for quickly characterizing a suite of patterns in the data though allows little aesthetic customization and is thus best used only for this preliminary "first look"
- **`egret_trends`**: Calculates flow normalized concentration and flux using `EGRET::tableChangeSingle` and exports a single data object containing both datasets (includes a column named "Metric" to help users split the objects *post hoc*)
### `SiZer` Helper Functions
- **`sizer_slice`**: Extract the `SiZer`-identified slope for a specified bandwidth and returns this information as a dataframe
- **`sizer_aggregate`**: Aggregate `SiZer`-identified slope types across all bandwidths and return this information as a dataframe
- **`sizer_plot`**: Creates base R plot of `SiZer` object with horizontal lines at specified bandwidths
- **`id_slope_changes`**: Migrate slope changes identified by `SiZer::SiZer` information into the supplied data object
- **`id_inflections`**: Migrate inflection points implied by `SiZer::SiZer` information ("implied" because it only identifies slope changes to/from flat slopes) into the supplied data object
- **`sizer_ggplot`**: Creates `ggplot2` plot of trendline with inflection points and/or slope changes identified by `SiZer` included as vertical lines. Also allows specification of type of trendline to fit to data
- **`sizer_lm`**: Fits linear regressions on each "chunk" of the trendline (i.e., sections of trendline that share a common slope as identified by `id_inflections` or `id_slope_changes`)
### Misc. Other Functions
- **`hydro_day`**: Accepts a calendar date and converts it into an equivalent "hydro day". Allows user to specify the first month of the hydrologic year as this may differ by hemisphere