gtfs2emis

Estimating public transport emissions from GTFS data.
https://github.com/ipea/gtfs2emis

Category: Emissions
Sub Category: Emission Observation and Modeling

Keywords

emissions environmental-modelling gtfs public-transport r rspatial transport

Keywords from Contributors

gps-format gtfs-format atmospheric-science

Last synced: about 6 hours ago
JSON representation

Repository metadata

R package to estimate public transport emissions based on GTFS data

README.md

gtfs2emis: Estimating public transport emissions from GTFS data

CRAN/METACRAN Version CRAN/METACRAN Total downloads R-CMD-check Lifecycle: experimental Codecov test coverage DOI

gtfs2emis is an R package to estimate the emission levels of public transport vehicles based on General Transit Feed Specification (GTFS) data. The package requires two main inputs: i) public transport data in GTFS standard format; and ii) some basic information on fleet characteristics such as vehicle age, technology, fuel, and Euro stage. As it stands, the package estimates several pollutants (see table below) at high spatial and temporal resolutions. Pollution levels can be calculated for specific transport routes, trips, time of the day, or for the transport system as a whole. The output with emission estimates can be extracted in different formats, supporting analysis of how emission levels vary across space, time, and by fleet characteristics. A full description of the methods used in the gtfs2emis model is presented in Vieira, Pereira and Andrade (2022).

Installation

You can install gtfs2emis:

# From CRAN
install.packages("gtfs2emis")
library(gtfs2emis)

# or use the development version with latest features
utils::remove.packages('gtfs2emis')
devtools::install_github("ipeaGIT/gtfs2emis")
library(gtfs2emis)

Usage and Data requirements

The gtfs2emis package has two core functions.

  1. transport_model() converts GTFS data into a GPS-like table with the space-time positions and speeds of public transport vehicles. The only input required is a GTFS.zip feed.

  2. emission_model() estimates hot-exhaust emissions based on four inputs:

    1. the result from the transport_model();
    1. a data.frame with info on fleet characteristics;
    1. a string indicating which emission factor model should be considered;
    1. a string indicating which pollutants should be estimated.

To help users analyze the output from emission_model(), the gtfs2emis package has few functions:

  1. emis_to_dt() to convert the output of emission_model() from list to data.table.
  2. emis_summary() to aggregate emission estimates by the time of the day, vehicle type, or road segment.
  3. emis_grid() to spatially aggregate emission estimates using any custom spatial grid or polygons.

Demonstration on sample data

To illustrate functionality, the package includes small sample data sets of the public transport and fleet of Curitiba (Brazil), Detroit (USA), and Dublin (Ireland). Estimating the emissions of a given public transport system using gtfs2emis can be done in three simple steps, as follows.

1. Run transport model

The first step is to use the transport_model() function to convert GTFS data into a GPS-like table, so that we can get the space-time position and speed of each vehicle of the public transport system at high spatial and temporal resolutions.

# read GTFS.zip
gtfs_file <- system.file("extdata/irl_dub_gtfs.zip", package = "gtfs2emis")
gtfs <- gtfstools::read_gtfs(gtfs_file)

# generate transport model
tp_model <- transport_model(gtfs_data = gtfs,spatial_resolution = 100,parallel = TRUE) 

2. Prepare fleet data

The second step is to prepare a data.frame with some characteristics of the public transport fleet. Note that different emission factor models may require information on different fleet characteristics, such as vehicle age, type, Euro standard, technology, and fuel. This can be either: - A simple table with the overall composition of the fleet. In this case, the gtfs2emis will assume that fleet is homogeneously distributed across all routes; OR - A detailed table that (1) brings info on the characteristics of each vehicle and, (2) tells the probability with which each vehicle type is allocated to each transport route.

Here is what a simple fleet table to be used with the EMEP-EEA emission factor model looks like:

fleet_file <- system.file("extdata/irl_dub_fleet.txt", package = "gtfs2emis")

fleet_df <- read.csv(fleet_file)
fleet_df
#>             veh_type euro fuel   N fleet_composition    tech
#> 1 Ubus Std 15 - 18 t  III    D  10        0.00998004       -
#> 2 Ubus Std 15 - 18 t   IV    D 296        0.29540918     SCR
#> 3 Ubus Std 15 - 18 t    V    D 148        0.14770459     SCR
#> 4 Ubus Std 15 - 18 t   VI    D 548        0.54690619 DPF+SCR

3. Run emission model

In the final step, the emission_model() function to estimate hot exhaust emissions of our public transport system. Here, the user needs to pass the results from transport_model(), some fleet data as described above, and select which emission factor model and pollutants should be considered (see the options available below). The output from emission_model() is a list with several vectors and data.frames with emission estimates and related information such as vehicle variables (fuel, age, tech, euro, fleet_composition), travel variables (slope, load, gps) or pollution (EF, emi).

emi_list <- emission_model(tp_model = tp_model
, ef_model = "ef_europe_emep"
, fleet_data = fleet_df
, pollutant = c("NOx","PM10")
)

names(emi_list)
#>  [1] "pollutant"         "veh_type"          "euro"             
#>  [4] "fuel"              "tech"              "slope"            
#>  [7] "load"              "speed"             "EF"               
#> [10] "emi"               "fleet_composition" "tp_model"

Emission factor models and pollutants available

Currently, the gtfs2emis package provides a computational method to estimate running exhaust emissions factors based on the following emission factor models:

  • Brazil
    • CETESB: 2019 model from the Environmental Company of Sao Paulo (CETESB)
  • Europe
    • EMEP/EEA: European Monitoring and Evaluation Programme, developed by the European Environment Agency (EEA).
  • United States
    • EMFAC2017/CARB: California Emission Factor model, developed by the California Air Resources Board (CARB).
    • MOVES3/EPA: Vehicle Emission Simulator, developed by the Environmental Protection Agency (EPA).

List of pollutants available by emission factor models

| Source | Pollutants | |--------------|----------------------------------------------------------| | CETESB | CH4, CO, CO2, ETOH, FC (Fuel Consumption), FS (Fuel Sales), gCO2/KWH, gD/KWH, HC, KML, N2O, NH3, NMHC, NO, NO2, NOx, PM10 and RCHO | | EMFAC2017/CARB | CH4, CO, CO2, N2O, NOx, PM10, PM25, ROG (Reactive Organic Gases), SOX, and TOG (Total Organic Gases) | | EMEP/EEA | CH4, CO, CO2, EC, FC, N2O, NH3, NOx, PM10, SPN23 (#kWh), and VOC | | MOVES3/EPA | CH4, CO, CO2, EC, HONO, N2O, NH3, NH4, NO, NO2, NO3, NOx, PM10, PM25, SO2, THC, TOG, and VOC |

Fleet characteristics required by each emission factor model

| Source | Buses | Characteristics | |-----------------|----------------------|----------------------------------| | CETESB | Micro, Standard, Articulated | Age, Fuel, EURO standard | | EMEP/EAA | Micro, Standard, Articulated | Fuel, EURO standard, technology, load, slope | | EMFAC2017/CARB | Urban Buses | Age, Fuel | | MOVES3/EPA | Urban Buses | Age, Fuel |

Emissions from road vehicle tire, brake, and surface wear

gtfs2emis also provides emissions estimates from tire, brake and surface wear using the EMEP/EEA model. The function estimates emissions of particulate matter (PM), encompassing black carbon (BC), which arises from distinct sources (tire, brake, and road surface wear). The focus is on primary particles, which refer to those that are directly emitted, rather than those generated from the re-suspension of previously deposited material.

Learn more

Check out the guides for learning everything there is to know about all the different features:

Related packages

There are several others transport emissions models available for different purposes (see below). As of today, gtfs2emis is the only method with the capability to estimate emissions of public transport systems using GTFS data.

  • R: vein Bottom-up and top-down inventory using GPS data.
  • R: EmissV Top-down inventory.
  • Python: PythonEmissData Jupyter notebook to estimate simple top-down emissions.
  • Python: YETI YETI - Yet Another Emissions From Traffic Inventory
  • Python: mobair bottom-up model using GPS data.

Future enhancements

  • Include cold-start, resuspension, and evaporative emissions factors
  • Add railway emission factors

Citation

citation("gtfs2emis")
#> To cite gtfs2emis in publications use:
#> 
#>   Vieira, J. P. B., Pereira, R. H. M., & Andrade, P. R. (2023). Estimating 
#>      Public Transport Emissions from General Transit Feed Specification Data. 
#>      Transportation Research Part D: Transport and Environment. Volume 119, 
#>      103757. https://doi.org/10.1016/j.trd.2023.103757
#> 
#> A BibTeX entry for LaTeX users is
#>   
#>   @article{vieira2023estimating,
#>     title = {Estimating Public Transport Emissions from {{General Transit Feed Specification}} Data},
#>     author = {Vieira, Jo{\~a}o Pedro Bazzo and Pereira, Rafael H. M. and Andrade, Pedro R.},
#>     year = {2023},
#>     month = jun,
#>     journal = {Transportation Research Part D: Transport and Environment},
#>     volume = {119},
#>     pages = {103757},
#>     issn = {1361-9209},
#>     doi = {10.1016/j.trd.2023.103757},
#>     urldate = {2023-05-06},
#>     langid = {english},
#>     keywords = {Emission factors,Emission models,GTFS,Gtfs2emis,Public transport emissions,Urban bus}
#>   }

Credits

The gtfs2emis package is developed by a team at the Institute for Applied Economic Research (IPEA) in collaboration from the National Institute for Space Research (INPE), both from Brazil.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 700
Total Committers: 6
Avg Commits per committer: 116.667
Development Distribution Score (DDS): 0.276

Commits in past year: 33
Committers in past year: 3
Avg Commits per committer in past year: 11.0
Development Distribution Score (DDS) in past year: 0.182

Name Email Commits
Joao Bazzo j****o@g****m 507
rafapereirabr r****r@g****m 118
Joao Pedro Bazzo Vieira B****0@i****r 34
Pedro R. Andrade p****e@g****m 32
ibarraespinosa s****a@u****r 5
Daniel Herszenhut d****z@g****m 4

Committer domains:


Issue and Pull Request metadata

Last synced: 15 days ago

Total issues: 5
Total pull requests: 8
Average time to close issues: 3 days
Average time to close pull requests: about 22 hours
Total issue authors: 1
Total pull request authors: 2
Average comments per issue: 0.4
Average comments per pull request: 1.5
Merged pull request: 8
Bot issues: 0
Bot pull requests: 0

Past year issues: 5
Past year pull requests: 8
Past year average time to close issues: 3 days
Past year average time to close pull requests: about 22 hours
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.4
Past year average comments per pull request: 1.5
Past year merged pull request: 8
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ipea/gtfs2emis

Top Issue Authors

  • rafapereirabr (5)

Top Pull Request Authors

  • rafapereirabr (7)
  • pedro-andrade-inpe (1)

Top Issue Labels

Top Pull Request Labels


Dependencies

DESCRIPTION cran
  • R >= 3.6 depends
  • checkmate * imports
  • data.table * imports
  • furrr * imports
  • future * imports
  • gtfs2gps * imports
  • methods * imports
  • progressr * imports
  • sf >= 0.9 imports
  • units * imports
  • ggplot2 * suggests
  • gtfstools * suggests
  • knitr * suggests
  • lwgeom * suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests
  • vein * suggests
.github/workflows/R-CMD-check-CRAN.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite

Score: 5.723585101952381