Maximize Your Insights by Choosing the Best Chart: Network, Heatmap, or Sankey? | by Erdogan Taskesen | Aug, 2023

Beautiful visualizations are great but to maximize the interpretability, you need to choose a chart carefully.

Photo by David Pisnoy on Unsplash

Visualization is an important part of data analysis as it can transform data into insights and help you with storytelling. In this blog post, I will focus on Network charts, Heatmaps, and Sankey charts. These charts have the same input, but we should keep in mind that they are designed with a specific goal, and the interpretability can therefore differ. I will describe the differences between Network, Heatmap, and the Sankey chart, the applications, and I will demonstrate their interpretability with a hands-on example. All examples are created in Python using the D3Blocks library.

As a data scientist, a common but essential task is making plots. Sometimes these plots serve as sanity checks and sometimes they end up in presentations and form the fundamentals of the story. Especially for the latter case, we aim to transform complex information into logical graphical visualizations.

Creating plots is like photography. You want to capture the scenery that tells the story.

However, deciding which chart to use is not always an easy task because, although charts can have similar input, they are designed to describe a specific part of the scenery. The input for the three charts requires source, target, and weight information. A small example is shown below. It describes how the variables (or nodes) are connected and the strength of it. Or in other words, Penny is connected with Leonard with strength 5. The second node name is again Penny who is also connected with Amy but the strength is slightly less with value 3 and so on.

# Source node names
source = ['Penny', 'Penny', 'Amy', 'Bernadette', 'Bernadette', 'Sheldon', 'Sheldon', 'Sheldon', 'Rajesh']
# Target node names
target = ['Leonard', 'Amy', 'Bernadette', 'Rajesh', 'Howard', 'Howard', 'Leonard', 'Amy', 'Penny']
# Edge Weights
weight = [5, 3, 2, 2, 5, 2, 3, 5, 2]

Source link

Leave a Comment