tbeptools

tbeptools: An R package for synthesizing estuarine data for environmental research - Published in JOSS (2021)

https://github.com/tbep-tech/tbeptools

Science Score: 95.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
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 8 committers (12.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

data-analysis package tampa-bay tbep water-quality

Keywords from Contributors

mesh
Last synced: 6 months ago · JSON representation

Repository

R package for Tampa Bay Estuary Program functions

Basic Info
Statistics
  • Stars: 10
  • Watchers: 6
  • Forks: 3
  • Open Issues: 0
  • Releases: 7
Topics
data-analysis package tampa-bay tbep water-quality
Created almost 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License

README.md

tbeptools

R-CMD-check pkgdown DOI Codecov test coverage tbeptools status badge DOI <!-- badges: end -->

R package for Tampa Bay Estuary Program functions. Please see the vignettes for a full description.

Installation

The package can be installed from r-universe. The source code is available on the tbep-tech GitHub group web page: https://github.com/tbep-tech/tbeptools. Note that tbeptools only needs to be installed once, but it needs to be loaded every new R session (i.e., library(tbeptools)).

```r

enable repos

options(repos = c( tbeptech = 'https://tbep-tech.r-universe.dev', CRAN = 'https://cloud.r-project.org'))

install tbeptools

install.packages('tbeptools')

load tbeptools

library(tbeptools) ```

After the package is loaded, you can view the help files for each function by typing a question mark followed by the function name, e.g., ?read_importwq, on the console. The help files provide a brief description of what each function does and the required arguments that are needed to run the function.

Package vignettes

The vignettes are organized by topic and are an excellent place to start for understanding how to use the package. Currently, there are six vignettes available for tbeptools:

  • Water Quality Data: Overview of functions for working with water quality data and the water quality report card
  • Tampa Bay Nekton Index: Overview of functions to import, analyze, and plot results for the Tampa Bay Nekton Index
  • Tampa Bay Benthic Index: Overview of functions to import data for Tampa Bay Benthic Index, under development
  • Tidal Creeks Assessment: Overview of functions to import, analyze, and plot results for the assessment of tidal creeks in southwest Florida
  • Seagrass Transect Data: Overview of functions to import, analyze, and plot results for the seagrass transect data collected in Tampa Bay
  • Habitat Master Plan: Overview of functions to analyze and create a report card for the Tampa Bay Habitat Master Plan 2020 update
  • Fecal Indicator Bacteria: Overview of functions to import, analyze, and plot results for Fecal Indicator Bacteria (FIB)

Usage

The core functions in tbeptools are in three categories based on mode of use. Each function is named using a prefix for the mode of use, followed by what the function does. The prefixes are:

  • read: Import current data from the main site.

  • anlz: Analyze or summarize the imported data.

  • show: Create a plot of the analyzed data.

The functions can be easily found in RStudio after loading the package and typing the prefix at the command line. An autofill dialog box will pop up showing all functions that apply for the prefix. This eliminates the need for searching for individual functions if all you know is the category of function you need (e.g., read, anlz, or show).

Each function also includes a semi-descriptive suffix that generally describes what category it applies to (e.g, water quality, seagrass) and what it does (e.g., imports, formats). These follow a loose convention that attempts to strike a balance between description and brevity. The optimal balance is often hard to achieve. To aid in understanding, we provide a brief description of suffixes that are used more than once.

Suffix descriptions:

  • attain: Analyze functions that summarize data relative to attainment categories specific to bay segments
  • ave, med: Analyze functions that summarize data into averages or medians
  • benthic: Applies to benthic monitoring data used for the Tampa Bay Benthic Index
  • entero: Applies to Enterococcus, a specific type of Fecal Indicator Bacteria, when fib functions are not applicable
  • fib: Applies generally to Fecal Indicator Bacteria
  • fim: Applies to data from the Fisheries Independent Monitoring program used for the Tampa Bay Nekton Index
  • form: An intermediate function for formatting imported data for downstream analysis
  • hmp: Functions that work with Habitat Master Plan data
  • import: A function used to import data from a source external to the package
  • indic: A function that analyzes or plots individual tidal creek indicator values, as opposed to integrated creek scores
  • iwr: Functions or data that apply to the Impaired Waters Rule (IWR) data maintained by the Florida Department of Environmental Protection used as source data for the tidal creek functions
  • matrix: A plotting function that creates a report card style matrix
  • met: A function that analyses or plots individual metrics for integrated indices, e.g., TBBI, TBNI
  • phyto: Applies to phytoplankton data from the Hillsborough County Environmental Protection Commission
  • plotly: A plotting function that returns an interactive plotly object
  • scr: A function that analyses or plots summary scores for integrated indices, e.g., TBBI, TBNI
  • seg, site: Functions that analyze or plot results relative to bay segments or individual monitoring sites
  • tbbi: Applies to the Tampa Bay Benthic Index (TBBI)
  • tbni: Applies to the Tampa Bay Nekton Index (TBNI)
  • tdlcrk: Applies to tidal creeks
  • transect: Applies to seagrass transect data
  • wq: Applies to water quality

The function reference page can also be viewed for a complete list of functions organized by category, a description of what they do, and links to the help files.

The following example demonstrates use of a subset of the functions for water quality data to read a file from the Hillsborough County Environmental Protection Commission long-term monitoring dataset (available from https://www.tampabay.wateratlas.usf.edu/), analyze monthly and annual averages by major bay segments of Tampa Bay, and plot an annual time series for one of the bay segments.

```r

load the package

library(tbeptools)

read current data

wqdat <- readimportwq(xlsx = "wqdata.xlsx", downloadlatest = TRUE) wqdat ```

```

# A tibble: 26,611 x 22

baysegment epchcstation SampleTime yr mo

1 HB 6 2021-06-08 10:59:00 2021 6

2 HB 7 2021-06-08 11:13:00 2021 6

3 HB 8 2021-06-08 14:15:00 2021 6

4 MTB 9 2021-06-08 13:14:00 2021 6

5 MTB 11 2021-06-08 11:30:00 2021 6

# ... with 26,606 more rows, and 17 more variables:

# Latitude , Longitude , TotalDepthm ,

# SampleDepthm , tn , tnq , sdm ,

# sdrawm , sdq , chla , chlaq ,

# SalTopppth , SalMidppth ,

# SalBottomppth , TempWaterTop_degC ,

# TempWaterMid_degC , ...

```

```r

analyze monthly and annual means by bay segment

avedat <- anlz_avedat(wqdat) avedat ```

```

$ann

# A tibble: 584 x 4

yr bay_segment var val

1 1974 HB mean_chla 22.4

2 1974 LTB mean_chla 4.24

3 1974 MTB mean_chla 9.66

4 1974 OTB mean_chla 10.2

5 1975 HB mean_chla 27.9

# ... with 579 more rows

$mos

# A tibble: 4,484 x 5

bay_segment yr mo var val

1 HB 1974 1 mean_chla 36.2

2 LTB 1974 1 mean_chla 1.75

3 MTB 1974 1 mean_chla 11.5

4 OTB 1974 1 mean_chla 4.4

5 HB 1974 2 mean_chla 42.4

# ... with 4,479 more rows

```

```r

show annual time series of chlorophyll for Hillsborough bay segment

showthrplot(wqdat, baysegment = "HB", yrrng = c(1975, 2020)) ```

Functions in tbeptools also support the creation of content for interactive, online dashboards that can facilitate more informed decisions without requiring an intimate understanding of the R programming language or the methods for analysis. These dashboards include assessments for water quality, seagrasses, nekton communities, and tidal creeks.

Issues and suggestions

Please report any issues and suggestions on the issues link for the repository. A guide to posting issues can be found here.

Contributing

Please view our contributing guidelines for any changes or pull requests.

Owner

  • Name: Tampa Bay Estuary Program
  • Login: tbep-tech
  • Kind: organization
  • Email: mbeck@tbep.org
  • Location: St. Petersburg, FL 33701

Tampa Bay Estuary Program is an independent, special district of the State of Florida, and 1 of 28 national estuary programs administered by the USEPA.

JOSS Publication

tbeptools: An R package for synthesizing estuarine data for environmental research
Published
September 17, 2021
Volume 6, Issue 65, Page 3485
Authors
Marcus W. Beck ORCID
Tampa Bay Estuary Program, St. Petersburg, Florida, USA
Meagan N. Schrandt ORCID
Fish and Wildlife Research Institute, Florida Fish and Wildlife Conservation Commission, St. Petersburg, Florida, USA
Michael R. Wessel
Janicki Environmental, Inc., St. Petersburg, Florida, USA
Edward T. Sherwood ORCID
Tampa Bay Estuary Program, St. Petersburg, Florida, USA
Gary E. Raulerson ORCID
Tampa Bay Estuary Program, St. Petersburg, Florida, USA
Adhokshaja Achar Budihal Prasad ORCID
University of South Florida, Tampa, Florida, USA
Benjamin D. Best ORCID
EcoQuants, LLC, Santa Barbara, California, USA
Editor
Kristen Thyng ORCID
Tags
estuary Tampa Bay water quality reporting

GitHub Events

Total
  • Create event: 1
  • Release event: 2
  • Issues event: 3
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 193
Last Year
  • Create event: 1
  • Release event: 2
  • Issues event: 3
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 193

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 1,041
  • Total Committers: 8
  • Avg Commits per committer: 130.125
  • Development Distribution Score (DDS): 0.089
Past Year
  • Commits: 223
  • Committers: 3
  • Avg Commits per committer: 74.333
  • Development Distribution Score (DDS): 0.274
Top Committers
Name Email Commits
fawda123 m****2@g****m 948
Ben Best b****n@e****m 57
Kim Cressman k****m@c****m 17
mikewessel w****i@g****m 7
dependabot[bot] 4****] 5
esherwoo77 e****d@t****g 3
fawda123 b****k@a****u 3
Meagan N Schrandt 5****d 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 54
  • Total pull requests: 7
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 1 day
  • Total issue authors: 8
  • Total pull request authors: 3
  • Average comments per issue: 1.28
  • Average comments per pull request: 0.14
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 20 days
  • Average time to close pull requests: less than a minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • fawda123 (26)
  • Gmangrove (15)
  • paleolimbot (4)
  • esherwoo77 (3)
  • bbest (2)
  • mikewessel (2)
  • 7yl4r (1)
  • richardsc (1)
Pull Request Authors
  • dependabot[bot] (5)
  • swmpkim (2)
  • fawda123 (2)
Top Labels
Issue Labels
enhancement (23) bug (1) question (1)
Pull Request Labels
dependencies (5)

Dependencies

DESCRIPTION cran
  • R >= 3.6 depends
  • methods * depends
  • dataRetrieval * imports
  • dplyr * imports
  • ggplot2 * imports
  • jsonlite * imports
  • leaflet * imports
  • lubridate * imports
  • mapview * imports
  • patchwork * imports
  • plotly * imports
  • purrr * imports
  • reactable * imports
  • readxl * imports
  • rnoaa * imports
  • sf * imports
  • tibble * imports
  • tidyr * imports
  • tools * imports
  • bookdown * suggests
  • covr * suggests
  • ggmap * suggests
  • ggrepel * suggests
  • ggsn * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite