defundthepolice
defundthepolice copied to clipboard
Create Map Visualization
What is the Task
Create a Map Visualization for the data
Why do we want to do this
To have a map viz
How can I get started?
- Add a new viz to https://github.com/banjtheman/defundthepolice/blob/main/apps/viz.py
- Here is an example code of a streamlit map https://github.com/randyzwitch/streamlit-folium
Definition of Done
- [ ] Can select a map for the budget visualization
- [ ] The map should be centered around the current county
- [ ] Marker for the current county should be red
- [ ] Mark for other counties should be blue
If it's all right with you, I'd like to work on this issue.
Map data located at https://github.com/banjtheman/defundthepolice/tree/main/data/map_data
So, I have a rough sketch of what the map would look like but I need to finish up a few buggy things and wanted some feedback to make sure it was what you're looking for. I've attached a screenshot for the DC map. A couple questions from here...
-
Do we want to include any data in the popup or is it more of a tool to see where you've selected vs other neighboring counties?
-
If we did want to include data, would we want to do a choropleth map in addition to this map to look at spending per capita, budget line item percentages, or something else to compare counties?
Nice
-
When hover on the pin should show the budget data (item, percent)
-
Yes choropleth map will be great in highlighting differences
Altair has great choropleth map that can be used https://altair-viz.github.io/gallery/choropleth.html
If going for a chloropleth map, will we want the boundaries of the counties? Currently it's just the central lat and lon. If so, I can extract county boundary geometries and add them to the dataset
I've made a geopandas table of the county shapefiles. The resultant csv is 200 Mb though :/ they're pretty hi-def. Going to create an Issue for discussion