Skip to main content

cafein.lca

Life-cycle assessment of urban passenger transport in Python.

cafein.lca computes life-cycle energy use and greenhouse-gas emissions of urban transport modes per passenger-km and per vehicle-km, decomposed into vehicle and battery manufacturing, delivery, use, the servicing of shared fleets, and infrastructure; the first four are also available per vehicle. It covers 56 modes, from private e-scooters to metro trains. The main assumptions behind a result are named parameters (electricity mix, vehicle lifetime, mileage, occupancy, battery size, servicing logistics), while the per-mode technical data and the shared coefficient tables ship as packaged data.

The calculation is a standard attributional life-cycle assessment. The default coefficient set, itf-2020, is extracted from the International Transport Forum's Good to Go? study (see the attribution below) and is held to that source by the test suite; TransportLCA(coefficients=...) names the set, so later sets can coexist. Regional scenarios replace selected assumptions, such as occupancy, lifetimes and mileage, with sourced local values while the remaining defaults stay in force; each scenario carries best, central and worst cases with the evidence and source behind every value, and an Indian metropolitan scenario is packaged.

cafein.lca is part of the cafein family of packages. It installs and runs on its own and does not require the cafein core package.

Installation

Until the first release is on PyPI, install from the repository:

pip install git+https://github.com/cafein-py/cafein.lca.git

Once 0.1.0 is released, pip install cafein.lca will do the same.

Example

A session holds the electricity mix, and a calculation returns the result for one mode. This computes the life-cycle emissions of a battery-electric car on the EU 28 grid, in g CO₂e per passenger-km:

from cafein.lca import TransportLCA

lca = TransportLCA(power_mix="EU 28")
car = lca.calculate("private_car_bev")
round(car.ghg_per_pkm, 1)

That number is the whole-life total; car.per_pkm breaks it into the five components, and lca.summary() runs every mode at once. Changing assumptions, custom electricity mixes and scenarios are covered in the documentation below.

Documentation

The documentation at https://cafein-lca.readthedocs.io covers:

  • Getting started: installation and a first calculation.
  • User guide: reading results, modes and parameters, the electricity mix, sensitivity analysis.
  • Scenarios: reusable, evidence-tagged assumption bundles.
  • The model: scope, stages, normalisation, provenance of the coefficients, and the audit of the source model.
  • API reference.

Related tools

  • carculator (Paul Scherrer Institut) and its siblings provide fully parameterised vehicle LCA over ecoinvent-style background databases, with many midpoint indicators, prospective scenarios and Monte Carlo. cafein.lca instead packages its own coefficients for greenhouse gas and energy only, and covers the mobility-services layer that vehicle LCAs usually omit: servicing of shared fleets, deadheading of taxis and ridesourcing, and infrastructure for every mode.
  • Brightway2 / lca_algebraic — general LCA frameworks; this library deliberately stays a lightweight domain model on plain pandas.

Data attribution and license

The Python code is MIT-licensed. The packaged datasets are extracted from the ITF workbook © OECD/ITF 2020, used and adapted with citation under the OECD terms and conditions; several coefficients within it derive from Argonne National Laboratory's GREET model. This is an adaptation of OECD/ITF work and is not endorsed by the OECD. Cite the original work when using the numbers:

Cazzola, P. and P. Crist (2020), Good to Go? Assessing the Environmental Performance of New Mobility, International Transport Forum, Paris. https://www.itf-oecd.org/good-go-assessing-environmental-performance-new-mobility

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cafein_lca-0.1.0.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cafein_lca-0.1.0-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file cafein_lca-0.1.0.tar.gz.

File metadata

  • Download URL: cafein_lca-0.1.0.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cafein_lca-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26fd827e0ad69276bc6b500eacb60a43a5d0d969813716c8d0b4d0e4993415ae
MD5 6389221736a2d99786cc483cb2ba4313
BLAKE2b-256 fb189adf8c15e55172b14706748ae83b6f7a5220173ef396fe43c339fbc9e5e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cafein_lca-0.1.0.tar.gz:

Publisher: release.yaml on cafein-py/cafein.lca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cafein_lca-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cafein_lca-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cafein_lca-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99134a1ffc5396bd35223978a6d2ba01ece31a7ff183415ae2a1979b54612a27
MD5 d78d4d9f5dbb16933249915e5a97a1a0
BLAKE2b-256 fbbaaebbeaffe0ad94984f2a387c775236439ac582f53d5455e5e57dbe18afb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cafein_lca-0.1.0-py3-none-any.whl:

Publisher: release.yaml on cafein-py/cafein.lca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page