🌍 Public
Viewing a saved revision (read-only)
870a1778a339469c907b8cc3e84a64a8
Sankey Diagram for air pollution data in Geneva
NNita
Last edited Jan 9, 2021
Created on Jan 9, 2021
This Sankey diagram visualizes air pollution data from Geneva, showing the flow of pollutants between different categories and locations. The code loads CSV data from a GitHub gist and transforms it into a node-link structure using custom logic in `transformData`. It renders the diagram as an SVG using the D3.js v5 library, specifically leveraging the `d3.sankey()` layout to position nodes and links. Each link’s stroke opacity increases on hover, and nodes are colored using `d3.scaleOrdinal(d3.schemeCategory10)`.
AI-generated descriptionSankey Diagram for air pollution data in Geneva.