See here for the example code that generated this page

SanKey (Alluvial Diagram) Examples

This page demonstrates the interactive SanKey chart type in JSPlots.




Example 1: Voter Transitions (2012 → 2024)

Track how individual voters changed their party affiliation, employment status, and education level across four presidential elections.

This rich example demonstrates:




Voter Transitions 2012-2024

This Sankey diagram shows voter transitions across four presidential elections (2012, 2016, 2020, 2024). Use the 'Affiliation' dropdown to switch between party, employment, or education views. Use 'Weight By' to see raw counts vs. turnout-weighted flows. Filter by region and age group to analyze demographic patterns. Notice the increased party switching in 2016 and subsequent polarization in 2020-2024.

Filters

Plot Attributes


Data: voter_data




Example 2: Shopkeeper Budget Flow Analysis

Track individual money flows from revenue sources through total budget to spending destinations.

This example demonstrates:




Shopkeeper Budget Flows

This Sankey diagram shows money flows in a shopkeeper's budget. Each ribbon tracks specific money from its source (left) through total revenue (middle) to final destination (right). Use the filter to toggle between Legal and Illegal income streams. Notice how illegal income flows to Bitcoin and cash purchases while legal income pays regular expenses.

Filters


Data: shopkeeper_budget




Summary

The SanKey chart type provides:

Use Cases

Data Format Tips


This page was created using JSPlots.jl.