9

League of Legends Classes with Plotapi Chord

 2 years ago
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 books
covertops.jpg

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.

Plotapi - Chord Diagram

Assassin40Fighter68Mage60Marksman29Support33Tank44Produced with PlotapiLocked - click/tap to unlockClassInfoTitle
marksman.svg
assassin.svg
Attack: 0
Defense: 0
Magic: 0
Difficulty: 0
Resource: ManaAkshan, the Rogue SentinelAkshan.png
marksman.svg
Attack: 6
Defense: 2
Magic: 1
Difficulty: 10
Resource: ManaAphelios, the Weapon of the FaithfulAphelios.png
marksman.svg
support.svg
Attack: 7
Defense: 3
Magic: 2
Difficulty: 4
Resource: ManaAshe, the Frost ArcherAshe.png
mage.svg
marksman.svg
Attack: 6
Defense: 3
Magic: 8
Difficulty: 9
Resource: ManaAzir, the Emperor of the SandsAzir.png
marksman.svg
Attack: 8
Defense: 2
Magic: 2
Difficulty: 6
Resource: ManaCaitlyn, the Sheriff of PiltoverCaitlyn.png
marksman.svg
Attack: 8
Defense: 3
Magic: 6
Difficulty: 6
Resource: ManaCorki, the Daring BombardierCorki.png
marksman.svg
Attack: 9
Defense: 3
Magic: 1
Difficulty: 8
Resource: ManaDraven, the Glorious ExecutionerDraven.png
marksman.svg
mage.svg
Attack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaEzreal, the Prodigal ExplorerEzreal.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 3
Resource: ManaGraves, the OutlawGraves.png
fighter.svg
marksman.svg
Attack: 8
Defense: 4
Magic: 3
Difficulty: 7
Resource: ManaJayce, the Defender of TomorrowJayce.png
marksman.svg
mage.svg
Attack: 10
Defense: 2
Magic: 6
Difficulty: 6
Resource: ManaJhin, the VirtuosoJhin.png
marksman.svg
Attack: 9
Defense: 2
Magic: 4
Difficulty: 6
Resource: ManaJinx, the Loose CannonJinx.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaKai'Sa, Daughter of the VoidKaisa.png
marksman.svg
Attack: 8
Defense: 2
Magic: 4
Difficulty: 7
Resource: ManaKalista, the Spear of VengeanceKalista.png
mage.svg
marksman.svg
Attack: 6
Defense: 4
Magic: 7
Difficulty: 4
Resource: EnergyKennen, the Heart of the TempestKennen.png
marksman.svg
Attack: 8
Defense: 2
Magic: 2
Difficulty: 4
Resource: ManaKindred, The Eternal HuntersKindred.png
marksman.svg
mage.svg
Attack: 8
Defense: 2
Magic: 5
Difficulty: 6
Resource: ManaKog'Maw, the Mouth of the AbyssKogMaw.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaLucian, the PurifierLucian.png
marksman.svg
Attack: 8
Defense: 2
Magic: 5
Difficulty: 1
Resource: ManaMiss Fortune, the Bounty HunterMissFortune.png
marksman.svg
assassin.svg
Attack: 9
Defense: 4
Magic: 2
Difficulty: 5
Resource: ManaQuinn, Demacia's WingsQuinn.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaSamira, the Desert RoseSamira.png
marksman.svg
support.svg
Attack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaSenna, the RedeemerSenna.png
marksman.svg
Attack: 9
Defense: 3
Magic: 1
Difficulty: 4
Resource: ManaSivir, the Battle MistressSivir.png
marksman.svg
assassin.svg
Attack: 5
Defense: 3
Magic: 7
Difficulty: 6
Resource: ManaTeemo, the Swift ScoutTeemo.png
marksman.svg
assassin.svg
Attack: 9
Defense: 3
Magic: 5
Difficulty: 4
Resource: ManaTristana, the Yordle GunnerTristana.png
marksman.svg
assassin.svg
Attack: 9
Defense: 2
Magic: 3
Difficulty: 6
Resource: ManaTwitch, the Plague RatTwitch.png
marksman.svg
mage.svg
Attack: 7
Defense: 3
Magic: 4
Difficulty: 2
Resource: ManaVarus, the Arrow of RetributionVarus.png
marksman.svg
assassin.svg
Attack: 10
Defense: 1
Magic: 1
Difficulty: 8
Resource: ManaVayne, the Night HunterVayne.png
marksman.svg
Attack: 10
Defense: 6
Magic: 1
Difficulty: 5
Resource: ManaXayah, the RebelXayah.png

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

Assassin40Fighter68Mage60Marksman29Support33Tank44Produced with PlotapiLocked - click/tap to unlockClassInfoTitle
marksman.svg
assassin.svg
Attack: 0
Defense: 0
Magic: 0
Difficulty: 0
Resource: ManaAkshan, the Rogue SentinelAkshan.png
marksman.svg
Attack: 6
Defense: 2
Magic: 1
Difficulty: 10
Resource: ManaAphelios, the Weapon of the FaithfulAphelios.png
marksman.svg
support.svg
Attack: 7
Defense: 3
Magic: 2
Difficulty: 4
Resource: ManaAshe, the Frost ArcherAshe.png
mage.svg
marksman.svg
Attack: 6
Defense: 3
Magic: 8
Difficulty: 9
Resource: ManaAzir, the Emperor of the SandsAzir.png
marksman.svg
Attack: 8
Defense: 2
Magic: 2
Difficulty: 6
Resource: ManaCaitlyn, the Sheriff of PiltoverCaitlyn.png
marksman.svg
Attack: 8
Defense: 3
Magic: 6
Difficulty: 6
Resource: ManaCorki, the Daring BombardierCorki.png
marksman.svg
Attack: 9
Defense: 3
Magic: 1
Difficulty: 8
Resource: ManaDraven, the Glorious ExecutionerDraven.png
marksman.svg
mage.svg
Attack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaEzreal, the Prodigal ExplorerEzreal.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 3
Resource: ManaGraves, the OutlawGraves.png
fighter.svg
marksman.svg
Attack: 8
Defense: 4
Magic: 3
Difficulty: 7
Resource: ManaJayce, the Defender of TomorrowJayce.png
marksman.svg
mage.svg
Attack: 10
Defense: 2
Magic: 6
Difficulty: 6
Resource: ManaJhin, the VirtuosoJhin.png
marksman.svg
Attack: 9
Defense: 2
Magic: 4
Difficulty: 6
Resource: ManaJinx, the Loose CannonJinx.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaKai'Sa, Daughter of the VoidKaisa.png
marksman.svg
Attack: 8
Defense: 2
Magic: 4
Difficulty: 7
Resource: ManaKalista, the Spear of VengeanceKalista.png
mage.svg
marksman.svg
Attack: 6
Defense: 4
Magic: 7
Difficulty: 4
Resource: EnergyKennen, the Heart of the TempestKennen.png
marksman.svg
Attack: 8
Defense: 2
Magic: 2
Difficulty: 4
Resource: ManaKindred, The Eternal HuntersKindred.png
marksman.svg
mage.svg
Attack: 8
Defense: 2
Magic: 5
Difficulty: 6
Resource: ManaKog'Maw, the Mouth of the AbyssKogMaw.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaLucian, the PurifierLucian.png
marksman.svg
Attack: 8
Defense: 2
Magic: 5
Difficulty: 1
Resource: ManaMiss Fortune, the Bounty HunterMissFortune.png
marksman.svg
assassin.svg
Attack: 9
Defense: 4
Magic: 2
Difficulty: 5
Resource: ManaQuinn, Demacia's WingsQuinn.png
marksman.svg
Attack: 8
Defense: 5
Magic: 3
Difficulty: 6
Resource: ManaSamira, the Desert RoseSamira.png
marksman.svg
support.svg
Attack: 7
Defense: 2
Magic: 6
Difficulty: 7
Resource: ManaSenna, the RedeemerSenna.png
marksman.svg
Attack: 9
Defense: 3
Magic: 1
Difficulty: 4
Resource: ManaSivir, the Battle MistressSivir.png
marksman.svg
assassin.svg
Attack: 5
Defense: 3
Magic: 7
Difficulty: 6
Resource: ManaTeemo, the Swift ScoutTeemo.png
marksman.svg
assassin.svg
Attack: 9
Defense: 3
Magic: 5
Difficulty: 4
Resource: ManaTristana, the Yordle GunnerTristana.png
marksman.svg
assassin.svg
Attack: 9
Defense: 2
Magic: 3
Difficulty: 6
Resource: ManaTwitch, the Plague RatTwitch.png
marksman.svg
mage.svg
Attack: 7
Defense: 3
Magic: 4
Difficulty: 2
Resource: ManaVarus, the Arrow of RetributionVarus.png
marksman.svg
assassin.svg
Attack: 10
Defense: 1
Magic: 1
Difficulty: 8
Resource: ManaVayne, the Night HunterVayne.png
marksman.svg
Attack: 10
Defense: 6
Magic: 1
Difficulty: 5
Resource: ManaXayah, the RebelXayah.png

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 Plotapi
plotapi-chord-pokemon-simple.svg

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK