League of Legends Classes with Plotapi Chord
source link: https://datacrayon.com/posts/plotapi/showcase/league-of-legends-classes-with-plotapi-chord/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Get the Books
Enjoying these notebooks and want to support the work? Check out the practical books on Data Science, Visualisation, and Evolutionary Algorithms.
Get the booksSupport this work
You can support this work by getting the e-books. This notebook will always be available for free in its online format.
Plotapi - Chord Diagram
Defense: 0
Magic: 0
Difficulty: 0
Resource: ManaAkshan, the Rogue SentinelAttack: 6
Defense: 2
Magic: 1
Difficulty: 10
Resource: ManaAphelios, the Weapon of the FaithfulAttack: 7
Defense: 3
Magic: 2
Difficulty: 4
Resource: ManaAshe, the Frost ArcherAttack: 6
Defense: 3
Magic: 8
Difficulty: 9
Resource: ManaAzir, the Emperor of the SandsAttack: 8
Defense: 2
Magic: 2
Difficulty: 6
Resource: ManaCaitlyn, the Sheriff of PiltoverAttack: 8
Defense: 3
Magic: 6
Difficulty: 6
Resource: ManaCorki, the Daring BombardierAttack: 9
Defense: 3
Magic: 1
Difficulty: 8
Resource: ManaDraven, the Glorious ExecutionerAttack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaEzreal, the Prodigal ExplorerAttack: 8
Defense: 5
Magic: 3
Difficulty: 3
Resource: ManaGraves, the OutlawAttack: 8
Defense: 4
Magic: 3
Difficulty: 7
Resource: ManaJayce, the Defender of TomorrowAttack: 10
Defense: 2
Magic: 6
Difficulty: 6
Resource: ManaJhin, the VirtuosoAttack: 9
Defense: 2
Magic: 4
Difficulty: 6
Resource: ManaJinx, the Loose CannonAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaKai'Sa, Daughter of the VoidAttack: 8
Defense: 2
Magic: 4
Difficulty: 7
Resource: ManaKalista, the Spear of VengeanceAttack: 6
Defense: 4
Magic: 7
Difficulty: 4
Resource: EnergyKennen, the Heart of the TempestAttack: 8
Defense: 2
Magic: 2
Difficulty: 4
Resource: ManaKindred, The Eternal HuntersAttack: 8
Defense: 2
Magic: 5
Difficulty: 6
Resource: ManaKog'Maw, the Mouth of the AbyssAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaLucian, the PurifierAttack: 8
Defense: 2
Magic: 5
Difficulty: 1
Resource: ManaMiss Fortune, the Bounty HunterAttack: 9
Defense: 4
Magic: 2
Difficulty: 5
Resource: ManaQuinn, Demacia's WingsAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaSamira, the Desert RoseAttack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaSenna, the RedeemerAttack: 9
Defense: 3
Magic: 1
Difficulty: 4
Resource: ManaSivir, the Battle MistressAttack: 5
Defense: 3
Magic: 7
Difficulty: 6
Resource: ManaTeemo, the Swift ScoutAttack: 9
Defense: 3
Magic: 5
Difficulty: 4
Resource: ManaTristana, the Yordle GunnerAttack: 9
Defense: 2
Magic: 3
Difficulty: 6
Resource: ManaTwitch, the Plague RatAttack: 7
Defense: 3
Magic: 4
Difficulty: 2
Resource: ManaVarus, the Arrow of RetributionAttack: 10
Defense: 1
Magic: 1
Difficulty: 8
Resource: ManaVayne, the Night HunterAttack: 10
Defense: 6
Magic: 1
Difficulty: 5
Resource: ManaXayah, the Rebel
Preamble¶
from plotapi import Chord import json Chord.set_license("your username", "your license key")
Introduction¶
In this notebook we're going to use Plotapi Chord to visualise the co-occurrences between League of Legends classes. 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 League of Legends Champion data from version 11.15.1, a copy of which is available in this documentation website. Let"s get loading the data.
with open("lol_classes.json", "r") as f: data = json.load(f) names = ['Assassin', 'Fighter', 'Mage', 'Marksman', 'Support', 'Tank']
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.
Chord( data["matrix"], names, colors="league", details_thumbs=data["details_thumbs"], noun="Champions", thumbs_width=50, thumbs_margin=0, credit=True, padding=0.05, arc_numbers=True, margin=30, curved_labels=True, reverse_gradients=True, verb="appear together in", data_table=data["data_table"], data_table_column_width=140, data_table_show_indices=False, animated_intro=True, animated_duration=3000, ).show()
Plotapi - Chord Diagram
Defense: 0
Magic: 0
Difficulty: 0
Resource: ManaAkshan, the Rogue SentinelAttack: 6
Defense: 2
Magic: 1
Difficulty: 10
Resource: ManaAphelios, the Weapon of the FaithfulAttack: 7
Defense: 3
Magic: 2
Difficulty: 4
Resource: ManaAshe, the Frost ArcherAttack: 6
Defense: 3
Magic: 8
Difficulty: 9
Resource: ManaAzir, the Emperor of the SandsAttack: 8
Defense: 2
Magic: 2
Difficulty: 6
Resource: ManaCaitlyn, the Sheriff of PiltoverAttack: 8
Defense: 3
Magic: 6
Difficulty: 6
Resource: ManaCorki, the Daring BombardierAttack: 9
Defense: 3
Magic: 1
Difficulty: 8
Resource: ManaDraven, the Glorious ExecutionerAttack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaEzreal, the Prodigal ExplorerAttack: 8
Defense: 5
Magic: 3
Difficulty: 3
Resource: ManaGraves, the OutlawAttack: 8
Defense: 4
Magic: 3
Difficulty: 7
Resource: ManaJayce, the Defender of TomorrowAttack: 10
Defense: 2
Magic: 6
Difficulty: 6
Resource: ManaJhin, the VirtuosoAttack: 9
Defense: 2
Magic: 4
Difficulty: 6
Resource: ManaJinx, the Loose CannonAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaKai'Sa, Daughter of the VoidAttack: 8
Defense: 2
Magic: 4
Difficulty: 7
Resource: ManaKalista, the Spear of VengeanceAttack: 6
Defense: 4
Magic: 7
Difficulty: 4
Resource: EnergyKennen, the Heart of the TempestAttack: 8
Defense: 2
Magic: 2
Difficulty: 4
Resource: ManaKindred, The Eternal HuntersAttack: 8
Defense: 2
Magic: 5
Difficulty: 6
Resource: ManaKog'Maw, the Mouth of the AbyssAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaLucian, the PurifierAttack: 8
Defense: 2
Magic: 5
Difficulty: 1
Resource: ManaMiss Fortune, the Bounty HunterAttack: 9
Defense: 4
Magic: 2
Difficulty: 5
Resource: ManaQuinn, Demacia's WingsAttack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaSamira, the Desert RoseAttack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaSenna, the RedeemerAttack: 9
Defense: 3
Magic: 1
Difficulty: 4
Resource: ManaSivir, the Battle MistressAttack: 5
Defense: 3
Magic: 7
Difficulty: 6
Resource: ManaTeemo, the Swift ScoutAttack: 9
Defense: 3
Magic: 5
Difficulty: 4
Resource: ManaTristana, the Yordle GunnerAttack: 9
Defense: 2
Magic: 3
Difficulty: 6
Resource: ManaTwitch, the Plague RatAttack: 7
Defense: 3
Magic: 4
Difficulty: 2
Resource: ManaVarus, the Arrow of RetributionAttack: 10
Defense: 1
Magic: 1
Difficulty: 8
Resource: ManaVayne, the Night HunterAttack: 10
Defense: 6
Magic: 1
Difficulty: 5
Resource: ManaXayah, the Rebel
Support this work
You can support this work by getting the e-books. This notebook will always be available for free in its online format.
Support this work
Get the practical book on data visualisation that shows you how to create static and interactive visualisations that are engaging and beautiful.
- Discounted Price that will grow as the book does,
- Code examples primarily in Python,
- Python Notebooks for each Section,
- Format: PDF download,
- Supplementary Video Tutorials,
- Unlimited access to updates.
Plotapi, beautiful by default.
Let plotapi do the heavy lifting – enabling beautiful interactive visualisations with a single line of code (instead of hundreds).
Get PlotapiRecommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK