Green-Software-Foundation / carbon-aware-sdk

Carbon-Aware SDK
https://carbon-aware-sdk.greensoftware.foundation/
MIT License
479 stars 99 forks source link

[Feature Contribution]: Support for permissively licensed annual marginal intensity data #189

Closed mrchrisadams closed 1 year ago

mrchrisadams commented 2 years ago

Hi there, the org I work for, the Green Web Foundation has been working with the the UNFCCC to get the greenlight for us to publish their annually updated marginal intensity data with a license that allows it to be included in open source software libraries.

We've been able to do this now, and it's packaged into CO2.js, an OSS library we have created to make it easy to incorporate calculations into software so it can self-report its own emissions.

We also have a golang library we're planning to add it to, and given that's freely licensed, I think could work as a data source for the Carbon Aware SDK.

This would mean that even if you don't have an API key from providers like Watttime, or can't make outbound API requests, you could start coming up with marginal intensity numbers, to make it possible to create SCI scores (with the caveat that you're using numbers that would update annually, so they wouldn't be suitable for certain use-cases).

I'm not sure, but there may be places where the UNFCCC numbers we were able to republish provide coverage where there isn't info.

Also, when you combined this with IP geolocation software, you could start coming up with very high level estimates for services from providers, based on their geolocated IP address, for cases where you don't have region level info published.

We do this with our own IP-to-carbon-intensity API, and the source code for how do this is public on our own codebase - I'm happy to show how we did it for others to take a similar approach: https://developers.thegreenwebfoundation.org/api/ip-to-co2/overview/

Anyway, none of our team really know C#, otherwise we'd make a pull request, offering to help do this ourselves.

There's also a few edge cases to iron out, like what fallback figures ought be when data for a given country doesn't exist.

👍🏽?

PS. This initial work was funded by the RIPE NCC community network fund, on the "carbon aware internet" project - we've put a second bid in to raise some funding to allocate developer time to contribute to this work in 2023, but we won't hear if the funding is approved til later in the year. I'll update if we do tho, as it'll be easier for us to make proper commitments of resources over the next 12 months at that point.

Code of Conduct

Feature Commitment

vaughanknight commented 2 years ago

Super interested in data sources and how we can use them, will definitely review this. Might take us some time as our backlog is growing but will let you know!

github-actions[bot] commented 1 year ago

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

github-actions[bot] commented 1 year ago

This issue has not had any activity for too long. If you believe this issue has been closed in error, please contact an administrator to re-open, or if absolutly relevant and necessary, create a new issue referencing this one.