banjtheman / defundthepolice

Defund The Police
Apache License 2.0
21 stars 30 forks source link

Create Map Visualization #47

Open banjtheman opened 3 years ago

banjtheman commented 3 years ago

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

trejavu commented 3 years ago

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

banjtheman commented 3 years ago

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

trejavu commented 3 years ago

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

banjtheman commented 3 years ago

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

callumrollo commented 3 years ago

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 commented 3 years ago

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