🌍 Public
Viewing a saved revision (read-only)
8639ab47b10343c68e015cbf4fa0eb4f
colorado county data map
This example displays a choropleth map of Colorado counties colored by the percentage of yes votes on a ballot proposition. Hovering over a county reveals a tooltip with the county name and counts of yes and no votes, while clicking logs the totals to the console. The visualization uses d3.geoPath with a Mercator projection to render GeoJSON county boundaries, d3.scaleLinear for the color scale, and a d3.pattern overlay to mark counties with majority yes votes. Vote data comes from a CSV file, and the tooltip is positioned using mouse events.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.