defundthepolice icon indicating copy to clipboard operation
defundthepolice copied to clipboard

Create Map Visualization

Open banjtheman opened this issue 4 years ago • 6 comments

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?

  1. Add a new viz to https://github.com/banjtheman/defundthepolice/blob/main/apps/viz.py
  2. 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

banjtheman avatar Oct 05 '20 22:10 banjtheman

If it's all right with you, I'd like to work on this issue.

trejavu avatar Oct 06 '20 16:10 trejavu

Map data located at https://github.com/banjtheman/defundthepolice/tree/main/data/map_data

banjtheman avatar Oct 06 '20 17:10 banjtheman

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...

  1. 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?

  2. 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?

image

trejavu avatar Oct 07 '20 15:10 trejavu

Nice

  1. When hover on the pin should show the budget data (item, percent)

  2. 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

banjtheman avatar Oct 07 '20 15:10 banjtheman

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

callumrollo avatar Oct 08 '20 11:10 callumrollo

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

callumrollo avatar Oct 09 '20 08:10 callumrollo