Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default carbon intensity values to be country specific #49

Merged
merged 5 commits into from
Dec 5, 2022

Conversation

lfwa
Copy link
Owner

@lfwa lfwa commented Dec 3, 2022

This PR includes the following changes:

  1. Updated default/fallback value for when live carbon intensity cannot be fetched. We now use the latest average for the specific country detected using data from https://ourworldindata.org/grapher/carbon-intensity-electricity.
  2. If above fails, default to world wide average carbon intensity for 2019 of 475 gCO2eq/kWh instead.
  3. Include script to generate small csv file used in 1. from larger csv file from https://ourworldindata.org/grapher/carbon-intensity-electricity.
  4. Update .gitignore with GitHub's Python template (+ VS code and macOS specifics)

The update requires thepkg_resources import, which should be available through setuptools but it might not be available in Python <3.7. Might want to consider dropping support for Python 3.6 (see also #48).

Testing is recommended.

@lfwa lfwa added the enhancement New feature or request label Dec 3, 2022
@lfwa lfwa requested a review from PedramBakh December 3, 2022 16:43
@PedramBakh PedramBakh merged commit b52e4de into master Dec 5, 2022
@lfwa lfwa deleted the intensities branch December 6, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants