StatFAS › Alluvial and Sankey plot generator › Tutorial · Updated 9 November 2026
An alluvial Sankey plot shows how observations move across categories in several stages, with ribbon widths proportional to counts. In this tutorial you will make one for free in your browser with the StatFAS alluvial Sankey plot generator, style it, highlight flows, read the conversion and drop-off tables and export it. It takes about five minutes, and your data never leaves your device.
Open the free tool and make your plot Jump to the steps
Go to the StatFAS alluvial and Sankey plot generator. An example dataset (1,200 simulated website visitors) loads automatically, so you see a finished Sankey diagram sample straight away and can change the settings while you watch the figure update.
The tool accepts two layouts. One row per observation: each column is a stage and each row is one case. Aggregated rows with a count column: each row is a pathway and one numeric column holds how many observations follow it. Use clear column names, keep one category per cell and leave the first row as the header.
Layout A (one row per observation):
| Visitor_ID | Traffic_Source | Website_Interaction | Engagement | Final_Outcome |
|---|---|---|---|---|
| V0001 | Organic Search | Viewed Blog | No Action | Did Not Purchase |
| V0002 | Paid Ads | Used Tool | Signup | Purchased |
Layout B (aggregated, with a count column):
| Traffic_Source | Website_Interaction | Final_Outcome | Count |
|---|---|---|---|
| Organic Search | Viewed Blog | Did Not Purchase | 146 |
| Social Media | Bounced | Did Not Purchase | 94 |
Under “1. Upload data” choose a .csv, .tsv, .txt, .xlsx or .xls file. The tool reads it in your browser and lists every column. Categorical columns are detected automatically. You can also press “Download example CSV” to see a ready-made file.
Under “2. Choose stages” tick the categorical columns you want as stages. The “Stage order” list shows them from left to right; use ↑ and ↓ to reorder and ✕ to remove one. A message tells you if you have fewer than 2 or more than 10.
If your rows are already aggregated, pick the count column; otherwise leave “None” so each row counts as one observation. Choose whether rows with missing values are excluded or kept as a “Missing” category. “Max categories per stage” (default 12) groups the rarest categories as “Other” so the figure stays readable.
Sort categories by size, alphabetically or in a custom order, and choose whether labels show counts, percentages or both. Open the category manager to untick categories (this removes their observations from the diagram and every table), move them with ↑ ↓ and change colours one by one.
Open “Figure settings” to choose a colour scheme (StatFAS, Colour-blind safe, Grey scale or Soft), set colours, font types and sizes, bold text, node outline and ribbon outline widths, node width and spacing, ribbon opacity, figure height, title and download resolution (150, 300 or 600 dpi). Ribbons can be coloured by source, destination, as a gradient or in grey.
Hover over any block or ribbon for a tooltip with the source, destination, flow count and percentages. Click a block or ribbon to highlight every flow that passes through it; the line under the figure shows how many observations that is and what share reach your goal category. Click empty space or “Clear” to reset.
Under “3. Compare” choose to split your data by a column (for example period or group) or upload a second file with the same columns. Two diagrams are drawn with the same category order and colours, and a comparison table tests every flow.
Under “5. Statistical summaries” you get the overview of observations, category frequencies by stage, every flow with its percentage of the total, conversion and drop-off rates, conversion to your goal categories with 95% confidence intervals, the ten most frequent pathways and chi-square tests between consecutive stages.
Use the PNG, SVG and PDF buttons for the figure (SVG is vector) and the CSV buttons beside each table, or “All summary tables” for one CSV. Downloads require you to be signed up and logged in on statfas.com; creating and viewing the diagram is free.
Go to the tool and create your Sankey diagram online
In the example data, 306 of 1,200 visitors used the tool, and 181 of them (59.15% of that group) signed up. Overall, 212 visitors purchased, a conversion of 17.67% (95% CI 15.61–19.93). The most frequent pathway was Organic Search → Viewed Blog → No Action → Did Not Purchase (146 visitors, 12.17%). A flow’s conversion rate is the flow divided by its source category; its drop-off is the rest, and the chi-square tests tell you whether consecutive stages are associated.
Both draw flows as ribbons whose width is proportional to a quantity. An alluvial diagram follows the same observations across ordered categorical axes (stages), so every stage adds up to the same total. A Sankey diagram is a general flow diagram of quantities between nodes in a network; nodes can sit anywhere, branch and merge freely, and show losses as separate flows. Many tools say “alluvial Sankey style” for the stage-based version, which is what this generator draws.
Each column is one categorical variable (a stage), each block is a category and its height is the number of observations in it. Each curved ribbon is the number of observations that move from a category in one stage to a category in the next stage, and its width is proportional to that count.
Yes. Python libraries such as Plotly can draw Sankey diagrams from lists of sources, targets and values, but you have to aggregate the data and compute any statistics yourself. This online tool does the aggregation, draws the alluvial Sankey plot and reports flow percentages, conversion, drop-off and chi-square tests without any code.
Creating and viewing diagrams is free. All processing happens in your browser, so your data never leaves your device. Downloading PNG, SVG, PDF and CSV files requires you to be signed up and logged in on statfas.com.
Use it to follow groups of observations across stages, for example traffic source to website interaction to engagement to purchase, student progression, survey answers at different time points, or patient pathways. It shows where most observations go and where they drop off.
Add a link to the tool on your website, blog or course page:
<a href="https://statfas.com/alluvial-sankey-plot.html">Alluvial and Sankey plot generator (StatFAS)</a>
APA 7 reference:
Shah, F. A. (2026). Alluvial and Sankey plot generator [Computer software]. StatFAS. https://statfas.com/alluvial-sankey-plot-generator.html