process_tri: Process toxic release data

View source: R/process.R

process_triR Documentation

Process toxic release data

Description

This function imports and cleans raw toxic release data, returning a single SpatVector (points) object for the selected year.

Usage

process_tri(
  path = NULL,
  year = 2018,
  variables = c(1, 13, 12, 14, 20, 34, 36, 47, 48, 49),
  extent = NULL,
  ...
)

Arguments

path

character(1). Path to the directory with TRI CSV files

year

integer(1). Single year to select.

variables

integer. Column index of TRI data.

extent

numeric(4) or SpatExtent giving the extent of the raster if NULL (default), the entire raster is loaded

...

Placeholders.

Value

a SpatVector object (points) in year year is stored in a field named "year".

Note

Visit TRI Data and Tools to view the available years and variables.

Author(s)

Insang Song, Mariana Kassien

References

https://www.epa.gov/toxics-release-inventory-tri-program/tri-toolbox

Examples

## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
##       amount of data which is not included in the package.
## Not run: 
tri <- process_tri(
  path = "./data",
  year = 2020,
  variables = c(1, 13, 12, 14, 20, 34, 36, 47, 48, 49)
)

## End(Not run)

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