From the course: Data Visualizations with Plotly

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a sankey

Creating a sankey - Plotly Tutorial

From the course: Data Visualizations with Plotly

Start my 1-month free trial

Creating a sankey

- [Instructor] Some visuals can take awhile to sink in, but when they do, they excel at delivering insight. The Sankey diagram is an excellent example of this. At first glance, it can confuse, but through clever storytelling in simplified presentation there's no better way to represent flows through different states. The Sankey diagram derives its name from Matthew Sankey who created this diagram in 1898 to represent energy efficiency and loss throughout the processes in a steam engine. As advertised, it can definitely confuse. But essentially, we're seeing the flow of energy that continues from one state to the next with loss along the way. To create a Sankey of our own, we'll need to use plotly.graph_objects, which we import as go. We'll also import a sample dataset for salmon survival using pandas read_csv. In this example dataset, we have three species of salmon that are released into a lake: Chinook, Sockeye, and…

Contents