Cartograms with d3 & TopoJSON - Same-Sex Marriage

placeholder image for old browsers


cartogram.js is a JavaScript implementation of an algoritm to construct continuous area cartograms, by James A. Dougenik, Nicholas R. Chrisman and Duane R. Niemeyer, ©1985 by the Association of American Geographers. This example combines TopoJSON-encoded boundaries of the United States from Natural Earth with 2011 US Census population estimates to size each state proportionally.

States and the District of Columbia are colored by classification into whether their laws defend or remove same-sex marriage rights (and associated protections). Green states allow same-sex marriage, light-green states allow civil unions, orange allow marriage or civil unions, but rulings are currently held on appeal, and red states do not defend same-sex marriage rights, either by law or constitutional amendment.

Data are pulled from the Freedom to Marry site and from news releases, most recently updated on June 6th, 2014.

There’s also a segmentized topology, which distorts the shapes more fluidly than the original.

Designed and built by Shawn Allen at Stamen. But d3.js does most of the heavy lifting.

Fork me on GitHub