Skip to main content
100%

USA 2012 presidential election proportional circles (d3v3)

✓ Published0🌍 Public
AAlan McConchie
Last edited Nov 7, 2016
Created on Jul 10, 2016

This example uses proportional circles to visualize the results of the 2012 US presidential election at the county level. Circles are placed at each county’s centroid, with their radius scaled to the total number of votes cast, while the fill color encodes the Republican vote share using a blue-purple-red gradient. Counties are layered over a light gray map of the USA, created using the Albers equal-area conic projection via `d3.geo.albersUsa()`. The code loads county boundaries from a TopoJSON file and centroid data from a GeoJSON file, then uses `d3.select` and `d3.scale.sqrt` to generate the SVG circles.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/almccon/'>almccon</a>'s block: <a href='http://bl.ocks.org/almccon/cb30a0f6bdfa2aa5b15f8022b82bc8b1'>USA 2012 presidential election</a>

forked from <a href='http://bl.ocks.org/almccon/'>almccon</a>'s block: <a href='http://bl.ocks.org/almccon/991e064a6680fed4726076d87406590c'>USA 2012 presidential election</a>

forked from <a href='http://bl.ocks.org/almccon/'>almccon</a>'s block: <a href='http://bl.ocks.org/almccon/243e4a79de9257980fe1a0e4bc618dfc'>USA 2012 presidential election bar symbols</a>

mit Licensed

Similar vizzes