Skip to main content

Library to calculate CO2 (equivalent) emissions for a given transport trip.

Project description

Transport CO2

Calculate CO2 (equivalent) emissions for a given transport trip and provide a simple interpretation of the result.

Install from PyPI via

pip install transport-co2

Usage examples

You can list the currently supported modes like so:

from transport_co2 import Mode
list(Mode)

Each Mode allows you to estimate the CO2 emission per passenger for a journey given its distance (in km):

Mode.SMALL_CAR.estimate_co2(distance_in_km=100)
# 11200.0

This estimate is based on an average occupancy (in this example 1.5). You can also specify the occupancy:

Mode.SMALL_CAR.estimate_co2(distance_in_km=100, occupancy=3)
# 5600.0

If you don't want to work with the Mode enum, you can instead work with the estimate_co2 function:

from transport_co2 import estimate_co2
estimate_co2(mode="light_rail", distance_in_km=100)
# 1400.0

You can also specify the occupancy like above:

estimate_co2(mode="light_rail", distance_in_km=100, occupancy=250)
# 873.6

Goals

This project is intended to be used to help raise awareness about the cost of transportation choices, so people can make informed decisions.

Initial focus

We are initially focused on ground (road and rail) transport, as it is the most significant source on transport greenhouse gas emissions.

API Design

This library intends to provide:

  • a statistical estimate of greenhouse gase emissions given information about a trip (origin/destination, mode, and/or distance)
  • a simple interpretation of the statistical emissions estimate, in terms such as "high" or "low"

Research

The carbon estimates produced by this model may be based on the following resources. A full description of the model, including data sources, will be provided as the library takes shape.

Further improvements to the model may come from other sources, such as the following.

Attribution

Initial package structure forked from navdeep-G/setup.py.

Friendly nod to jamiebull1/transport-carbon.

Project details


Download files

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

Source Distribution

transport-co2-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

transport_co2-0.1.2-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file transport-co2-0.1.2.tar.gz.

File metadata

  • Download URL: transport-co2-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for transport-co2-0.1.2.tar.gz
Algorithm Hash digest
SHA256 57054bcce69362bb8b5334e1922ac7563bb8a372a998c9daec1816e9522d3886
MD5 908e2d1b049d2536131b8c1f16feb2bd
BLAKE2b-256 18242832ce90721cb350cb6c0be203a80d865133390392a131a471d38c21f3fb

See more details on using hashes here.

File details

Details for the file transport_co2-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: transport_co2-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for transport_co2-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 64599ab110e8852bee5197cdb10fd2bb4718dc14d79b45a92e62c04c2cbe7186
MD5 85c81d29f5d5938aa61bb9064a38f5b8
BLAKE2b-256 b4aa0c2b180b8be9d54c3961641c4da0ea1b66ee1f8461b6dae73cb7a68da916

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page