In the spirit of exploring new visualizations, I wanted to learn how to create a Sankey diagram within MicroStrategy Desktop (also known as Visual Insight in web). A Sankey diagram is used to visually explain flow or many to many relationships with respective proportions. The visualization needs a source attribute, target attribute, and measure to size the path or flow.
In order to support the visualization, I grabbed data off of http://www.starwars.com/databank. The databank also had images I could leverage as a twist on the visual format. Cross referencing IMDB, I created a list of popular characters by Star Wars Movie (Episodes I-VII and Rouge One). For each movie appearance, I gave the character a count value of 1. The max value of appearances is 8, if the character appeared in all 8 movies.
Sankey diagrams are not out of box for MicroStrategy Desktop & VI. However, it’s very easy to add-on a new visualization by following the steps outlined here. I downloaded the Sankey visualization, opened MicroStrategy Desktop, File > Add Visualization from File.
Initially I started simple. Selecting the Sankey visualization, I set Movie as the Source, Character as the Target, and Appearance Count as the Weight.
Okay good start – but there’s a lot of characters and it’s hard to see that R2-D2 and C-3PO are the most prevalent for appearances across movies.
To make the dashboard more intuitive, I needed filters to narrow the scope of the characters. I also wanted to make the dashboard more engaging – hence bringing in images. To bring in the images I simply scripted their html link from the Star Wars databank with html tags, importing the data and setting the data type on the columns for readability in the tool.
The movie images allow the user to filter the Sankey diagram for a specific movie. For example, if Episode 4: A New Hope is selected, the Sankey will show all characters for the movie while still maintaining their weight for appearances in the series. For the available characters within A New Hope – the characters with the least appearances still appear in 37.5% of the Star Wars Movies. 37.5% is 3 out of 8 movies. This includes Grand Moff Tarkin and Jabba the Hutt.
I can move the slider at the top to view characters from A New Hope that reappear in at least 50% of the series.
Darth Vader appears in at least 50% of the series, appearing in 4 movies so far. (For the Star Wars purist, I have broken out Anakin and Darth into separate characters, feel free to debate it below in the commentary). If I click on Darth Vader’s image on the left, it will exclusively show me Darth Vader in A New Hope. However, if I hit the Movies header to reset the filter on A New Hope, I can see all movies Darth Vader has appeared in. The character images are also a filter for both the Sankey and Movies that populate on the left.
I reset all filters and compare the characters across all movies that appear at least 50% of the series.
With the data limited to the more popular characters, it’s more prevalent here that R2-D2 and C-3PO appear in all the movies. R2-D2 always saving the day…
This was a quick demo to understand the use of a Sankey diagram and interactivity. With full disclosure there are some flaws with the sorting and filtering. The sorting was behaving off when trying to set it for the Sankey. Also for the filtering, it would have been nice to have interactivity go both ways for the Movies & Characters filtering the Sankey, and the Sankey filtering Movie & Characters. This would have allowed the flow for Darth Vader exclusively to show his movies on the left and only his character image on the right. Smalls things – but would improve user experience.
May the force be with you.