Summarize emissions estimates, aggregating emissions by pollutant, time of the day, vehicle.
emis_summary(
emi_list,
by = "pollutant",
veh_vars = "veh_type",
segment_vars = NULL,
process_vars = "process"
)
list. Emission or emission factor list.
character. Emissions can be aggregated by 'time', 'vehicle', or simply 'pollutant' (Default).
character. data.frame names of 'emi_list' attributed to vehicle characteristics. Default is 'veh_type'.
character. data.frame names of 'emi_list' object attributed to the road segments. Default is NULL.
character. data.frame names of 'emi_list' object attributed to the emission processes. Default is 'process'.
data.table
with pollutants units ('g') aggregated by pollutant,
time, or vehicle type.
Other emission analysis:
emis_grid()
,
emis_to_dt()
# \donttest{
library(gtfstools)
# read GTFS
gtfs_file <- system.file("extdata/irl_dub_gtfs.zip", package = "gtfs2emis")
gtfs <- gtfstools::read_gtfs(gtfs_file)
# Keep a single trip
gtfs <- gtfstools::filter_by_trip_id(gtfs
, trip_id = c('238.2.60-118-b12-1.59.I'
,"7081.2.60-X27-b12-1.106.I"))
# Transport model
tp_model <- transport_model(gtfs_data = gtfs,
spatial_resolution = 100,
parallel = FALSE)
#> Converting shapes to sf objects
#> Processing the data
# fleet data
fleet_df <- read.csv(system.file("extdata/irl_dub_fleet.txt"
, package = "gtfs2emis"))
# emission model
emi_list <- emission_model(tp_model = tp_model
, ef_model = "ef_europe_emep"
, fleet_data = fleet_df
, pollutant = c("CO2","PM10"))
#> 'CO2' Emission factor not found for 'SCR' Technology and Euro 'IV'.
#> The package assumes missing Technology entry. Please check `data(ef_europe_emep_db)` for available data.
#> 'CO2' Emission factor not found for 'DPF+SCR' Technology and Euro 'VI'.
#> The package assumed 'SCR' Technology entry. Please check `data(ef_europe_emep_db)` for available data.
# Aggregate total emissions by 'pollutant'
emis_summary(emi_list)
#> Loading required namespace: testthat
#> pollutant process emi
#> <char> <char> <units>
#> 1: CO2 hot_exhaust 1.085255e+04 [g]
#> 2: PM10 hot_exhaust 3.539287e-01 [g]
# by vehicle type
emis_summary(emi_list, by = "vehicle")
#> veh_type pollutant process emi
#> <char> <char> <char> <units>
#> 1: Ubus Std 15 - 18 t CO2 hot_exhaust 1.085255e+04 [g]
#> 2: Ubus Std 15 - 18 t PM10 hot_exhaust 3.539287e-01 [g]
emis_summary(emi_list
, by = "vehicle"
, veh_vars = c("euro"))
#> euro pollutant process emi
#> <char> <char> <char> <units>
#> 1: III CO2 hot_exhaust 1.279127e+02 [g]
#> 2: IV CO2 hot_exhaust 3.641845e+03 [g]
#> 3: V CO2 hot_exhaust 1.459425e+03 [g]
#> 4: VI CO2 hot_exhaust 5.623366e+03 [g]
#> 5: III PM10 hot_exhaust 2.561448e-02 [g]
#> 6: IV PM10 hot_exhaust 1.700779e-01 [g]
#> 7: V PM10 hot_exhaust 1.145693e-01 [g]
#> 8: VI PM10 hot_exhaust 4.366704e-02 [g]
emis_summary(emi_list
, by = "vehicle"
, veh_vars = c("fuel"))
#> fuel pollutant process emi
#> <char> <char> <char> <units>
#> 1: D CO2 hot_exhaust 1.085255e+04 [g]
#> 2: D PM10 hot_exhaust 3.539287e-01 [g]
emis_summary(emi_list
, by = "vehicle"
, veh_vars = c("veh_type","euro","tech","fuel"))
#> veh_type euro tech fuel pollutant process
#> <char> <char> <char> <char> <char> <char>
#> 1: Ubus Std 15 - 18 t III - D CO2 hot_exhaust
#> 2: Ubus Std 15 - 18 t IV SCR D CO2 hot_exhaust
#> 3: Ubus Std 15 - 18 t V SCR D CO2 hot_exhaust
#> 4: Ubus Std 15 - 18 t VI DPF+SCR D CO2 hot_exhaust
#> 5: Ubus Std 15 - 18 t III - D PM10 hot_exhaust
#> 6: Ubus Std 15 - 18 t IV SCR D PM10 hot_exhaust
#> 7: Ubus Std 15 - 18 t V SCR D PM10 hot_exhaust
#> 8: Ubus Std 15 - 18 t VI DPF+SCR D PM10 hot_exhaust
#> emi
#> <units>
#> 1: 1.279127e+02 [g]
#> 2: 3.641845e+03 [g]
#> 3: 1.459425e+03 [g]
#> 4: 5.623366e+03 [g]
#> 5: 2.561448e-02 [g]
#> 6: 1.700779e-01 [g]
#> 7: 1.145693e-01 [g]
#> 8: 4.366704e-02 [g]
# by time of the day
emis_summary(emi_list
, by = "time"
, segment_vars = "slope")
#> timestamp_hour pollutant process emi
#> <int> <char> <char> <units>
#> 1: 8 CO2 hot_exhaust 1.076303e+04 [g]
#> 2: 9 CO2 hot_exhaust 8.952295e+01 [g]
#> 3: 8 PM10 hot_exhaust 3.509064e-01 [g]
#> 4: 9 PM10 hot_exhaust 3.022266e-03 [g]
# }