🌍 Public
Viewing a saved revision (read-only)
5fa2b7b9ab1a43b8ae233870b9fcc4d0
Untitled
This example shows a small network of six nodes connected by six links, revealing an undirected graph structure. The nodes represent individuals with attributes like gender and profession, while links carry a numeric distance value. A D3 force-directed layout positions the nodes using `d3.forceSimulation` with link, charge, and center forces. The code loads data from a local `data.json` file and renders the result as an SVG with circles for nodes and lines for edges. The simulation updates positions on each tick, though link distances are not explicitly used to set edge lengths.
AI-generated descriptionReact Starter code.