D3 force layout keeps track of node positions by setting x and y properties on the underlying data. By default it chooses starting positions at random, which is convenient, but leads to high-velocity, distracting movements when force calculations begin.
For many graph structures, it's easy to do better than random for starting positions. We can set specific start positions on the data before handing over control to force layout.
In this example, clicking on a node expands its 10 immediate neighbours. For a short period