Learn R Programming

amadeus (version 1.2.2)

process_nei: Process road emissions data

Description

The process_nei() function imports and cleans raw road emissions data, returning a single SpatVector object.

NEI data comprises multiple csv files where emissions of 50+ pollutants are recorded at county level. With raw data files, this function will join a combined table of NEI data and county boundary, then perform a spatial join to target locations.

Usage

process_nei(path = NULL, county = NULL, year = c(2017, 2020), ...)

Value

a SpatVector object

Arguments

path

character(1). Directory with NEI csv files.

county

SpatVector/sf. County boundaries.

year

integer(1) Year to use. Currently only 2017 or 2020 is accepted.

...

Placeholders.

Author

Insang Song

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) {
nei <- process_nei(
  path = "./data",
  county = system.file("gpkg/nc.gpkg", package = "sf"),
  year = 2017
)
}

Run the code above in your browser using DataLab