calculate_tri: Calculate toxic release covariates

View source: R/calculate_covariates.R

calculate_triR Documentation

Calculate toxic release covariates

Description

Calculate toxic release values for polygons or isotropic buffer point locations. Returns a data.frame object containing locs_id and variables for each chemical in from.

Usage

calculate_tri(
  from = NULL,
  locs,
  locs_id = "site_id",
  radius = c(1000L, 10000L, 50000L),
  geom = FALSE,
  ...
)

Arguments

from

SpatVector(1). Output of process_tri().

locs

sf/SpatVector. Locations where TRI variables are calculated.

locs_id

character(1). Unique site identifier column name. Default is "site_id".

radius

Circular buffer radius. Default is c(1000, 10000, 50000) (meters)

geom

FALSE/"sf"/"terra".. Should the function return with geometry? Default is FALSE, options with geometry are "sf" or "terra". The coordinate reference system of the sf or SpatVector is that of from.

...

Placeholders.

Value

a data.frame or SpatVector object

Note

U.S. context.

Author(s)

Insang Song, Mariana Kassien

See Also

sum_edc, process_tri

Examples

## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
##       amount of data which is not included in the package.
## Not run: 
loc <- data.frame(id = "001", lon = -78.90, lat = 35.97)
calculate_tri(
  from = tri, # derived from process_tri() example
  locs = loc,
  locs_id = "id",
  radius = c(1e3L, 1e4L, 5e4L)
)

## End(Not run)

amadeus documentation built on April 4, 2025, 12:21 a.m.