Skip to content

Commit

Permalink
update 2023 benthic and sediment data
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Dec 12, 2024
1 parent f0172c7 commit 1ba5699
Show file tree
Hide file tree
Showing 38 changed files with 59 additions and 59 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tbeptools
Title: Data and Indicators for the Tampa Bay Estuary Program
Version: 3.0.0.9006
Date: 2024-12-03
Version: 3.0.0.9007
Date: 2024-12-12
Authors@R: c(
person(given = "Marcus",
family = "Beck",
Expand Down
2 changes: 1 addition & 1 deletion R/anlz_sedimentaddtot.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#'
#' @examples
#' anlz_sedimentaddtot(sedimentdata)
anlz_sedimentaddtot <- function(sedimentdata, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', param = NULL, pelave = TRUE){
anlz_sedimentaddtot <- function(sedimentdata, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', param = NULL, pelave = TRUE){

# make yrrng two if only one year provided
if(length(yrrng) == 1)
Expand Down
2 changes: 1 addition & 1 deletion R/anlz_sedimentave.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @examples
#' anlz_sedimentave(sedimentdata, param = 'Arsenic')
anlz_sedimentave <- function(sedimentdata, param, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){
anlz_sedimentave <- function(sedimentdata, param, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){

# add totals
sedimentdata <- anlz_sedimentaddtot(sedimentdata, yrrng = yrrng, bay_segment = bay_segment,
Expand Down
2 changes: 1 addition & 1 deletion R/anlz_sedimentpel.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#'
#' @examples
#' anlz_sedimentpel(sedimentdata)
anlz_sedimentpel <- function(sedimentdata, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){
anlz_sedimentpel <- function(sedimentdata, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){

# combine all, take average, get grade
out <- anlz_sedimentaddtot(sedimentdata, yrrng = yrrng, bay_segment = bay_segment, funding_proj = funding_proj, pelave = TRUE) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/anlz_sedimentpelave.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#' @examples
#' anlz_sedimentpelave(sedimentdata)
anlz_sedimentpelave <- function(sedimentdata, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){
anlz_sedimentpelave <- function(sedimentdata, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP'){

levs <- c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB')

Expand Down
2 changes: 1 addition & 1 deletion R/anlz_tbbimed.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @examples
#' tbbiscr <- anlz_tbbiscr(benthicdata)
#' anlz_tbbimed(tbbiscr)
anlz_tbbimed <- function(tbbiscr, bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB', 'All', 'All (wt)'), rev = FALSE, yrrng = c(1993, 2022)) {
anlz_tbbimed <- function(tbbiscr, bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB', 'All', 'All (wt)'), rev = FALSE, yrrng = c(1993, 2023)) {

# sanity checks
stopifnot(length(yrrng) == 2)
Expand Down
4 changes: 2 additions & 2 deletions R/benthicdata.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Benthic data for the Tampa Bay Benthic Index current as of 03132024
#' Benthic data for the Tampa Bay Benthic Index current as of 20241212
#'
#' Benthic data for the Tampa Bay Benthic Index current as of 03132024
#' Benthic data for the Tampa Bay Benthic Index current as of 20241212
#'
#' @format A nested \code{\link[tibble]{tibble}} with 3 rows and 2 variables:
#' \describe{
Expand Down
6 changes: 3 additions & 3 deletions R/sedimentdata.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Sediment data for the Tampa Bay current as of 12142023
#' Sediment data for the Tampa Bay current as of 20241212
#'
#' Sediment data for the Tampa Bay current as of 12142023
#' Sediment data for the Tampa Bay current as of 20241212
#'
#' @format A \code{data.frame} with 216627 rows and 24 variables:
#' @format A \code{data.frame} with 226589 rows and 24 variables:
#' \describe{
#' \item{ProgramId}{int}
#' \item{ProgramName}{chr}
Expand Down
2 changes: 1 addition & 1 deletion R/show_sedimentalratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#'
#' @examples
#' show_sedimentalratio(sedimentdata, param = 'Arsenic')
show_sedimentalratio <- function(sedimentdata, param, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){
show_sedimentalratio <- function(sedimentdata, param, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){

# check paramater is an available metal
metals <- sedimentdata %>%
Expand Down
2 changes: 1 addition & 1 deletion R/show_sedimentave.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @examples
#' show_sedimentave(sedimentdata, param = 'Arsenic')
show_sedimentave <- function(sedimentdata, param, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){
show_sedimentave <- function(sedimentdata, param, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){

toplo <- anlz_sedimentave(sedimentdata, param = param, yrrng = yrrng, bay_segment = bay_segment, funding_proj = funding_proj)

Expand Down
2 changes: 1 addition & 1 deletion R/show_sedimentmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#'
#' @examples
#' show_sedimentmap(sedimentdata, param = 'Arsenic')
show_sedimentmap <- function(sedimentdata, param, yrrng = c(1993, 2022), funding_proj = 'TBEP', weight = 1.5){
show_sedimentmap <- function(sedimentdata, param, yrrng = c(1993, 2023), funding_proj = 'TBEP', weight = 1.5){

# add totals
sedimentdata <- anlz_sedimentaddtot(sedimentdata, yrrng = yrrng, funding_proj = funding_proj, param = param, pelave = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/show_sedimentpelave.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#'
#' @examples
#' show_sedimentpelave(sedimentdata)
show_sedimentpelave <- function(sedimentdata, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', alph = 1, ylim = c(0, 0.4), lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){
show_sedimentpelave <- function(sedimentdata, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', alph = 1, ylim = c(0, 0.4), lnsz = 1, base_size = 12, plotly = FALSE, family = NA, width = NULL, height = NULL){

# get avg pel ratios by station, then get averages
toplo <- anlz_sedimentpelave(sedimentdata, yrrng = yrrng, bay_segment = bay_segment, funding_proj = funding_proj)
Expand Down
2 changes: 1 addition & 1 deletion R/show_sedimentpelmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#'
#' @examples
#' show_sedimentpelmap(sedimentdata)
show_sedimentpelmap <- function(sedimentdata, yrrng = c(1993, 2022), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', weight = 1.5){
show_sedimentpelmap <- function(sedimentdata, yrrng = c(1993, 2023), bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB'), funding_proj = 'TBEP', weight = 1.5){

# map prep
tomap <- anlz_sedimentpel(sedimentdata, yrrng = yrrng, bay_segment = bay_segment, funding_proj = funding_proj) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/show_tbbimatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' tbbiscr <- anlz_tbbiscr(benthicdata)
#' show_tbbimatrix(tbbiscr)
show_tbbimatrix <- function(tbbiscr, bay_segment = c('HB', 'OTB', 'MTB', 'LTB', 'TCB', 'MR', 'BCB', 'All', 'All (wt)'),
yrrng = c(1993, 2022), alph = 1, txtsz = 3, family = NA, rev = FALSE, position = 'top',
yrrng = c(1993, 2023), alph = 1, txtsz = 3, family = NA, rev = FALSE, position = 'top',
plotly = FALSE, width = NULL, height = NULL){

# annual average by segment
Expand Down
Binary file modified data/benthicdata.RData
Binary file not shown.
Binary file modified data/sedimentdata.RData
Binary file not shown.
2 changes: 1 addition & 1 deletion man/anlz_sedimentaddtot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anlz_sedimentave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anlz_sedimentpel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anlz_sedimentpelave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anlz_tbbimed.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/benthicdata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/sedimentdata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_sedimentalratio.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_sedimentave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_sedimentmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_sedimentpelave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_sedimentpelmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/show_tbbimatrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-anlz_sedimentave.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("Checking anlz_sedimentave class", {
result <- anlz_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2022)
result <- anlz_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2023)
expect_is(result, 'tbl_df')
})
2 changes: 1 addition & 1 deletion tests/testthat/test-anlz_sedimentpel.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("Checking anlz_sedimentpel class", {
result <- anlz_sedimentpel(sedimentdata, yrrng = 2022)
result <- anlz_sedimentpel(sedimentdata, yrrng = 2023)
expect_is(result, 'tbl_df')
})
2 changes: 1 addition & 1 deletion tests/testthat/test-anlz_sedimentpelave.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("Checking anlz_sedimentpelave class", {
result <- anlz_sedimentpelave(sedimentdata, yrrng = 2022)
result <- anlz_sedimentpelave(sedimentdata, yrrng = 2023)
expect_is(result, 'tbl_df')
})
4 changes: 2 additions & 2 deletions tests/testthat/test-show_sedimentalratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ test_that("Checking show_sedimentalratio sanity checks", {


test_that("Checking show_sedimentalratio class", {
result <- show_sedimentalratio(sedimentdata, param = 'Arsenic', yrrng = 2022)
result <- show_sedimentalratio(sedimentdata, param = 'Arsenic', yrrng = 2023)
expect_is(result, 'ggplot')
})

test_that("Checking show_sedimentalratio plotly class", {
result <- show_sedimentalratio(sedimentdata, param = 'Arsenic', yrrng = 2022, plotly = T)
result <- show_sedimentalratio(sedimentdata, param = 'Arsenic', yrrng = 2023, plotly = T)
expect_is(result, 'plotly')
})
4 changes: 2 additions & 2 deletions tests/testthat/test-show_sedimentave.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
test_that("Checking show_sedimentave class", {
result <- show_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2022)
result <- show_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2023)
expect_is(result, 'ggplot')
})

test_that("Checking show_sedimentave plotly class", {
result <- show_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2022, plotly = T)
result <- show_sedimentave(sedimentdata, param = 'Arsenic', yrrng = 2023, plotly = T)
expect_is(result, 'plotly')
})
4 changes: 2 additions & 2 deletions tests/testthat/test-show_sedimentmap.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
test_that("Checking show_sedimentmap class", {
result <- show_sedimentmap(sedimentdata, param = 'Arsenic', yrrng = 2022)
result <- show_sedimentmap(sedimentdata, param = 'Arsenic', yrrng = 2023)
expect_is(result, 'leaflet')
})

test_that("Checking show_sedimentmap class, no TEL/PEL", {
result <- expect_warning(show_sedimentmap(sedimentdata, param = 'Selenium', yrrng = 2022))
result <- expect_warning(show_sedimentmap(sedimentdata, param = 'Selenium', yrrng = 2023))
expect_is(result, 'leaflet')
})
4 changes: 2 additions & 2 deletions tests/testthat/test-show_sedimentpelave.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
test_that("Checking show_sedimentpelave class", {
result <- show_sedimentpelave(sedimentdata, yrrng = 2022)
result <- show_sedimentpelave(sedimentdata, yrrng = 2023)
expect_is(result, 'ggplot')
})

test_that("Checking show_sedimentpelave plotly class", {
result <- show_sedimentpelave(sedimentdata, yrrng = 2022, plotly = T)
result <- show_sedimentpelave(sedimentdata, yrrng = 2023, plotly = T)
expect_is(result, 'plotly')
})
2 changes: 1 addition & 1 deletion tests/testthat/test-show_sedimentpelmap.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("Checking show_sedimentpelmap class", {
result <- show_sedimentpelmap(sedimentdata, yrrng = 2022)
result <- show_sedimentpelmap(sedimentdata, yrrng = 2023)
expect_is(result, 'leaflet')
})
Loading

0 comments on commit 1ba5699

Please sign in to comment.