Skip to content

Carbon footprint-calculating website that uses your location history to perform and present analysis.

License

Notifications You must be signed in to change notification settings

danksky/carbon-foot-prince

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carbon Foot Prince

Live at: https://carbonfootprince.com

A carbon emissions calculator website that uses your Google location history to give you detailed insights into the impact your personal transporation has on the environment. Everything can be run offline (client-side analysis).

I hope you'll jump in and improve this site! It's pure HTML, CSS, and (vanilla) Javascript!

In this Project

Previews

Desktop

Mobile

How to Run Locally

  1. git clone the repository
  2. cd carbon-foot-prince
  3. python -m http.server 8080 (run a web server from that directory)
  4. Open http://localhost:8080/ in your browser.

Calculation

Personal Transportation Emissions

Google location history export files include series of activity segments, data objects that describe one particular movement (e.g. your drive to the grocery store). Each of these activity segments includes the start time and location, end time and location, distance of travel (meters), and most likely mode of transportation. The modes include, but may not be limited to:

IN_PASSENGER_VEHICLE, CYCLING, WALKING, IN_BUS, HIKING, MOTORCYCLING, IN_TRAM, RUNNING, FLYING, STILL, IN_FERRY, IN_TRAIN, SAILING, SKIING, IN_SUBWAY, IN_VEHICLE, UNKNOWN_ACTIVITY_TYPE

Personal emissions are calculated using the following function: e = cd, where

  • e = emissions of CO2 (kgCO2)
  • c = emissions factor (kgCO2/kmpassenger)
  • d = distance (km)

and c varies according to the activity type. The various functions used to determine personal emissions are defined in getActivityEmissions(distance, activity).

Source:

UK Department for Business, Energy, and Industrial Strategy - 2019 Government greenhouse gas conversion factors for company reporting

USA Personal Transportation Emissions Per Capita

Sources:

USA EPA (Light-Duty Vehicles, Motorcycles, Buses, Commercial Aviation, & Rail)

Rhodium Group (2020 estimates)

Macrotrends (USA population)

https://www.macrotrends.net/countries/USA/united-states/population

USA Personal Transportation Emissions Per Capita - 2015 Paris Climate Accords Goal

Based off a 4.52% reduction of your emissions every year after 2015 until 2030, this projects that annual reduction onto the average American's personal transportation emissions prior to 2015. To be specific, this looks at the average emissions during the period 2010 to 2015.

Your yearly 2015 Paris Climate Accords goal is defined by getAnnualBudgetAllowance(reductionPercentageGoal, currentYear, annualEmissionsAverage).

Example

Assume that the average American emitted an average of 6 kgtCO2 per year between 2010 and 2015, and in order to reach an annual emission of 3 kgtCO2 by 2030, they would need to cut 4.52% each year.

For 2016, the calculation would look like this: 6 * (1 - 0.0452)2 = 5.46985824, where the exponent (2) is defined by the nth year since then end of 2014.

Global Transportation Emissions Per Capita

International Energy Agency (Passenger road vehicles, Aviation, Rail)

Carbon Brief (2020 estimates)

Worldometers (world population)

Contribute

If you've thought of a new feature or found a bug undocumented feature, either open a pull request, or, if you aren't a coder, create an issue in this repository.

.
├── LICENSE
├── README.md
├── images/
├── index.css
├── index.html
├── index.js
├── lib/ (zip.js files)
└── styles/
    ├── desktop
    └── mobile

Thanks

Packages

Art

Thanks to the following authors of flaticon.com's SVG repository:

Data Privacy

Your location data never leaves your computer. Once you import the zip file into this window, the program that was downloaded into your browser when you loaded this webpage starts the analysis; nothing about your location data leaves. The webpage does send usage data, such as clicks, upload durations, etc. to Google Analytics.

About

Carbon footprint-calculating website that uses your location history to perform and present analysis.

Topics

Resources

License

Stars

Watchers

Forks