rbracco / covidcompare

Project to map covid19 risk in the US
18 stars 5 forks source link

Refactor sidebar.js to a better design #35

Open rbracco opened 4 years ago

rbracco commented 4 years ago

Sidebar.js is currently poorly written with side effects and hacky code. It needs to be refactored to make building on top of it more stable. Some known issues:

-The select dropdown for which metric to show is regenerated each time the data is updated, and there is a lot of hacky code to maintain state. It should just be permanent and go in it's own DOM element. -The current design only allows for grabbing data that is in the top level of the "properties" attribute of the geoJSON, but we are now aggregating so much data that it should be refactored so that we can have a properly nested data structure.