Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Sankey Diagram for air pollution data in Geneva

Public visualization

Viewing a saved revision (read-only)

24673624c1424bf7a6392ae403259c1a

Sankey Diagram for air pollution data in Geneva

0 stars4🌍 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.