
Nutrient loading outcome by bay segment, year, and indicator
Source:R/anlz_wq_load.R
anlz_wq_load.RdNutrient loading outcome by bay segment, year, and indicator
Arguments
- totanndat
data.frame of total annual loading estimates, with columns
year,bay_segment(full segment names, e.g."Old Tampa Bay"),tn_load, andtnhy, e.g. as returned byutil_rdataload()on the load-estimates data- smooth
passed to
util_outcome. One of"logistic"(the default),"ramp", or"none". By default, use a smooth logistic transition centered at each threshold instead of a hard 0/1 cutoff.- pct
numeric, passed to
util_outcomeas the fraction of each threshold used for the transition's steepness whensmoothis"logistic"or"ramp". Defaults to0.1(10% of the threshold).
Value
A data.frame with columns bay_segment (abbreviated, e.g.
"OTB"), yr, indicator ("tn_load" or
"tnhy_load", see Details for what "tnhy_load" measures),
and outcome (0-1, 1 = best)
Details
Compares two loading measures against fixed bay-segment thresholds,
using util_outcome with type = "threshold". By
default (smooth = "logistic"), a value below its threshold approaches an
outcome of 1 and at or above approaches 0, with a smooth logistic
transition between them.
tn_load: total nitrogen loadtnhy_load:tnhy, the total nitrogen load normalized by hydrologic load (i.e. TN load per unit of hydrologic load, a hydrologically-normalized loading rate). This is not the raw hydrologic (freshwater inflow) load itself. The rawhy_loadcolumn intotanndatis not used here.
Returned in long format with one row per indicator, ready to stack into
anlz_indicators.
Examples
if (FALSE) { # \dontrun{
totanndat <- util_rdataload(
"https://github.com/tbep-tech/load-estimates/raw/main/data/totanndat.RData"
)
anlz_wq_load(totanndat)
} # }