Skip to content
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 indicator map to area impact view #90

Merged
merged 9 commits into from
Oct 31, 2024
Merged

Conversation

vgeorge
Copy link
Collaborator

@vgeorge vgeorge commented Oct 28, 2024

Contributes to #20. This is work in progress.

In this PR we aim to add a choropleth map of the population impacted by the producing area. Other indicators will be implemented in separate tickets as enhancements.

Changes added:

  • Include totalpop parameter in vector tiles and single area API endpoints
  • Added population layer to <AreaLayer/> component
  • Changed machine actions to calculate color ramp dynamically, based on the population of destination areas

Known issues:

  • Production area should also display population filling
  • Add legend for this map view
  • Transition of production->transport area view do not show correct destination areas, while impact->transport does
  • Port icons might be too large

Screen capture:

Screenshot 2024-10-28 at 16 50 10

cc @wrynearson @faustoperez

@vgeorge
Copy link
Collaborator Author

vgeorge commented Oct 29, 2024

Changes added:

  • Legend updates according to the current view
  • Dynamic color ramp for population legend
  • Reduced Port icon size

Quick demo:

transportation

How to give feedback:

  • Start the app locally
  • Click on an area that has flows, like the one in the demo
  • Scroll the side panel, legend and map styles should update accordingly

The transition of production->transport area view is displaying all the destination areas, but I couldn't find what is causing the issue yet. I suggest we ticket in separate if this is not blocking.

@wrynearson this is ready for a review.

@wrynearson wrynearson self-requested a review October 29, 2024 15:59
Copy link
Collaborator

@wrynearson wrynearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a bug when selecting a second producing area while in the impact on people view from a first producing area – the first impact on geometries are shown on the impacts from the second. @vgeorge and I discussed this just now.

@vgeorge vgeorge requested a review from wrynearson October 30, 2024 17:09
@vgeorge
Copy link
Collaborator Author

vgeorge commented Oct 30, 2024

@wrynearson I added a change to address the issue you found. I also included an empty state to make it clear when no flows are available for an area (contributes to #85). It says "Go to World View" instead of the Figma design’s "Go back" because the user might be accessing the area URL directly, so there may be no browser history to return to. I won't be adding more features to this PR, this is ready for a final review.

Screenshot 2024-10-30 at 17 11 22

@vgeorge
Copy link
Collaborator Author

vgeorge commented Oct 31, 2024

@wrynearson and I reviewed this together and decided that it is ready to merge.

@vgeorge vgeorge merged commit 317bd6d into develop Oct 31, 2024
@vgeorge vgeorge deleted the feature/population-map branch October 31, 2024 12:15
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