-
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
Update Carbon Intensity Range to 0-1500 g co2eq/kWh #4789
Conversation
…k to CO2 intensity legend
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 think the changes look fine code wise (except for maybe one missing change?) but it seems to have the unintended consequence of making all countries look "better" on the map than before.
@madsnedergaard what do you think about this change? Maybe it would be better to make the color range non linear using our existing colors and just add a pitch black (#000) as the 6th step?
Great point. Using all black as the final step would work well for the main theme, but the colorblind theme's final color is already essentially black ( |
Hey, we have discussed this internally and are leaning towards the idea of adding a pitch black step at the very end instead of changing all colors :) But maybe still adjust all colors in color-blind theme to ensure it's usable? |
web/src/helpers/themes.js
Outdated
steps: [0, 150, 600, 750, 800], | ||
colors: ['#2AA364', '#F5EB4D', '#9E4229', '#381D02', '#381D02'], | ||
steps: [0, 300, 600, 900, 1200, 1500], | ||
colors: ['#2AA364', '#F5EB4D', '#C6983A', '#885022', '#381D02', '#381D02'], |
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.
To follow up on my comment, here's an example of what I was trying to say 😄
How about something like this instead? Also seems like we shouldn't use the same color twice at the end, it only made sense before because of the 750/800 step being so close (don't know why it was like that actually).
colors: ['#2AA364', '#F5EB4D', '#C6983A', '#885022', '#381D02', '#381D02'], | |
colors: ['#2AA364', '#F5EB4D', '#B46C32', '#6B3015', '#2A1602', '#000000'] |
Do we still want to update the steps, or do we want to go with a non-linear (current) approach? steps: [0, 300, 600, 900, 1200, 1500],
colors: ['#2AA364', '#F5EB4D', '#B46C32', '#6B3015', '#2A1602', '#000'] Non-linear steps: [0, 150, 600, 750, 800, 1500],
colors: ['#2AA364', '#F5EB4D', '#B46C32', '#6B3015', '#2A1602', '#000'] The benefit of the non-linear option is that we would use the same colors for the same values as we use today with the exception of values over 800 g co2eq/kWh and keeping the established color representation. On the other hand, it's not as intuitive and might look strange both to existing users but maybe even more so to new users. |
Sounds good; updated the themes to use pitch black as the final step. I double checked the colorblind theme and it's still colorblind safe ✅
Happy to make this change too, will defer to other maintainers though, just let me know 🙂 Thanks for the patience and for making it so easy for new contributors to contribute! Also, should I squash all the intermediate commits before the final merge to keep the git history tidy? |
We want as many people as possible helping out with what they feel comfortable doing so thank you for taking the time to do this (even with our discussion in here). There is no need to squash the commits as we use squash merge to merge all PRs and it will do so automatically. |
Super happy to hear that you find it a good experience!
That's a great and tricky question 😄 linearThis would make the difference between very low and somewhat low seem smaller - e.g. France at 40g and Denmark at 150g. It would also make Denmark as an example a lot more green than before (color is not 100% correct though): non-linearIt's does indeed look a bit strange, and the very high numbers are not noticeably different. A mix of both?Maybe we should do something in between and keep the first non-linear steps, but "smooth" it out in the higher end like this?
That would solve the problems mentioned above I think. |
Checking back in on this; sounds like we are choosing between:
Has anyone thought more about which option to go with?
Yeah anecdotally it seems pretty common for several regions to go above |
Thanks for checking back on it! |
Here is a screenshot of the dark range using the existing colors with the addition of #000 however it's still using the old mock data (we should probably update that) with the old emission factors. It's a little missrepresentative for Germany and Poland but France, Denmark and Norway more or less have the same color as the current theme. |
If you have it open, can you share a visual comparison of the different scales? |
LGTM, let's try it! 🥳 |
Sounds good, updated the branch to use |
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'm not sure if it got lost in the conversation but the screenshots I shared used the old colors for the "normal" themes with the addition of #000
as the 6th step.
I added suggestions to restore that but beyond that everything looks great!
This can be merged as soon as the above change is implemented. Thanks for your patience with this PR.
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Oops, missed that part. Thanks for adding the suggestions! |
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.
LGTM! 🎉
Thanks for bearing with us on this PR!
Issue
Zone g co2eq/kWh values is exceeding the range defined in the frontend, see #4771
Description
Updates to the co2eq/kWh factors are causing the co2eq/kWh range to exceed the range defined by the frontend. This PR increases the range from
0-800
to0-1500
co2eq/kWh (since the highest current observed range is 1439).To do this I added an extra step and color to all the co2 scales in the theme file as discussed in #4771. I also increased the width of the ledged by a tad per @VIKTORVAV99 's suggestion. The new width revealed that the legend's text wasn't centered, so I added a line of css to center the text.
I'm wasn't fully sure how to go about picking the new colors and steps; let me know if I should use different ones. I arrived at the colors in this PR by taking the current colors and piping them into this Chroma.js based tool and then adding an extra step. The non-colorblind colors used the same color for the last 2 steps, so I continued to follow that pattern in this PR (was that intentional?). Also, for the non-colorblind colors, the green that was being used was darker than the yellow, so I started the new range with the yellow, but kept the original green as the 1st step in the final range.
The final ranges all have the same lightest and darkest colors as before, there's just more granularity now. Let me know if it would be better to make the endpoints of the range darker/lighter.
Preview