What is it for?
Use this template to create Sankey diagrams and alluvial diagrams. It's ideal for displaying energy flows or the changes in seats between parties from before to after an election. Sankey diagrams consist of directed arrows or bands whose widths reflect the weight (e.g. the volume) of the flows from node to node.
In Flourish, you can choose between a Sankey diagram and an alluvial diagram. Alluvials are usually more rigid than Sankey diagrams, with every band in incident with a node at each horizontal position. They are commonly used to depict how items re-group.
How to get started
Your data can come in two formats.
- With flows in the data
- If you already have flows in your data, each row will have a source name, a target name and a flow value (plus optional step from and step to columns for multistep alluvial diagrams). If specifying flow values directly, the column used for Value must contain positive numbers or zero.
Before After Seat flow Step from (optional; only in alluvial mode) Step to (optional; only in alluvial mode) Progressives Progressives 35 2012 2016 Radicals Moderates 28 2012 2016 Progressives Radicals 12 2012 2016
For this data, your Select columns to visualise panel would look like this:
If you have Step from and Step to values, your Sankey headings will be populated with the values in those column headers. If not, the Source and Target bindings will be used for headings.
- Without flows in the data
- In this model, each row is a entity (e.g. a seat in an election), with a source name and target name (e.g. representing the ruling party before and after the election). With this kind of data the column binding for Values is left empty and flows are computed automatically by adding up source–target pairs (taking into account step from and step to values). Names are compared and values summed using case-insensitive comparisons with all non-alphanumeric characters stripped. For example, Cat and cA ?t are considered identical.
source target Loonies Green Independents Radicals Independents Radicals
For this data, your "Select columns to visualise" panel would look like this:
- The optional Step from and Step to column selection boxes make it possible to construct multistep alluvial diagrams where links go from Step from to Step to along the horizontal direction. If only Step from is assigned to a column then the value of Step to is assumed to be one greater than that of Step from. Similarly, if only Step to is assigned to a column then the value of Step from is assumed to be one less than that of Step to .
- You can also a filter to your visualization by binding a column to Filter
- Your filter will appear as a dropdown by default – here's an example:
- If you would prefer your filter to appear as buttons or a time slider, you can change that in the Controls settings.
Once published, hovering over a link will defocus all other links and any node not connected to that link. Hovering over a node will defocus all links that are not directly connected to that node and all nodes not connected via a link to the hovered node. You can fix focus on a node or link and all its connections by clicking on the entity. This is particularly useful for guiding viewers through your stories. Click a focused node or link again to remove the focus or click any other node or link to change focus to that entity.
- Head to the settings Preview tab to change the appearance of your diagram. You might want to specify the ordering of your results to show in the same order as your raw data, for example.