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

Total Global Email & Spam with Plotapi Terminus


In [1]:
from plotapi import Terminus
import json

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


In this notebook we're going to use Plotapi Terminus to visualise the average daily email & spam volume for August 2021.

In the Terminus diagram (a type of flow diagram), we can watch the journey of something or someone from some starting category to some ending category. In this case, we'll be watching emails travel from their classification (legitimate or spam) to their recipients represented by a single inbox.

There is no doubt that this data would be better communicated with a bar or pie chart. This is a fun exercise.


We're going to use the Email & Spam data published by Talos Intelligence over at this page. The numbers we're interested in are under the heading TOTAL GLOBAL EMAIL & SPAM VOLUME FOR AUGUST 2021, labelled with Average Daily Legitimate Email Volume and Average Daily Spam Volume.

In [2]:
data = [
    {"source": "Legitimate", "target": "Inboxes", "value": 12.30*(10**9)}, 
    {"source": "Spam", "target": "Inboxes", "value": 65.50*(10**9)},


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

We're going to adjust some layout and template parameters. We're setting pixels_per_unit=10**7 to represent $10$ million emails with a single pixel. This effects the length of the animation, making it shorter than the default of setting.

In [3]:
Terminus(data, colors=['#56c885','#ea647e'],
         title="Watch <plotapi_count> emails sent during an Aug-2021 day",
         vertical=True,  width=400, pipe_alignment="middle", 

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