Network graph
This example demonstrates a dynamic force-directed network graph with three labeled nodes (Alice, Bob, Carol) connected by two links. The simulation rearranges the nodes under the influence of link, many-body repulsion, and centering forces, with updates after two seconds to replace the graph with a new configuration involving four nodes and two different links. Built with D3 v7, the code uses `d3.forceSimulation`, `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter` to drive the physics, directly manipulating SVG circles and lines via the declarative `select` and `join` API for rendering.