create a sf object with the emission and the geographic area which this emission will be distributed.

geoemiss(geom, values, variable, names = NA, mass_unit = "t",
  verbose = T)

Arguments

geom

sf object describing the geometry of each area

values

numeric vector (for one variable) or list of vectors (for multiple variables) of total mass

variable

name(s) of the pollutant(s)

names

area names

mass_unit

mass unit, default is "t" (ton)

verbose

display additional information

Value

a sf with the area shapes and the total emission for each area

Examples

continents <- sf::st_read(paste0(system.file("extdata",package="inventory"),"/continent.shp"), quiet = TRUE) continents <- continents[1:5,] so2 <- read.csv(paste0(system.file("extdata",package="inventory"),"/SO2.csv")) names(so2) <- c("region","year","mass") so2 <- so2[so2$year == 2010,] # for a single pollutant so2_2010 <- geoemiss(geom = continents, values = so2$mass, names = so2$region, variable = "so2")
#> calculating so2 for 5 areas
# for multiples pollutants, NO values is twice so2 emissions for exercice purpose so2_NO_2010 <- geoemiss(geom = continents, values = list(so2$mass,2 * so2$mass), names = so2$region, variable = c("so2","NO"))
#> calculating so2 for 5 areas #> calculating NO for 5 areas