-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add overrides for isLowCarbon and isRenewable contributions for CH #4088
Add overrides for isLowCarbon and isRenewable contributions for CH #4088
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Maybe it's worth rounding the values to two decimals so we avoid having a file that is so large (and a diff that is quite big)
@FelixDQ let's have a look together before merging, I'd like to discuss data format for these parameters (TLDR they don't respect the same format as the other parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably also update the other values, so that we only use numbers and not a combination of booleans and numbers.
Also remember that we need to update the code here when we merge this:
https://github.com/electricitymap/electricitymap/blob/master/libs/flowtracing/electricitymap/flowtracing/flowtracing.py#L326-L334
@@ -138,6 +160,80 @@ def callback2(ratio, _zone): | |||
) | |||
self.check_power_origin_ratios(callback1, callback2) | |||
|
|||
def check_contribution_object(self, contribution, zone, mode, contribution_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing for two things mainly:
- datetimes - if the contributions for a mode are given as a list with datetimes, we verify that each element of the list have a valid datetime + that the list is ordered by these datetimes
- values for the contributions - check that all contributions have a key "value" and that the value is between 0 and 1
Description
Adds zoneOverrides for the considering the contribution of
unknown
to the renewable and carbon-free percentages for CH.The rationale is detailed in the source provided, but the TLDR; is that 52% of the unknown is hydro discharge, for a zone where more than 80% of the production is carbon free.