SANKEY Experiment
This example visualizes the flow of greenhouse gas emissions from sources like energy, industry, and land use to their final destinations, using a Sankey diagram. The data is loaded from a CSV file and processed to construct a graph of nodes and links, which is then rendered with D3 v3’s SVG. Node heights and link thicknesses encode the magnitude of emissions, and hover effects highlight the links. The chart is built with the reusable d3.sankey layout, with custom margins, colors, and formatting for the values.
AI-generated descriptionThis simply forks the d3noob example to allow a csv as the data source. I am sure that this is probably the ugliest way to do it, but it does work. Please let me know if you have any comments.
Original d3noob.org Readme.md is below
This is an example of a Sankey diagram made using d3.js and the sankey plugin.
It has a point of differenc from other Sankey diagrams I have seen in that the nodes can be moved horizontally and vertically.
A description of how it was put together and techniques for implimenting Sankey diagrams in general with d3.js can be found at d3noob.org or you can download the full text in the D3 Tips and Tricks book (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.