Skip to content

fix carbon intensity geo map #45

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RevantBabu
Copy link

@RevantBabu RevantBabu commented Jan 17, 2025

Noticed Behaviour

Currently the "Carbon Intensity across the world" panel is not fully rendering. Screenshot below for reference:

carbon_intensity_map_current

Relevant error message can be seen in the browser console logs:

console_error_server

Local Reproduction

Can see the same behaviour while running the app locally

console_error_local

Issue/Proposed fix

  • In the local reproduction, we can see its trying to access the absolute os.path - which isn't a valid/available URI for web server.
    Fix: Initially thought of moving world.geo.json form data folder to assets folder. But felt it's better to add a separate route for world.geo.json. Additionally fixed the loader IO route, which had similar issues with path
  • After above change, the world map loads but is just plain. It doesn't show any carbonIntensity data or colour coded
    Fix: need to map the locations to "properties.ISO_A3" on world.geo.json using "featureidkey"

Behaviour after fix

carbon_intensity_map_fixed

Would be glad if you can review this PR and let me know of any comments. Happy to address any suggestions and make further commits.

Thanks
Revant

@Llannelongue
Copy link
Collaborator

Thanks for this! For now we've removed the map for the big release coming out this week, but knowing that it could be fixed like that means that we may put it back in in the coming months, so I'll keep this PR open to be able to merge it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants