-
Notifications
You must be signed in to change notification settings - Fork 0
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 equity map #87
base: develop
Are you sure you want to change the base?
Add equity map #87
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
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 job wrangling all this data, for how much is there I think it looks really good and renders quickly. I also didn't know about dirty-reproject
which is pretty cool. I left two comments, but they're minor and this successfully gets a basic equity map up so we can move forward discussing how best to display this data. FWIW I think the diagonal lines work but breaks down by the midwest/southeast—but I could also see this data being compelling as a toggle-able layer over the per-capita map and maybe that diagonal pattern will be most visible over colored states this way? Interested to see where this goes!
}, [map, disadvantagedCommunitiesData]); | ||
|
||
useEffect(() => { | ||
var svg = map |
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.
var svg = map | |
const svg = map |
|
||
useEffect(() => { | ||
import('../../data/disadvantagedCommunities.json').then(data => { | ||
setDisadvantagedCommunitiesData(data as unknown as GeoJSON.GeoJSON); |
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 this useEffect
is getting called every time we toggle between the per capita map and then back to the equity map. After the initial toggle to the equity map I would think we wouldn't need to re-render, would useMemo
be more appropriate here? Also not sure how relevant this is if we're eventually refactoring this as a toggle-able layer.
291f5bd
to
6e7faf7
Compare
Closed since we're proceeding with a different equity map. See #100 for replacement. |
Overview
This PR adds a basic version of the the equity map.
The equity data shapefile is large, >300mb, and can't be served to the frontend in one piece. In order to reduce the size of the data, I performed the following steps:
Then I used
dirty-reproject
to project the map with albersUsa. (For some reason this created bounding-box shaped rings around each element. The best way I could figure out to delete these was to do a find and replace in the JSON file, though this was time consuming and error-prone.)The map in it's current state is not done and doesn't match the design exactly, but the amount of data displayed (and the limitation of it being just one giant feature) also differentiates it from the design. I figured we could start here and re-evaluate display of this data. A few things to consider are:
Closes #67
Demo
Testing Instructions
Checklist
fixup!
commits have been squashedCHANGELOG.md
updated with summary of features or fixes, following Keep a Changelog guidelinesREADME.md
updated if necessary to reflect the changes