Closed fershad closed 1 year ago
Hi @fershad I'd like to work on this, could you please assign it to me.
Thanks @PrathumP ~~
To help you get started, the averageIntensity
data to use is already exported from src/index.js
. You should be able to import this & use it in the constants file.
Please create a Pull Request when you've started. We can then use that space if you need help with implementation.
I've implemented the required changes. Please let me know if anything else needs to be done.
Thanks @PrathumP. I've left a comment in the PR with some changes that are needed https://github.com/thegreenwebfoundation/co2.js/pull/142/files
I'm sorry but I am unable to find your comment in the PR.
@PrathumP I've copied the comment from the code review into the PR.
Fixed with #142
Currently, CO2.js has a fixed constant for global grid intensity of 442 grams
GLOBAL_GRID_INTENSITY=442
. However, Ember's latest figures for World grid intensity is 435.99 (good job world at moving the needle in the right direction).Rather than having to manually update the
GLOBAL_GRID_INTENSITY
constant each time Ember makes a data update, we should look to use the average grid intensity data that already exists inside of CO2.js. This would allow us to always use the latest global grid intensity, with minimum effort required to keep it up to date.The
GLOBAL_GRID_INTENSITY
variable is set in https://github.com/thegreenwebfoundation/co2.js/blob/97d575e0f62db3269a0eb153462c29064774ee26/src/constants/index.js#L17