Skip to contents

Nitrogen removal varies along a flowpath as it may include different land cover and waterbody types that have different nitrogen reduction capabilities. This function requires a flowpath generated by nsink_generate_flowpath as input and returns an estimate of total flow path removal as well as removal by type.

Usage

nsink_summarize_flowpath(flowpath, removal)

Arguments

flowpath

A flowpath to summarize nitrogen removal

removal

The removal raster stack or removal list, generated by nsink_calc_removal

Value

A data frame is returned with a summary of nitrogen removal. The

Examples

if (FALSE) {
library(nsink)
niantic_huc <- nsink_get_huc_id("Niantic River")$huc_12
niantic_data <- nsink_get_data(niantic_huc, data_dir = "nsink_data")
aea <- 5072
niantic_nsink_data <- nsink_prep_data(niantic_huc, projection = aea,
                                      data_dir = "nsink_data")
removal <- nsink_calc_removal(niantic_nsink_data)
pt <- c(1948121, 2295822)
start_loc <- st_sf(st_sfc(st_point(c(pt)), crs = aea))
fp <- nsink_generate_flowpath(start_loc, niantic_nsink_data)
flow_summary <- nsink_summarize_flowpath(fp, removal)
flow_summary
}