Boavizta / datavizta

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update grid intensity used for gwp_emissions_factor to more recent figures

fershad opened this issue · comments

The gwp_emissions_factor values in https://github.com/Boavizta/datavizta/blob/main/static/electrical_foot_print.csv are mostly from 2020, with a few exceptions.

Would you be open to a PR which replaces the electrical_foot_print.csv file with annual average grid intensity data from CO2.js? The grid intensity data in CO2.js is also from Ember, and currently is for the year 2021, though there is an open issue to update this with 2022 data next month.

This would remove the need for manual updates to be made to the CSV file. We're looking to automate data updates in CO2.js later this year as well, which should mean that we've got close to the latest figures from Ember available in the library.

Hi @fershad,
It would be great to use your grid intensity data. Even more so if you automatically update this data.
Feel free to update the code to use the exact same file as the one you use on CO2.js.
If you plan to do it this way, could you just add a column on your CSV file to specify a link to a publicly available source for the grid intensity?

@AirLoren to be clear, what I'd look to do is import CO2.js into the project and use data from the imported library. This would mean there's no longer a reference to the existing CSV file.

I'll have some time in April to create a PR so that you can see what this would look like.

Adding the full CO2.js library (more than 90KB) to only get grid intensity (less than 5KB for all locations) seems a bit overkill. I'd rather regularly update our CSV file with your latest available data.
To simplify, we could use the same format as the one used by CO2.js (/data/co2-intensities-ember-2021.csv)

That makes sense.

I'd rather regularly update our CSV file with your latest available data.

We could automate this with a script that fetches data for the countries/regions in your CSV file from the CO2.js data file below. In that way, there'd be no need to change the current app code either.
https://github.com/thegreenwebfoundation/co2.js/blob/main/data/output/average-intensities.json

@AirLoren I've got a bit of time to look into this over the next few days. I'll write up some automation code to fetch the grid intensities from the CO2.js repo & use that to generate /static/electrical_foot_print.csv

Note that CO2.js is now getting annual grid intensity from Ember updated on a monthly basis to capture any changes in values as data gets updated.