Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of prop comparison2

Public visualization

Viewing a saved revision (read-only)

f045bef5da4e4de796fba1b0904a0278

Fork of prop comparison2

0 stars0🌍 Public
Ooliverkendall99@gmail.com
Last edited Dec 13, 2024
Created on Dec 13, 2024
Forked from prop comparison

This example visualizes election results for Colorado counties, comparing yes votes across two propositions with a grouped bar chart. The bars are positioned using `d3.scaleBand` for both county groups and propositions, with height mapped through `d3.scaleLinear` and fill colors from `d3.scaleOrdinal`. It loads county geometry from EarthPy’s GeoJSON and ballot data as CSV via `d3.json` and `d3.csv`, rendering in SVG. An interactive tooltip is implemented in `events.js` to display per-county vote counts on hover.

AI-generated description

An example showing the capabilities of VizHub:

  • Working stacked bar chart with zoom and pan
  • additional features coming early next week