class: center, middle, inverse, title-slide # Open source reporting tools for the PEP Monitoring Collaborative: Beach Pathogens and Dissolved Oxygen ###
Dr. Marcus Beck
•
@fawda123
•
#TampaBayOpensci
### Peconic Estuary WQ Monitoring Collaborative, Tampa Bay Estuary Program ### 1/29/2021 --- class: left, top .center[ ## AGENDA FOR TODAY ] 1. Brief review of PEP reporting tools: `peptools` R package 1. Development of beach pathogen reporting 1. Development of dissolved oxygen reporting --- class: left, top .center[ ## GOALS FOR TODAY ] 1. Vibe check: do we like these approaches? 1. Discuss decision points on pathogen reporting 1. Discuss decision points on dissolved oxygen reporting --- class: center, top ## `peptools` R PACKAGE <img src="figure/pepintro.PNG" width="100%" style="display: block; margin: auto;" /> .footnote[[https://tbep-tech.github.io/peptools/](https://tbep-tech.github.io/peptools/)] --- class: center, top ## `peptools` R PACKAGE <img src="figure/pepfuncs2.png" width="90%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## PAST DECISIONS ] * Consider existing LTM datasets that can be used to assess progress in attaining CCMP goals (*Goal: Clean Waters*) -- * Spatial divisions of Peconic Estuary for applying numeric thresholds -- * Relevant thresholds and how to quantify (median vs. mean) -- * Stoplight graphic for public-facing documents, update annually --- class: left, top .center[ ## IT'S SUPER SIMPLE... ] ```r library(peptools) dat <- read_pepwq('data/currentdata.xlsx') show_thrpep(dat, bay_segment = "Western", param = "chla") ``` <img src="peptools2_files/figure-html/unnamed-chunk-4-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## ESTIMATE SEGMENT MEDIANS ] * All segment annual values based on medians, account for censored data (secchi on bottom) ```r medpep <- anlz_medpep(dat) medpep$ann ``` ``` ## # A tibble: 792 x 5 ## bay_segment yr val est var ## <fct> <dbl> <dbl> <chr> <chr> ## 1 Western 2019 3.03 lwr.ci chla ## 2 Western 2019 4.22 medv chla ## 3 Western 2019 6.26 upr.ci chla ## 4 Western 2018 3.89 lwr.ci chla ## 5 Western 2018 4.82 medv chla ## 6 Western 2018 6 upr.ci chla ## 7 Western 2017 3.58 lwr.ci chla ## 8 Western 2017 5.29 medv chla ## 9 Western 2017 7.04 upr.ci chla ## 10 Western 2016 3.14 lwr.ci chla ## # ... with 782 more rows ``` --- .center[ ## REPORTING ] * Provisional targets ([Suffolk Co 2019 SWP](https://suffolkcountyny.gov/Departments/Health-Services/Environmental-Quality#SubWWPlan)) for water clarity and secchi depth ```r peptargets ``` ``` ## # A tibble: 3 x 4 ## bay_segment name sd_thresh chla_thresh ## <fct> <chr> <dbl> <dbl> ## 1 Western Western 6.5 5.5 ## 2 Central Central 6.5 5.5 ## 3 Eastern Eastern 6.5 5.5 ``` --- .center[ ## REPORTING ] * Apply targets to annual medians ```r anlz_attainpep(medpep) ``` ``` ## # A tibble: 132 x 4 ## bay_segment yr chla_sd outcome ## <fct> <dbl> <chr> <chr> ## 1 Western 2019 2_3 red ## 2 Western 2018 2_3 red ## 3 Western 2017 2_3 red ## 4 Western 2016 0_3 yellow ## 5 Western 2015 0_2 yellow ## 6 Western 2014 0_0 green ## 7 Western 2013 1_1 yellow ## 8 Western 2012 1_2 yellow ## 9 Western 2011 1_2 yellow ## 10 Western 2010 3_3 red ## # ... with 122 more rows ``` --- class: left, top .center[ ## REPORTING ] * Annual categories depend on both a __duration__ and __magnitude__ of exceedance * Jointly considers chlorophyll and water clarity endpoints -- <img src="figure/outints.png" width="90%" style="display: block; margin: auto;" /> .center[ .footnote[[TBEP tech report #04-00](https://drive.google.com/file/d/1juhfptqA4R-Bq_XfW6nOhqFxJSorGkfq/view?usp=drivesdk)] ] --- class: left, top .center[ ## REPORTING ] * Annual categories depend on both a __duration__ and __magnitude__ of exceedance * Jointly considers chlorophyll and water clarity endpoints <img src="figure/matrixcats.png" width="80%" style="display: block; margin: auto;" /> .center[ .footnote[[TBEP tech report #04-00](https://drive.google.com/file/d/1juhfptqA4R-Bq_XfW6nOhqFxJSorGkfq/view?usp=drivesdk)] ] --- class: left, top .center[ ## REPORTING ] * Translate segment water quality conditions into annual reporting categories to inform/prioritize management actions towards CCMP goals -- * In Tampa... <span style="color:#33FF3B; text-shadow: 0 0 3px #333;">__Stay the Course__</span>: Continue planned projects. Report data via annual progress reports and Baywide Environmental Monitoring Report. <span style="color:#F9FF33; text-shadow: 0 0 3px #333;">__Caution__</span>: Review monitoring data and nitrogen loading estimates. Begin/continue TAC and Management Board development of specific management recommendations. <span style="color:#FF3333; text-shadow: 0 0 3px #333;">__On Alert__</span>: Finalize development and implement appropriate management actions to get back on track. --- class: left, top .center[ ## REPORTING ] ```r show_matrixpep(dat, asreact = TRUE, nrows = 8) ```
--- class: left, top .center[ ## REPORTING ] ```r show_plotlypep(rawdat, bay_segment = 'Western') ```
--- class: left, top .center[ ## BEACH PATHOGENS ] * 28 swimming/bathing beaches in the Peconic Estuary -- * *Enterococcus* concentrations monitored by SCDHS -- * Beaches are closed if concentrations are high -- * Data can be summarized to understand __relative risk__ of exposure -- .center[ .footnote[[https://tbep-tech.github.io/peptools/articles/pathogens.html](https://tbep-tech.github.io/peptools/articles/pathogens.html)] ] --- class: left, top .center[ ## PATHOGENS: IMPORT ] * Data are available as a spreadsheet [here](https://gisportal.suffolkcountyny.gov/gis/home/item.html?id=025cb4dadb57413980dbd7e760b94da8) <img src="figure/enteroraw.PNG" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## PATHOGENS: IMPORT ] * Import the data with [`read_pepent()`](https://tbep-tech.github.io/peptools/reference/read_pepent.html) ```r path <- system.file('extdata', 'enterodata.xlsx', package = 'peptools') entdat <- read_pepent(path) head(entdat) ``` ``` ## # A tibble: 6 x 5 ## Name FieldNum Date value status ## <chr> <chr> <dttm> <dbl> <chr> ## 1 Alberts Landing Beach EH7 2010-06-29 09:47:00 4 "<" ## 2 Alberts Landing Beach EH7 2010-07-27 09:49:00 4 "<" ## 3 Alberts Landing Beach EH7 2010-08-13 09:18:00 28 "" ## 4 Alberts Landing Beach EH7 2011-06-22 10:21:00 4 "<" ## 5 Alberts Landing Beach EH7 2011-07-20 10:57:00 4 "<" ## 6 Alberts Landing Beach EH7 2011-08-17 11:14:00 4 "<" ``` --- class: left, top .center[ ## PATHOGENS: SUMMARIZE ] * Summarize the data with [`anlz_entpep()`](https://tbep-tech.github.io/peptools/reference/anlz_entpep.html) * This creates a count of exceedances in each 24 hour period for each year and each beach -- ```r entsum <- anlz_entpep(entdat) head(entsum) ``` ``` ## # A tibble: 6 x 5 ## Name yr samples exceedances proexceedances ## <chr> <dbl> <int> <int> <dbl> ## 1 Alberts Landing Beach 2010 3 0 0 ## 2 Alberts Landing Beach 2011 3 0 0 ## 3 Alberts Landing Beach 2012 4 0 0 ## 4 Alberts Landing Beach 2013 3 0 0 ## 5 Alberts Landing Beach 2014 4 0 0 ## 6 Alberts Landing Beach 2015 3 0 0 ``` --- class: left, top .center[ ## PATHOGENS: PLOT ] * Plot the results with [`show_entmatrix()`](https://tbep-tech.github.io/peptools/reference/show_entmatrix.html) ```r show_entmatrix(entdat) ``` <img src="peptools2_files/figure-html/unnamed-chunk-15-1.png" width="100%" height="60%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## PATHOGENS: DISCUSS ] * This plot communicates exposure risk, NOT beach closures -- * Exceedances based on concentrations above 104 cfu/100 mL -- * We can change this... --- class: left, top .center[ ## PATHOGENS: DISCUSS ] * Changing the default arguments... ```r show_entmatrix(entdat, thr = 35) ``` <img src="peptools2_files/figure-html/unnamed-chunk-16-1.png" width="100%" height="60%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## DISSOLVED OXYGEN ] * Two continuous USGS monitoring stations in Peconic Estuary -- * Peconic River (01304562) and Orient Harbor (01304200) -- * Data can be summarized to understand hypoxia frequency/duration -- .center[ .footnote[[https://tbep-tech.github.io/peptools/articles/dissolvedoxygen.html](https://tbep-tech.github.io/peptools/articles/dissolvedoxygen.html)] ] --- class: left, top .center[ ## DO: IMPORT ] * Data can be downloaded directly from USGS data source with [`read_pepdo()`](https://tbep-tech.github.io/peptools/reference/read_pepdo.html) ```r exdat <- read_pepdo(site = c('01304562', '01304200'), nms = c('Peconic R.', 'Orient Harbor'), startDate = '2013-01-01', endDate = '2020-06-30') head(exdat) ``` ``` ## site DateTime do_mgl ## 1 Orient Harbor 2013-01-01 00:00:00 11.2 ## 2 Orient Harbor 2013-01-01 00:06:00 11.2 ## 3 Orient Harbor 2013-01-01 00:12:00 11.2 ## 4 Orient Harbor 2013-01-01 00:18:00 11.2 ## 5 Orient Harbor 2013-01-01 00:24:00 11.2 ## 6 Orient Harbor 2013-01-01 00:30:00 11.2 ``` --- class: left, top .center[ ## DO: IMPORT ] <img src="peptools2_files/figure-html/unnamed-chunk-19-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## DO: IMPORT ] <img src="peptools2_files/figure-html/unnamed-chunk-20-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## CHALLENGES WITH DO DATA ] * DO data have diurnal and seasonal variation, how can we summarize this to quantify hypoxia stress? -- * Hypoxia can have both acute and chronic impacts, how can we summarize the DO data to express magnitude and duration of hypoxia? --- class: left, top .center[ ## DO: SUMMARIZE ] * Summarize the data with [`anlz_domopep()`](https://tbep-tech.github.io/peptools/reference/anlz_domopep.html) -- * Gets the following for each month: * Mean daily DO * Proportion of days with low DO (magnitude) * Max run of days with low DO (duration) --- class: left, top .center[ ## DO: SUMMARIZE ] * Summarize the data with [`anlz_domopep()`](https://tbep-tech.github.io/peptools/reference/anlz_domopep.html) ```r anlz_domopep(dodat, thr = 3) ``` ``` ## # A tibble: 189 x 6 ## site yr mo do_mgl below_ave below_maxrun ## * <fct> <dbl> <ord> <dbl> <dbl> <dbl> ## 1 Peconic River 2013 Jan 11.6 0 0 ## 2 Peconic River 2013 Feb 11.9 0 0 ## 3 Peconic River 2013 Mar 11.7 0 0 ## 4 Peconic River 2013 Apr 9.55 0 0 ## 5 Peconic River 2013 May 7.90 0 0 ## 6 Peconic River 2013 Jun 5.73 0.3 5 ## 7 Peconic River 2013 Jul 3.12 1 27 ## 8 Peconic River 2013 Aug 3.13 1 24 ## 9 Peconic River 2013 Sep 4.81 0.655 6 ## 10 Peconic River 2013 Oct 6.03 0.348 7 ## # ... with 179 more rows ``` --- class: left, top .center[ ## DO: PLOT ] * Plot the results with [`show_domatrix()`](https://tbep-tech.github.io/peptools/reference/show_domatrix.html) ```r show_domatrix(dodat, thr = 3, show = 'below_ave') ``` <img src="peptools2_files/figure-html/unnamed-chunk-22-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## DO: PLOT ] * Plot the results with [`show_domatrix()`](https://tbep-tech.github.io/peptools/reference/show_domatrix.html) ```r show_domatrix(dodat, thr = 3, show = 'below_maxrun') ``` <img src="peptools2_files/figure-html/unnamed-chunk-23-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## DO: PLOT ] * Plot the results with [`show_domatrix()`](https://tbep-tech.github.io/peptools/reference/show_domatrix.html) ```r show_domatrix(dodat, thr = 4.8, show = 'below_ave') ``` <img src="peptools2_files/figure-html/unnamed-chunk-24-1.png" width="100%" style="display: block; margin: auto;" /> --- class: left, top .center[ ## DO: DISCUSS ] * The summaries show relative hypoxia stress between locations, with stress quantified as magnitude or duration -- * What is the relevance of the threshold to a meaningful endpoint? -- * Are there breakpoints we need to consider? -- * What can we reasonably say about the spatial extent of hypoxia? --- class: left, top .center[ ## RESOURCES ] * Pathogens vignette: [link](https://tbep-tech.github.io/peptools/articles/pathogens.html) * Dissolved oxygen vignette: [link](https://tbep-tech.github.io/peptools/articles/dissolvedoxygen.html) * Package overview vignette: [link](https://tbep-tech.github.io/peptools/articles/Introduction.html) * `peptools` package website: [link](https://tbep-tech.github.io/peptools/) * `peptools` GitHub source: [link](https://github.com/tbep-tech/peptools) --- class: left, top .center[ ## GOALS FOR TODAY ] 1. Vibe check: do we like these approaches? 1. Discuss decision points on pathogen reporting 1. Discuss decision points on dissolved oxygen reporting