Giter Club home page Giter Club logo

eco2rd's Introduction

image

eco₂rd

CO₂eq footprint for browser traffic based data consumption

🛠 How to run

Locally

After cloning the repo, you can simply to a yarn start. This will run the pop up with mocked data.

Development build

In order to use the extension for testing purposes, you can create an unpacked dev build via yarn build-dev. This will create a folder build_dev that can be load as unpacked extension into the browser extension manager.

Example Chrome:

  1. Open chrome://extensions/
  2. Enable developer mode
  3. Click on "load unpacked"

✨ Representation

The project homepage can be found here: https://www.ecord.info


📔 Sources & Information

Region based GHG/kWh

Countries
Flag Country Year Source
Europe
🇦🇹 Austria 2020 Link
🇧🇪 Belgium 2020 Link
🇧🇬 Bulgaria 2020 Link
🇭🇷 Croatia 2020 Link
🇨🇾 Cyprus 2020 Link
🇨🇿 Czechia 2020 Link
🇩🇰 Denmark 2020 Link
🇪🇪 Estonia 2020 Link
🇫🇮 Finland 2020 Link
🇫🇷 France 2020 Link
🇬🇧 UK 2020 Link
🇩🇪 Germany 2020 Link
🇬🇷 Greece 2020 Link
🇭🇺 Hungary 2020 Link
🇮🇪 Ireland 2020 Link
🇮🇹 Italy 2020 Link
🇱🇻 Latvia 2020 Link
🇱🇹 Lithuania 2020 Link
🇱🇺 Luxembourg 2020 Link
🇲🇹 Malta 2020 Link
🇳🇱 Netherlands 2020 Link
🇵🇱 Poland 2020 Link
🇵🇹 Portugal 2020 Link
🇷🇴 Romania 2020 Link
🇸🇰 Slovakia 2020 Link
🇸🇮 Slovenia 2020 Link
🇪🇸 Spain 2020 Link
🇸🇪 Sweden 2020 Link
Others
🇦🇷 Argentina 2020 Link
🇦🇺 Australia 2020 Link
🇧🇷 Brazil 2020 Link
🇨🇦 Canada 2020 Link
🇨🇳 China 2020 Link
🇮🇳 India 2020 Link
🇮🇩 Indonesia 2020 Link
🇯🇵 Japan 2020 Link
🇲🇽 Mexico 2020 Link
🇷🇺 Russia 2020 Link
🇸🇦 Saudi Arabia 2020 Link
🇿🇦 South Africa 2020 Link
🇰🇷 South Korea 2020 Link
🇹🇷 Turkey 2020 Link
Regions
Flag Region Year Source
🇪🇺 Europe (EU-27) 2020 Link
🇺🇸 USA 2020 Link
🌎 World 2018 Link

Renewable Energy

gCO₂eq/kWh for renewable energy sources

In depth: Page Visits

A page visit is defined with the tab load status "completed". This currently has some pitfalls and need to be improved

eco2rd's People

Contributors

grenzbotin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bahau88

eco2rd's Issues

[GHG emissions] Update & add new country data

Goal

  • Update the GHG data to the most current available.
  • Add more country data (GHG/kwH): 🇦🇺 Australia, 🇦🇷 Argentina, 🇧🇷 Brazil, 🇨🇦 Canada, 🇮🇳 India, 🇮🇩 Indonesia, 🇯🇵 Japan, 🇲🇽 Mexico, 🇷🇺 Russia, 🇸🇦 Saudi-Arabia, 🇿🇦 South Africa, 🇰🇷 South Korea, 🇹🇷 Turkey

[Feature] Add emission score to categorise the page weight on initial load

** Goal **
In order to better understand the size of the visited site it could be helpful to categorise the initial load size into a score equivalent to see how much data is loaded with the (last) initial page load.

Potential scale (in g CO2):
0 - 0.5g dark green
0.5g - 1g light green
1g-2g yellow
2g - 4g orange
4g+ red

Show version number in pop up

Wanted behaviour
The installed version number should be shown in the pop up (e.g. via settings).

Additional Information
With every version update, the version numbers need to be increased in /public/manifest.json + package.json, too. The same number is expected to appear in the popup.

Development/Production pipeline

In order to develop flawlessly, the plan is to create proper pipelines for

  • Development
  • Production

Currently, whenever you want to run the extension in unpacked mode, it looks the same as in production. This makes development slightly unhandy. The plan is to amend a dev tag in e.g. manifest.json if the dev run the command yarn build-dev in order to be able to distinguish dev mode from prod mode.

Additionally it makes sense to right away change versions if a production build was created. This can be then used for sourcing the right number in #2, too.

[ServiceWorker] Unwanted shut down

Bug description
When the user is not active with the browser but still consuming media (via e.g. stream) the data collection stops at some point. Thus, the numbers visible to the user are stopping increasing, too.

Additional information
Likely the behaviour is related to an unexpected behaviour of the manifest v3 service worker:
The service worker from Manifest v3 seems to be shut down automatically after 5 minutes.
This does not appear to be an issue if the user is constantly moving in between tabs and actively browsing.

More about it can be found here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1152255#c25

Expected behaviour
The service worker, and therefore the data collection shut not stop if the user is passively consuming data via e.g. media streaming.

[Feature] Localisation capabilities

In order to make the extension broadly accepted and used, we could introduce localisation that will support different languages.

** Feature description **

  • Set browser language as language in extension automatically
  • Fallback: English
  • Create folder with localisation files
  • Setup i18next
  • Add a dropdown in settings that show all languages
  • Ensure that number & date formats are shown correctly

Nice to have:

  • Find people to translate into their mother tongue

Cons
The extension size will get larger due to localisation files.

[Feature] Historical data

In order to be able to compare different months and years, it would be nice to replace the current "total" scope with a view that enables the user to easily compare different months in terms of data transfer (green vs. grey, electricity & co2eq).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.