Merging States
A choropleth of U.S. states highlights a selected subset in orange while the remaining states appear gray with white interior boundaries. The example demonstrates `topojson.merge`, which combines multiple polygon geometries into one unified path, removing shared borders between selected states. It uses D3 v3 with `d3.geo.albersUsa` projection, `d3.geo.path` for rendering, and TopoJSON to load the U.S. state data. The selected states are chosen by a hardcoded set of state IDs, and the merged result is drawn as a single SVG path.
AI-generated descriptionThis demonstrates using topojson.merge, a new feature in TopoJSON 1.6, to merge multiple polygons into a single polygon whilst removing interior borders. (An alternative approach is to draw the polygons twice.)
This example is in response to a Stack Overflow question.