DataClips + D3.js Force-Directed
This example visualizes monthly book purchase amounts as a force-directed node graph, where each node’s size corresponds to spending and color encodes tiers (green, yellow, orange, red) based on dollar ranges. It consumes a JSON dataset from a Heroku DataClip, preprocessed by parsing dates and amounts. Using D3.js v3’s `d3.layout.force`, nodes are positioned with gravity and charge scaled by amount, while SVG circles and text labels render the data. The color scale uses `d3.scale.category10()` for categorical differentiation, and dragging is enabled via `force.drag`.
AI-generated descriptionSecond demo of consuming Heroku DataClips with D3.js.
Data source: https://dataclips.heroku.com/vgyygvzqtezwpmwpcmmjlluamjlk (.json)
forked from <a href='http://bl.ocks.org/dustinlarimer/'>dustinlarimer</a>'s block: <a href='http://bl.ocks.org/dustinlarimer/5716840'>DataClips + D3.js Force-Directed</a>