Sankey Particles
This example visualizes the UK energy system as an interactive Sankey diagram, where animated particles travel along the links to represent energy flow between sources and consumers. Nodes can be dragged to reposition, which updates the link paths and particle trajectories. The visualization combines D3.js for the SVG-based Sankey layout and drag behavior with a Canvas overlay for rendering the moving particles. Particle frequency scales with link value, and each particle’s color interpolates from the source node’s color to the target node’s color. The code uses the sankey.layout and sankey.relayout functions to compute node positions and a d3.timer to drive the animation.
AI-generated descriptionUsing particles to indicate flow between reservoirs in a sankey diagram. This time with particles moving at the same speed and same size. An earlier example used particles of differing sizes and differing speeds moving in "bursts" between nodes.
Drag the nodes to adjust the paths of the particles.
forked from <a href='http://bl.ocks.org/emeeks/'>emeeks</a>'s block: <a href='http://bl.ocks.org/emeeks/9673c96a682fe3948379'>Sankey Particles II</a>