sketch using d3-force to split and join nodes via buttons
to help break this up, some sketches that show:
and this example shows user interaction to split and join via events
forked from eesur's block: d3 | force grouping via events
forked from 63anp3ca's block: d3 | force grouping via events
https://d3js.org/d3.v5.min.js