Skip to main content
100%

Stitching States from Counties

✓ Published0🌍 Public
Mmbostock
Last edited Jun 11, 2015
Created on Nov 23, 2012

This example demonstrates how to stitch together individual county boundaries into state outlines. It converts a TopoJSON file of US counties into a state-level map by identifying arcs that are shared only within a single state and merging them into continuous paths. The code uses D3.js to load and process the topology, tracks arc membership per state, and reconstructs polygons by connecting fragment chains. The resulting map is rendered using the standard D3 `geoPath` projection.

AI-generated description

Similar vizzes