anlz_fibmap | R Documentation |
Assign threshold categories to Fecal Indicator Bacteria (FIB) data
anlz_fibmap(fibdata, yrsel = NULL, mosel = NULL, areasel = NULL, assf = FALSE)
fibdata |
input FIB |
yrsel |
optional numeric value to filter output by years in |
mosel |
optional numeric value to filter output by month in |
areasel |
optional character string to filter output by stations in the |
assf |
logical indicating if the data are further processed as a simple features object with additional columns for |
This function is used to create FIB categories for mapping using show_fibmap
. Categories based on relevant thresholds are assigned to each observation. The categories are specific to E. coli or Enterococcus and are assigned based on the station class as freshwater (class
as 1 or 3F) or marine (class
as 2 or 3M), respectively. A station is categorized into one of four ranges defined by the thresholds as noted in the cat
column of the output, with corresponding colors appropriate for each range as noted in the col
column of the output.
The input fibdata
object can be one returned by either read_importfib
or read_importwqp
.
The areasel
argument can indicate valid entries in the area
column of fibdata
from read_importfib
or mancofibdata
, pascofibdata
, polcofibdata
, or hcesdfibdata
from read_importwqp
. For example, use either "Alafia River"
or "Hillsborough River"
to show stations for the corresponding river basins, where rows in fibdata
are filtered based on the the selection. All valid options for areasel
for fibdata
include "Alafia River"
, "Hillsborough River"
, "Cockroach Bay"
, "East Lake Outfall"
, "Hillsborough Bay"
, "Little Manatee"
, "Lower Tampa Bay"
, "McKay Bay"
, "Middle Tampa Bay"
, "Old Tampa Bay"
, "Palm River"
, "Tampa Bypass Canal"
, or "Valrico Lake"
. Valid options for areasel
if the input data are from read_importwqp
are any that are present in the area
column for the respective input datasets (mancofibdata
, pascofibdata
, polcofibdata
, or polcofibdata
). One to any of the options can be used.All stations are returned if this argument is set as NULL
(default). Not all areas may be present based on the year/month selection.
A data.frame
similar to the input if assf = FALSE
with additional columns describing station categories and optionally filtered by arguments passed to the function. A sf
object if assf = TRUE
with additional columns for show_fibmap
.
# assign categories to all
anlz_fibmap(fibdata)
# filter by year, month, and area
anlz_fibmap(fibdata, yrsel = 2020, mosel = 7, areasel = 'Alafia River')
# as sf object
anlz_fibmap(fibdata, assf = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.