-
Notifications
You must be signed in to change notification settings - Fork 26
[Feat] add kpis to regions #1158
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
base: main
Are you sure you want to change the base?
Conversation
kaylawoodbury
left a comment
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.
These changes are looking great! 😄 🙌
The only thing I noted was a couple places where we could move the map specific colouring to use the utils.
src/components/maps/constants.ts
Outdated
| @@ -1,4 +1,4 @@ | |||
| export const MUNICIPALITY_MAP_COLORS = { | |||
| export const MAP_COLORS = { | |||
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.
There is a util for colour gradients, I'm wondering if it makes sense to keep them together so the different rankings pages can all reference them regardless of the diagram/chart being use?
src/components/maps/SwedenMap.tsx
Outdated
| return value === true ? gradientEnd : gradientMidLow; | ||
| } | ||
|
|
||
| const mean = values.reduce((sum, val) => sum + val, 0) / values.length; |
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.
Same here, I tried to extract this into a util called createStatisticalGradient() in the colorGradient.ts file for the company rankings, do you think it would work to use the same util for the map view as well?
|
Thanks for the feedback @kaylawoodbury ! Updated map and legend to use color gradients functions as well as moved default gradient colors to that file, let me know what you think :) |
✨ What’s Changed?
Add KPIs meets Paris and emissions to regions.
Depend on Klimatbyran/municipality-data-pipeline#56 and Klimatbyran/garbo#1028
📸 Screenshots (if applicable)
Before

After

📋 Checklist
Closes #1083