Plotapi, beautiful by default.

Let plotapi do the heavy lifting – enabling beautiful interactive visualisations with a single line of code (instead of hundreds).

Get Plotapi

IMDb Top 1000 with Plotapi Chord


In [ ]:
from plotapi import Chord
import json

Chord.set_license("your username", "your license key")


In this notebook we're going to use Plotapi Chord to visualise the co-occurrences of genres in the IMDb "Top 1000" (Sorted by IMDb Rating Descending). We"ll use Python, but Plotapi can be used from any programming language.

In a chord diagram (or radial network), entities are arranged radially as segments with their relationships visualised by ribbons that connect them. The size of the segments illustrates the numerical proportions, whilst the size of the arc illustrates the significance of the relationships. Chord diagrams are useful when trying to convey relationships between different entities, and they can be beautiful and eye-catching.


We're going to use the latest IMDB top 1000 data which is available on their website. Let"s get loading the data.

In [ ]:
with open("imdb_top_1000.json", "r") as f:
    data = json.load(f)
names = ['Action', 'Adventure', 'Animation', 'Biography', 'Comedy',
         'Crime', 'Drama', 'Family', 'Fantasy', 'Film-Noir',
         'History', 'Horror', 'Music', 'Musical', 'Mystery',
         'Romance', 'Sci-Fi', 'Sport', 'Thriller', 'War', 'Western']


Let's use Plotapi Chord for this visualisation, you can see more examples in the Gallery.

We're going to adjust some layout and template parameters, and flip the intro animation on too. We'll also configure the data table to hide the indices, and we'll make sure to compress our data table so we have a smaller output size. Finally, we've also set data_table_unique_column="Name", because we have instances where a title has 3 or more genres, and we don't want them to appear multiple times in the same data table selection.

Because we're using a data-table, we can also click on any part of the diagram to "lock" the selection.

In [6]:

Made with Plotapi

You can create beautiful, interactive, and engaging visualisations like this one in any programming language with Plotapi.

Get the Books

Enjoying these notebooks and want more on the subject? Check out the practical books on Data Science, Visualisation, and Evolutionary Algorithms.

Get the books