SANKEY Experiment
This Sankey diagram visualizes global greenhouse gas emissions from 2005 using data sourced from the World Resources Institute, showing the flow of emissions from energy, industrial processes, and land use change through intermediate sectors to specific gases. The diagram uses d3.v5 with a custom `d3.sankey` layout, rendering nodes as draggable SVG rectangles and links as curved paths with stroke widths proportional to flow values. Node positions update interactively through `d3.drag` and `sankey.relayout()`.
AI-generated descriptionThis is an example of a Sankey diagram made using d3.js and the sankey plugin.
A description of how it was put together and techniques for implimenting Sankey diagrams in general with d3.js can be found with the full text in the book D3 Tips and Tricks (for free) from Leanpub.
The data is sourced from the World Resources Institute (http://www.wri.org/chart/world-greenhouse-gas-emissions-2005).
Open in full window for full effect.
This is one of the code samples for the update to the book D3 Tips and Tricks to version 5 of d3.js.