This is the simplest network force diagram I could create. Let me know if you think I can make it tighter.
Build notes:
- It pulls data from a csv file. It uses
d3.stratify()
to reform links into a hierarchy. (NOTE: I ran into a challenge withd.size
when moving from json to csv. Whilesize
is a feature of my data, I had to now access it fromd.data.size
.) - To differentiate between local variables and framework objects, I prefix variables with lowercase 'v'.
Not really thes simplest:
- I bring data in hiararchically via
d3.stratify
and translate it back to links--but that's for the benefit of the d3-unconf class I'm teaching. - I've also included
tick
functionality because it makes me happy to watch it warble into place.
from https://bl.ocks.org/denjn5/6914f73f8bc3f009a875fa2bd11f81d8