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

Animal Crossing Villager Style

In this notebook we're going to use PlotAPI Chord to visualise the style co-occurrences of Animal Crossing villagers. We"ll use Python, but PlotAPI can be used from any programming language.


Preamble

from plotapi import Chord
import json

Introduction

In this notebook we're going to use PlotAPI Chord to visualise the style co-occurrences of Animal Crossing villagers. 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.

Dataset

We're going to use data from Animal Crossing New Horizons data. Previously, we made use of the data available in this repository. However, since the 2.0 update, we've created our own! Let's get loading the data.

with open("ac-style.json", "r") as f:
    data = json.load(f)

Visualisation

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.

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

plot = Chord(
    data["matrix"],
    data["names"],
    colors=data["colors"],
    details=data["details"],
    details_thumbs=data["details_thumbs"],
    noun="Villagers",
    thumbs_width=32,
    popup_width=600,
    thumbs_font_size=10,
    arc_numbers=True,
    reverse_gradients=True,
    width = 900,
)

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="Animal Crossing Villager Style",
    description='''In this notebook we're going to use PlotAPI Chord to visualise the style co-occurrences of Animal Crossing villagers. We"ll use Python, but PlotAPI can be used from any programming language.''',
    public=True,
)
Your visualization has been uploaded successfully! You can view and share it at https://plotapi.com/explore/view/26f3d999-984c-408c-902c-ed0ecb55fb47.
Previous
Showcase