Learn R Programming

amadeus (version 1.2.2)

process_tri: 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,
  ...
)

Value

a SpatVector object (points) in year

year is stored in a field named "year".

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.

Author

Insang Song, Mariana Kassien

References

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

Examples

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

Run the code above in your browser using DataLab