Skip to main content
100%

Fork of Fork of Fork of colorado county data bar chart pt 2

✓ Published0🌍 Public
Bbepnye@gmail.com
Last edited Dec 4, 2024
Created on Dec 4, 2024

This example displays a stacked bar chart of yes and no votes for a Colorado ballot proposition, with each county represented as a bar. Hovering over a bar reveals a tooltip with the county’s vote counts. The chart is built with D3 v4 using `d3.stack`, `d3.scaleBand`, and `d3.scaleLinear`, rendering SVG elements. Data comes from a GeoJSON file of Colorado counties and a CSV of proposition results.

AI-generated description

An 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

Similar vizzes