Skip to main content
100%

Merging Counties

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Mar 30, 2014

This example demonstrates merging county boundaries into state boundaries using the TopoJSON 1.6 merge functionality. It visualizes the United States by first displaying a static land mass, then animating the sequential drawing of each state’s borders derived from its constituent counties. The animation uses SVG paths with stroke-dasharray transitions, progressively revealing each state’s outline before fading it out. The code employs `d3.geo.path`, `d3.geo.albersUsa`, `topojson.merge`, and `topojson.mesh` to compute and render the geographic features.

AI-generated description

A test for the new topojson.merge functionality available in TopoJSON 1.6. The state boundaries are computed solely by merging county boundaries!

gpl-3.0 Licensed

Similar vizzes