Skip to main content
100%

Sankey Diagram for air pollution data in Geneva

✓ Published4🌍 Public
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 description

Sankey Diagram for air pollution data in Geneva.

MIT Licensed

Similar vizzes