Skip to main content
100%

Force-Based Cartogram to Bubble Chart

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 19, 2018
Created on Jan 28, 2017

A force-directed cartogram of U.S. county demographics smoothly transitions into a bubble chart, cycling through population attributes by sex, Hispanic origin, and race. Using `d3.forceSimulation`, `d3.forceCollide`, and `d3.forceX`/`d3.forceY`, circles representing counties are initially positioned by real geographic coordinates (cx, cy), then repelled by collision forces. A click toggles a mode where the force layout is replaced by a clustered arrangement along a horizontal axis, with bubbles sized and colored by the selected demographic variable via `d3.scaleLinear`, `d3.scaleCluster`, and `d3.hsl` accents. Data comes from Duke University’s county population estimates.

AI-generated description

Taking advantage of the forceSimulation-based nature of the cartogram to switch to a bubble chart using the same data.

Demographics from http://library.duke.edu/data/collections/popest

forked from <a href='http://bl.ocks.org/emeeks/'>emeeks</a>'s block: <a href='http://bl.ocks.org/emeeks/894ff63d02551badfc75536d77dcd49c'>Cartogram to Bubble Chart</a>

mit Licensed

Similar vizzes