show_enteromap: Map Enterococcus results by month, year, and location

View source: R/show_enteromap.R

show_enteromapR Documentation

Map Enterococcus results by month, year, and location

Description

Map Enterococcus results by month, year, and location

Usage

show_enteromap(
  fibdata,
  yrsel,
  mosel,
  areasel = NULL,
  wetdry = FALSE,
  precipdata = NULL,
  temporal_window = NULL,
  wet_threshold = NULL,
  addsta = FALSE
)

Arguments

fibdata

data frame of Enterococcus sample data as returned by enterodata or anlz_fibwetdry

yrsel

optional numeric to filter data by year

mosel

optional numeric to filter data by month

areasel

optional character string to filter output by stations in the long_name column of enterodata, see details

wetdry

logical; if TRUE, incorporate wet/dry differences (this will result in a call to anlz_fibwetdry, in which case temporal_window and wet_threshold are required). If FALSE (default), do not differentiate between wet and dry samples.

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 wetdry is TRUE. 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 wetdry is TRUE. inches accumulated through the defined temporal window, above which a sample should be defined as being from a 'wet' time period

addsta

logical to add station labels to the map, default FALSE

Details

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

Value

A leaflet map for the selected year, month, and area showing stations and FIB concentration category

See Also

anlz_enteromap for details on the categories

Examples

show_enteromap(enterodata, yrsel = 2020, mosel = 9)

# wet/dry samples
show_enteromap(enterodata, yrsel = 2020, mosel = 9, wetdry = TRUE,
               temporal_window = 2, wet_threshold = 0.5)

# Old Tampa Bay only
show_enteromap(enterodata, yrsel = 2020, mosel = 9, areasel = "Old Tampa Bay")

tbep-tech/tbeptools documentation built on April 13, 2025, 4:50 p.m.