[Bug]: Ambigous/incomplete API response
See original GitHub issueContact Details
GitHub/Slack: Willmish
What happened?
The API has a non standardised output for carbon intensity units, since WattTime uses lbs CO2 per MWh, while other providers such as ElectricityMap use grams CO2 per kWh. The response should either provide the units for the reading as well or automatically convert it to a single standard unit (preferred) - ideally using a combination of SI units (grams CO2 per kWh).
Other issue with the output is that the response only contains the WattTime (or other carbon intensity provider) region index, so when querying multiple locations (on the GET /emissions/bylocations
or GET /emissions/bylocations/best
) it requires additional work to identify which data centre region corresponds to which WattTime region. Instead, the API should provide both the WattTime region and the matching data centre region name in the response.
- The API response needs a standardised carbon intensity units
- Double check the unit is actually converted to g CO2 / kWh (cross-reference with electrictyMaps)
- Add documentation to the WattTime units conversion! (Document the standard)
TO DISCUSS:
- The API response needs to provide both WattTime region name and data centre region name that maps to it
client
WebAPI (Default)
Relevant log output
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Just a note that the WattTime plugin does the conversion already, but we should state it’s in grams per kWh in all the documentation
Closing as “The API response needs to provide both WattTime region name and data centre region name that maps to it” is an ongoing discussion on how to handle but not needed for this bug/issue.