Skip to main content
100%

DataClips + D3.js Force-Directed

✓ Published0🌍 Public
663anp3ca
Last edited Sep 20, 2018
Created on Sep 20, 2018

This example shows monthly book purchase amounts as a force-directed node layout, where each circle’s size and color encode spending (green for ≤800, yellow for ≤900, orange for ≤1000, red above), with date and dollar labels. It uses D3 v3’s `d3.layout.force` for physics simulation, `d3.json` to load local sample data (originally from a Heroku DataClips endpoint), and SVG for rendering. Nodes are draggable via `force.drag`, with tick updates repositioning them.

AI-generated description

Second 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>

forked from <a href='http://bl.ocks.org/63anp3ca/'>63anp3ca</a>'s block: <a href='http://bl.ocks.org/63anp3ca/359e4a2d5a4d9535226625172ac3372c'>DataClips + D3.js Force-Directed</a>

mit Licensed

Similar vizzes