Engaging plots, made easy.

Easily turn your data into engaging visualizations. Powerful API for coders. Powerful app for everyone.

main.py
notebook.ipynb
main.rs
from plotapi import Chord

Chord(matrix, names).show()

Visualizations Showcase

Global Email Spam with Terminus

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


Preamble

from plotapi import Terminus
import json

Introduction

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.

Dataset

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.

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

Visualisation

Let's use PlotAPI Terminus for this visualisation.

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.

plot = Terminus(
    data,
    colors=["#22c55e", "#e11d48"],
    title="Watch <plotapi_count> emails sent during an Aug-2021 day",
    vertical=True,
    width=400,
    pipe_alignment="middle",
    pixels_per_unit=10**7,
)

Display inline

plot

Upload to cloud

With our plot created, let's upload it to PlotAPI cloud and get a shareable link.

plot.upload(
    name="Global Email Spam",
    description="""In this notebook we're going to use PlotAPI Terminus to visualise the average daily email & spam volume for August 2021. We're going to use the Email & Spam data published by Talos Intelligence.""",
    public=True,
)
Your visualization has been uploaded successfully! You can view and share it at https://plotapi.com/explore/view/80493dfb-49d8-4f27-983e-efcafddd5ca5.
Previous
Showcase