Sankey snip is an add-on for Google Sheets that creates a Sankey flow diagram as you type, gives you the SVG code to embed it in a web site and the ability to embed it in your Sheet. It’s available on the Sheets add-on store.
I’ll use the Google Charts Sankey variant (which is actually also based on D3 under the hood).
Here’s the Add-on launching menu item
On initialization, Sankey Snip automatically identifies the data on the active sheet and builds a Sankey diagram. The sidebar looks like this and shows a preview of the chart you can choose to insert into your sheet.
About Sankey diagrams
Actually you’ll see the explanation below in the About tab
But here’s a quick explanation for those unfamiliar with Sankey charts.
What is a Sankey chart?
A type of flow diagram that is used to visualize the flow of some resource between process nodes of a network. The width of the connectors represents the volume of flow between processes, and typically the overall volume of resource is preserved throughout the system being visualized.Flows are unidirectional, and loops in the system (A sending to B and then B sending something back to A) are invalid. You can read more about Sankey diagrams here
Sankey Snip is a Google Sheets add-on which maintains a sankey chart preview in the sidebar of the active sheet’s data in real time.
Suitable types of data
Sankey charts are often used to show transformations in a system (for example energy sources and uses), or material or money flows between a co-operating group. Google Analytics uses this kind of diagram to report on site navigation behavior.
A Sankey chart needs 3 data items, which should be laid out as columns with headers in a sheet.
- Source. Sending process name
- Target. Receiving process name
- Volume. Resource volume that flows between between ‘Source’ and ‘Target’
By default, the source data will be automatically detected in the active sheet, but you can customize the column names and range via the Data Settings. Any changes you make to the data will automatically be reflected in the chart preview.
You can get a scaled up version of the chart preview by copying the code shown in the chart settings/embed code area. This will be in SVG format so that you can embed the code or link to the drive file in a web site or document.
It is also possible to insert a static version of the chart in your sheet. The scale and look of the chart is controlled by options in Chart settings.
Google Charts are used for visualization. Information about settings and options can be found here.
Tracking data changes
There is no need for any action to incorporate data changes in the chart preview, since Sankey snip automatically detects active data and updates the preview in real time. It also detects if you switch to another sheet and will attempt to create a chart from whichever sheet is currently active.
Source data columns
There are 3 columns of interest for a Sankey diagram. Sankey snip will try to deduce which columns are which, but you can explicitly set them via the Data settings dialog. The columns section can be used to modify the source data location.
Source data scope
Inserting a full sized chart in the sheet.
This will embed a full sized image as below.
Removing an inserted image
Preview Chart appearance
When you hover over the preview chart, tooltips show summary information about the source data for the link. These settings set the typography appearance. Tooltips are only available in the preview chart, since an inserted chart is simply a scaled image.
In an open document, you can select some different setting by using the Apply settings dialog
The add-on now uses SheetsMore to respect data, so the chart will pay attention to the most common types of filters selected in the UI. Since this is a service with a quota, the setting of respect filters is not saved to avoid unnecessary API traffic, so if you want it, you need to set it for your session. This behavior is set in the Data Settings.
Join our community for news of when this add-on is published so you can use it in your own workbooks.
All features mentioned here are available in the current Sankey Snip version. At some future time, there might be a pro-version with additional capabilities, or a lite version with some features that might need to be unlocked before they are available. For more information on this join our community