Electricitymap-contrib: Bring back old fallback mixes

Created on 7 Apr 2020  路  8Comments  路  Source: tmrowco/electricitymap-contrib

Previously Electricity Map had a number of hardcoded values for exporting zones where amount of export was known and carbon intensity of the export could be reasonably estimated, but this has gone missing. It appears AZ, BY, CA-NB, CA-BC, CA-QC, RU-KGD, and likely others were deleted in #2347.

https://github.com/tmrowco/electricitymap-contrib/pull/2347/files#diff-aabe482f1230f09038f28c092ad1569dL844

https://github.com/tmrowco/electricitymap-contrib/pull/2347/files#diff-aabe482f1230f09038f28c092ad1569dL1359

Additionally ZA and ZM were also deleted, although their lack doesn't hurt anything because Namibia data is no longer available :(

https://github.com/tmrowco/electricitymap-contrib/pulls?q=hardcode might be a list of things to double-check

data needed good first issue

Most helpful comment

In the PR linked in the first comment, Tomorrow accidentally deleted work others contributed - including source links and refs that can be pointers for finding origin ratios - but you haven't bothered to bring it back in 8 months and we fallback to a generic 301 gCO2eq/kWh... that doesn't feel great :/

All 8 comments

This is because I didn't find enough 2019 data to split them properly by fuel type. I can probably fix this by using 2018 data instead. I'll try to look at this in the coming days.

These regions never had breakdown by fuel type, other than from long-term stats in the sources cited. The hardcodes were a best effort to work around missing data.

@jarek are you able to help us find mix data and add it to the file? That would be greatly appreciated. We will probably remove the carbon intensity fallback in the near future in order to rely only on a mix fallback. This ensures that we can properly compute the % renewable and % low carbon, as well as the carbon intensity (which can be inferred from the mix).

Sorry I haven't gotten around to this yet. The data was previously in the repo so it's just a matter of digging through file history I linked if someone has time

Closing due to inactivity

In the PR linked in the first comment, Tomorrow accidentally deleted work others contributed - including source links and refs that can be pointers for finding origin ratios - but you haven't bothered to bring it back in 8 months and we fallback to a generic 301 gCO2eq/kWh... that doesn't feel great :/

@jarek I apologise, I don't feel great about it either :/ The issue here is that we had a data inconsistency as we only had the fallback values (intensity and % renewable), and not the mix, which meant that some zones crashed our system as there were two ways to e.g. determine % renewable: using the fallback value, or using the fallback mix.
We therefore coded unit tests and had to make a choice to either keep the inconsistency, or make the system consistent (which meant delete some data to have one single source of truth).

The mistake we did is to not prioritise high enough finding mixes so we can bring the old data back. I apologise. Putting this on your radar @Kongkille so we don't repeat that mistake. It's definitely sad when we lose data, and should be really be avoided.

At this stage however, we need to do some work to find the fallback mixes and add them again.

Here's the list of the zones for which we need to find a fall back mix if we want to bring the old behaviour back:

  • [x] AZ
  • [x] BY
  • [x] CA-BC
  • [x] CA-NB
  • [x] CA-QC
  • [x] MX-BC
  • [x] NKR
  • [x] RU-KGD
  • [x] ZA
  • [x] ZM

The diff here might contain some links that can be re-used

Task: find the mix for these zones, and add it to the parameters JSON file.

I'll re-open the issue.

I ended up finding them all quite easily, making a PR

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brunolajoie picture brunolajoie  路  3Comments

ghost picture ghost  路  5Comments

jiwidi picture jiwidi  路  4Comments

StefanAO picture StefanAO  路  4Comments

consideRatio picture consideRatio  路  4Comments