Join us

Create a Chord Diagram in Python

Chord diagrams are eye catching, beautiful way to visualize inter-relationships between entities.

Each entity is represented by external nodes. Arcs show the relationship between nodes. The size of the arcs is determined by the strength of the relationship.

Visualize your data with Chord Diagram

Chord diagrams are eye catching, beautiful way to visualize inter-relationships between entities.

Each entity is represented by external nodes. Arcs show the relationship between nodes. The size of the arcs is determined by the strength of the relationship.

Chord Diagram Anatomy. Source (source)

In my opinion, the easiest way to get chord diagrams in Python is to use the Holoviews library. Documentation is here.

Let’s install Holoviews;

I will use a survey dataset for demonstration. In this survey data, data scientists were asked what they would like to learn in the next year. Answers were given in different categories. With the help of the chord diagram, we will be able to visualize the relationship between the different subjects that are wanted to be learned.

The chord diagram takes data in the form of from -> to. That is, arc has a source node and a target node. Therefore, I converted this survey data to from-to format specific to nodes.

Data

Nodes

So, the numbers in the data are the index numbers of the nodes. For example, from 0 to 4, from Language node to Data Analysis node, the value, the size of the arc is 417. It means that 417 people wanted to learn any new programming language and data analysis concept at the same time.

Ta-daa!

Chord Diagram. Image by the author.

Thanks to the chord diagram, we visualized the relationship between entities in a nice and simple way. When we examine the diagram, you can see which two subjects are closer to each other. By using this information, for example, you can understand which topics you should recommend to data scientists together.

Read More…

Create a Network Graph in Python

Bubble Charts in Python (Matplotlib, Seaborn, Plotly)

How to Plot Candlestick Chart in Python?

Line Charts in Python (Matplotlib, Seaborn, Plotly)


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

User Popularity
41

Influence

3k

Total Hits

3

Posts