View source: R/anlz_fibmatrix.R
anlz_fibmatrix | R Documentation |
Analyze Fecal Indicator Bacteria categories over time by station or bay segment
anlz_fibmatrix(
fibdata,
yrrng = NULL,
stas = NULL,
bay_segment = NULL,
lagyr = 3,
subset_wetdry = c("all", "wet", "dry"),
precipdata = NULL,
temporal_window = NULL,
wet_threshold = NULL,
warn = TRUE
)
fibdata |
input data frame as returned by |
yrrng |
numeric vector indicating min, max years to include, defaults to range of years in data, see details |
stas |
optional vector of stations to include, see details |
bay_segment |
optional vector of bay segment names to include, supercedes |
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 |
precipdata |
input data frame as returned by |
temporal_window |
numeric; required if |
wet_threshold |
numeric; required if |
warn |
logical to print warnings about stations with insufficient data, default |
This function is used to create output for plotting a matrix stoplight graphic for FIB categories by station. Each station (or bay segment) and year combination is categorized based on the likelihood of fecal indicator bacteria concentrations exceeding some threshold in a given year. For Enterococcus (marine), the default threshold is 130 CFU / 100 mL in a given year. For E. coli (fresh), the default threshold is 410 CFU / 100 mL. The proportions are categorized as A, B, C, D, or E (Microbial Water Quality Assessment or MWQA categories) with corresponding colors, where the breakpoints for each category are <10\
If the input data are from read_importentero
(baywide assessment), the results can be summarized by bay segment if bay_segment
is not NULL
. The stas
argument is ignored and all stations within each bay segment watershed are used to evaluate the FIB categories.
yrrng
can be specified several ways. If yrrng = NULL
, the year range of the data for the selected changes is chosen. User-defined values for the minimum and maximum years can also be used, or only a minimum or maximum can be specified, e.g., yrrng = c(2000, 2010)
or yrrng = c(2000, NA)
. In the latter case, the maximum year will be defined by the data.
The default stations if the input is from read_importfib
(EPC data) and if bay_segment
is NULL
are those used in TBEP report #05-13 (https://drive.google.com/file/d/1MZnK3cMzV7LRg6dTbCKX8AOZU0GNurJJ/view) for the Hillsborough River Basin Management Action Plan (BMAP) subbasins. These include Blackwater Creek (WBID 1482, EPC stations 143, 108), Baker Creek (WBID 1522C, EPC station 107), Lake Thonotosassa (WBID 1522B, EPC stations 135, 118), Flint Creek (WBID 1522A, EPC station 148), and the Lower Hillsborough River (WBID 1443E, EPC stations 105, 152, 137). Other stations can be plotted using the stas
argument.
Input from read_importwqp
for Manatee County (21FLMANA_WQX), Pasco County (21FLPASC_WQX), or Polk County (21FLPOLK_WQX) FIB data can also be used. The function has not been tested for other organizations.
A tibble
object with FIB summaries by year and station including columns for the estimated geometric mean of Enterococcus (marine) or E. coli (fresh) concentrations (gmean
), the proportion of samples exceeding 130 CFU / 100 mL (Enterococcus) or 410 CFU / 100 mL (exced
), the count of samples (cnt
), and a category indicating a letter outcome based on the proportion of exceedences (cat
). Results can be summarized by bay segment if bay_segment
is not NULL
and the input data is from read_importentero
.
show_fibmatrix
anlz_fibmatrix(fibdata)
# use different dataset
anlz_fibmatrix(enterodata, lagyr = 1)
# subset to only wet samples
anlz_fibmatrix(enterodata, lagyr = 1, subset_wetdry = "wet",
temporal_window = 2, wet_threshold = 0.5)
# Manatee County data
anlz_fibmatrix(mancofibdata, lagyr = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.