Fork of Fork of colorado county data bar chart pt 2
✓ Published6🌍 Public
This example displays a stacked bar chart of yes and no votes for a Colorado ballot proposition, with one bar per county. Hovering over a county bar currently shows a tooltip, though the tooltip event handlers are commented out, so the feature is inactive. The visualization uses d3.csv and d3.json to load voting data from a CSV and county boundaries from a GeoJSON file, then renders the chart with d3.stack, d3.scaleBand, d3.scaleLinear, and d3.axisBottom. It also implements zoom and pan capabilities using d3.zoom with an invisible overlay rect to capture pointer events.
AI-generated descriptionAn example showing the capabilities of VizHub:
- if you hover over a county it will display the number of yes votes and no votes for the current proposition
- TODO:
- -color the map according to the number of votes
- -add a selector for multiple propositions
- -clean up code and functions into multiple classes
MIT Licensed