process_nei | R Documentation |
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.
process_nei(path = NULL, county = NULL, year = c(2017, 2020), ...)
path |
character(1). Directory with NEI csv files. |
county |
|
year |
integer(1) Year to use. Currently only 2017 or 2020 is accepted. |
... |
Placeholders. |
a SpatVector
object
Base files for county
argument can be downloaded directly from
U.S. Census Bureau
or by using tigris
package. This function does not reproject census boundaries.
Users should be aware of the coordinate system of census boundary data for
other analyses.
Insang Song
## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
## amount of data which is not included in the package.
## Not run:
nei <- process_nei(
path = "./data",
county = system.file("gpkg/nc.gpkg", package = "sf"),
year = 2017
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.