Skip to contents

Map Fecal Indicator Bacteria matrix results by year

Usage

show_fibmatmap(
  fibdata,
  yrsel,
  areasel,
  indic,
  threshold = NULL,
  lagyr = 3,
  subset_wetdry = c("all", "wet", "dry"),
  precipdata = NULL,
  temporal_window = NULL,
  wet_threshold = NULL,
  listout = FALSE,
  warn = TRUE
)

Arguments

fibdata

input data frame as returned by read_importfib, read_importentero, or read_importwqp, see details

yrsel

numeric value indicating the year to map

areasel

vector of bay segment or area names to include, see details

indic

character for choice of fecal indicator. Allowable options are fcolif for fecal coliform, or entero for Enterococcus. A numeric column in the data frame must have this name.

threshold

optional numeric for threshold against which to calculate exceedances for the indicator bacteria of choice. If not provided, defaults to 400 for fcolif and 130 for entero.

lagyr

numeric for year lag to calculate categories, see details

subset_wetdry

character, subset data frame to only wet or dry samples as defined by wet_threshold and temporal_window? Defaults to "all", which will not subset. If "wet" or "dry" is specified, anlz_fibwetdry is called using the further specified parameters, and the data frame is subsetted accordingly.

precipdata

input data frame as returned by read_importrain. columns should be: station, date (yyyy-mm-dd), rain (in inches). The object catchprecip has this data from 1995-2023 for select Enterococcus stations. If NULL, defaults to catchprecip.

temporal_window

numeric; required if subset_wetdry is not "all". number of days precipitation should be summed over (1 = day of sample only; 2 = day of sample + day before; etc.)

wet_threshold

numeric; required if subset_wetdry is not "all". inches accumulated through the defined temporal window, above which a sample should be defined as being from a 'wet' time period

listout

logical to return a list of simple feature objects for the data used in the leaflet map, default FALSE

warn

logical to print warnings about stations with insufficient data, default TRUE

Value

A leaflet map for the selected year and area showing station matrix scores if listout = FALSE (default). Bay segment scores are also shown if the input data are not from EPCHC. A list of simple feature objects is returned if listout = TRUE.

Details

Placing the mouse cursor over an item on the map will reveal additional information about a segment or station.

If the input to fibdata is from EPCHC (from read_importfib), valid entries for areasel include 'Alafia River', 'Hillsborough River', 'Big Bend', 'Cockroach Bay', 'East Lake Outfall', 'Hillsborough Bay', 'Little Manatee River', 'Lower Tampa Bay', 'McKay Bay', 'Middle Tampa Bay', 'Old Tampa Bay', 'Palm River', 'Tampa Bypass Canal', and 'Valrico Lake'. If the input data is not from EPCHC (from read_importentero), valid entries for areasel include 'OTB', 'HB', 'MTB', 'LTB', 'BCB', and 'MR'.

Input from read_importwqp for Manatee County (21FLMANA_WQX) FIB data can also be used. The function has not been tested for other organizations. Valid entries for areasel include "Big Slough", "Bowlees Creek", "Braden River", "Bud Slough", "Clay Gully", "Frog Creek", "Gap Creek", "Little Manatee River", "Lower Tampa Bay", "Manatee River", "Mcmullen Creek", "Mud Lake Slough", "Myakka River", "Palma Sola Bay", or "Piney Point Creek".

Bay segment matrix categories can be shown if input data are from read_importentero). Stations for these data were chosen specifically as downstream endpoints for each bay segment, whereas the other datasets are not appropriate for estimating bay segment outcomes.

See also

anlz_fibmatrix for details on the categories

Examples

# non-EPCHC, non Manatee County data
show_fibmatmap(enterodata, yrsel = 2020, indic = 'entero', areasel = 'OTB')
#> Warning: Stations with insufficient data for lagyr: 21FLHILL_WQX-619, 21FLPDEM_WQX-12-02, 21FLTPA_WQX-G1SW0095
# EPCHC data show_fibmatmap(fibdata, yrsel = 2016, indic = 'fcolif', areasel = c("Hillsborough River", "Alafia River")) #> Warning: Stations with insufficient data for lagyr: 265, 266, 1301, 1303, 1304, 1306, 1307, 1309, 1310, 1311, 1312, 1314, 1315, 1502, 1503, 1505, 1506, 1507, 1509, 1510, 1512, 1514, 1515
# Manatee County data show_fibmatmap(mancofibdata, yrsel = 2020, indic = 'fcolif', areasel = 'Manatee River') #> Warning: Stations with insufficient data for lagyr: LM4