This example elaborates on the previous one by adding an attraction force towards arbitrary points, using d3-force-attract by Eric Socolofsky. The plugin, as well as various other useful insights on how to use d3 v4 force layout, is described in this post on hi.stamen.