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

Allow developers to access real-time grid intensity data through Electricity Maps #134

Open
fershad opened this issue Mar 6, 2023 · 8 comments · May be fixed by #188
Open

Allow developers to access real-time grid intensity data through Electricity Maps #134

fershad opened this issue Mar 6, 2023 · 8 comments · May be fixed by #188
Assignees
Labels
confirmed Specced out and funded things that we are committing to release data roadmap
Milestone

Comments

@fershad
Copy link
Contributor

fershad commented Mar 6, 2023

Currently, there is historical yearly average and marginal grid intensity data available in CO2.js. We would like to take this a step further by giving developers a way to use CO2.js to access real-time grid intensity data from Electricity Maps and CO2signal.

This would be done by effectively providing a wrapper function that calls the Electricity Maps or CO2signal API to fetch data. Developers would need to have their own API token for the service they wish to use.

Docs for both APIs can be found at the links below:

@fershad fershad added this to the 0.13 milestone Mar 6, 2023
@fershad fershad added the data label Mar 8, 2023
@fershad fershad moved this to Next in CO2.js public roadmap Mar 8, 2023
@mrchrisadams
Copy link
Member

Electricity Maps isn't the only provider of information like this, but they do seem to offer the broadest global coverage.

I found out recently that in Germany, one of the major grid operators is exposing realtime information over an API too, without charging.

You can see the map version below:
https://co2map.the-nest.io

And the API docs are here:
https://portal.traxes.io/co2intensity-dev/documentation/co2itensity

@fershad
Copy link
Contributor Author

fershad commented Apr 5, 2023

@fershad
Copy link
Contributor Author

fershad commented Apr 5, 2023

@fershad fershad moved this from Next to Now in CO2.js public roadmap Apr 13, 2023
@fershad fershad modified the milestones: 0.13, 0.14 Apr 13, 2023
@fershad fershad moved this from Now to Next in CO2.js public roadmap Apr 13, 2023
@fershad fershad moved this from Next to Later in CO2.js public roadmap May 5, 2023
@fershad fershad moved this from Later to Next in CO2.js public roadmap Aug 25, 2023
@fershad fershad modified the milestones: 0.14, 0.15 Sep 19, 2023
@mrchrisadams
Copy link
Member

There is now an API for Germany (or at least the northern part of Germany covered by the 50hz grid)

https://eco2grid.50hertz.com/calculation

API details below:

https://api-portal.eco2grid.com/

@fershad fershad changed the title Allow developers to access real-time grid intensity data through Electricity Maps & CO2signal Allow developers to access real-time grid intensity data through Electricity Maps Jan 1, 2024
@fershad

This comment was marked as outdated.

@fershad
Copy link
Contributor Author

fershad commented Jan 25, 2024

After chatting with @rossf7 about this, based on his experience with thegreenwebfoundation/grid-intensity-go I'd like to make this a more modular approach.

This would separate the code logic for using an external data source from the CO2 calculation. In this way, we would also make it easier for folks to contribute other data sources (like the Germany one @mrchrisadams linked to above).

In this way developers can also use CO2.js as a means of connecting with an external data source, even if they don't want to use that data for a carbon calculations.

To make this possible, we'd have to create a new Class, which we can then expose to users. This can then be imported into a project.

@fershad
Copy link
Contributor Author

fershad commented Jan 27, 2024

Being worked on in https://github.com/thegreenwebfoundation/co2.js/tree/add-external-data-sources

Should have a PR ready for review in the next couple of days.

@fershad fershad self-assigned this Jan 27, 2024
@fershad fershad linked a pull request Jan 28, 2024 that will close this issue
@fershad fershad linked a pull request Jan 28, 2024 that will close this issue
@fershad fershad moved this from Next to Now in CO2.js public roadmap Jan 30, 2024
@fershad fershad modified the milestones: 0.15, 0.17 Feb 15, 2024
@fershad fershad moved this from Now to Next in CO2.js public roadmap May 9, 2024
@fershad fershad added roadmap confirmed Specced out and funded things that we are committing to release labels Oct 11, 2024
@fershad
Copy link
Contributor Author

fershad commented Oct 14, 2024

This would also present an opportunity to:

  1. Build this in a way that supports a plugin architecture (similar to what's outlined in Switch to a plugin style approach to exposing models in CO2.js #206)
  2. Write this part of the library in TypeScript, so that we can start to move CO2.js towards using TypeScript incrementally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Specced out and funded things that we are committing to release data roadmap
Projects
Development

Successfully merging a pull request may close this issue.

2 participants