As a transitional step, this site will temporarily be made Read-Only from July 8th until the new community launch. During this time, you can still search and read articles and discussions.

While the community is read-only, if you have questions or issues requiring TIBCO review/response, please access the new TIBCO Community and select "Ask A Question."

You will need to register or log in or register to engage in the new community.

Sankey Diagram Mod for TIBCO Spotfire®

Depict a flow from one set of values to another.

Compatible Products

TIBCO Spotfire®

Compatible Versions

  • TIBCO Cloud Spotfire® 11.3 and later
  • TIBCO Spotfire® Analyst 11.3 and later
  • TIBCO Spotfire® Business Author 11.3 and later
  • TIBCO Spotfire® Consumer 11.3 and later

License

BSD

Overview

The Sankey Diagram Mod displays a flow from one set of values to another, in which the width of the arrow is shown proportionally to the flow quantity.

Sankey Diagram Mod for TIBCO Spotfire®

Sankey diagrams (also called alluvial diagrams) are typically used to visualize energy or material or cost transfers between processes. They put a visual emphasis on the major transfers or flows within a system and are helpful in locating dominant contributions to an overall flow.

Try this mod in TIBCO Spotfire® Analyst

Click the Download button and follow the instructions below the button to open the mod in Spotfire Analyst.

How to open the mod

  1. Open Spotfire® Analyst, and create an analysis by loading some data.
  2. Unzip the downloaded file, and locate the .mod file in the unzipped folder.
  3. Drag the file into the analysis.
  4. The visualization mod is added to the analysis.
  5. To learn more about the capabilities and limitations of this visualization mod, see also the Reference Info tab or the User Guide which is also located in the downloaded folder.

For general information on how to use and share visualization mods, read the Spotfire documentation.

Data requirement

To make the Sankey Diagram Mod work properly a data table with at least four columns is required:

  • One column should identify entities, for example, names of countries, people or objects.
  • One column should contain measures for the country, person or object
  • Two or more columns should contain categories, process steps, or contributions

For detailed information on data requirements, the available settings, and an example of how to set up the sankey diagram, see Reference Info.

Help and support

Please note that this Mod for TIBCO Spotfire® is not supported through support.tibco.com. In the event of issues or to get help or to suggest enhancements, please post a comment in the mod's wiki page or in the Mods's GitHub repository.

There are currently no reviews for this content.

Why not be the first to review it - click here to login

Sankey Diagram Mod for TIBCO Spotfire®

 

Version 1.0.0, released July 2021

The Sankey Diagram Mod displays a flow from one set of values to another, in which the width of the arrow is shown proportionally to the flow quantity.

Sankey Diagram Mod for TIBCO Spotfire®

Sankey diagrams (also called alluvial diagrams) are typically used to visualize energy or material or cost transfers between processes. They put a visual emphasis on the major transfers or flows within a system and are helpful in locating dominant contributions to an overall flow.

Try this mod in TIBCO Spotfire® Analyst

Click the Download button and follow the instructions below the button to open the mod in Spotfire Analyst.

Download Sankey Diagram Mod for TIBCO Spotfire®

How to open the mod

  1. Open Spotfire® Analyst, and create and analysis by loading some data.
  2. Unzip the downloaded file, and locate the .mod file in the unzipped folder.
  3. Drag the file into the analysis.
  4. The visualization mod is added to the analysis.
  5. To learn more about the capabilities and limitations of this visualization mod, keep reading or see the User Guide which is also located in the downloaded folder.

For general information on how to use and share visualization mods, you can read the Spotfire documentation.

Data requirement

Every mod handles missing, corrupted and/or inconsistent data in different ways. It is advised to always review how the data is visualized.

To make the Sankey Diagram Mod work properly a data table with at least four columns is required:

  • One column should identify entities, for example, names of countries, people or objects.
  • One column should contain measures for the country, person or object
  • Two or more columns should contain categories, process steps, or contributions

Setting up the sankey diagram

Let's analyze electoral swing in last three US presidential elections and visualize how votes of people in respective states changed.

US Elections Sankey Diagram

The data used for this visualization comes from Harvard Dataverse and contains constituency (state-level) returns for elections to the US presidency. See below for the required data preparation, or download the pre-configured dataset here.

State State ISO Electoral Votes Party 2012 Party 2016 Party 2020 Candidate 2012 Candidate 2016 Candidate 2020
Alabama AL 9 Republican Republican Republican Romney, Mitt Trump, Donald J. Trump, Donald J.
Alaska AK 3 Republican Republican Republican Romney, Mitt Trump, Donald J. Trump, Donald J.
Arizona AZ 11 Republican Republican Democrat Romney, Mitt Trump, Donald J. Biden, Joseph R. Jr
... ... ... ... ... ... ... ... ...
Wisconsin WI 10 Democrat Republican Democrat Obama, Barack H. Trump, Donald J. Biden, Joseph R. Jr
Wyoming WY 3 Republican Republican Republican Romney, Mitt Trump, Donald J. Trump, Donald J.

 

A Sankey diagram can be configured to show the number of electoral votes per respective states over three years for the different candidates and also shows the link between the year for a state, thus showing that some states from 2012 Obama changed to 2016 Trump and then to 2020 Biden.

  1. Add the Sankey diagram and use Electoral Votes on the X-axis
  2. Add Candidate 2012Candidate 2016 and Candidate 2020 to the Y-axis
  3. Add Candidate 2020or Party 2020 to Color-by axis and adjust the colors to the parties’ typical colors

Because the Sankey diagram also supports marking, you can create a detailed table visualisation then listing the actual state names and electoral votes to give you more details.

Data preparation

The data preparation contains a couple of steps to filter and pivot the data to get it in the right shape for the Sankey diagram. 

The data set in the required format for the Sankey diagram with one row per state:
US Elections Sankey Diagram Data

To create the required data structure with one line per entity and categories as columns from the original data source, several steps have to be done in Spotfire:

  1. Download the data as CSV from Harvard Dataverse
  2. Import the data into Spotfire
  3. From the data panel:
    1. Filter rows for [year]>=2012
    2. Create a new calculated column to identify why candidates got the most votes per state with maxcandidatevotes using Max([candidatevotes]) Over ([year],[state])=[candidatevotes]
    3. Filter rows for [maxcandidatevotes]=True
  4. From the data panel, then pivot the data with one row per state and create columns for candidate and party_simplified per year.

Using the sankey diagram

Marking

You can mark a single flow by clicking it, mark several flows by Ctrl-clicking on them or mark categories of flows by clicking on the categories. Clicking in the empty space in between flows will clear the marking.

 

Help and support

Please note that this Mod for TIBCO Spotfire® is not supported through support.tibco.com. In the event of issues or to get help or to suggest enhancements, please post a comment in this TIBCO Community Wiki page or in the Mods's GitHub repository.

More information about TIBCO Spotfire® Mods

 

< Back to the Sankey Diagram Mod page on TIBCO Community Exchange

View the Wiki Page