LoL Worlds 2020

  1. 1. Gathering LoLEsports data
    1. 1.1. Find the tournament
    2. 1.2. Getting the hashes
  • Analysis
  • Get your stats ready for LoL Worlds 2020

    In this article, the new way to gather official matches data will be presented, as well as some analysis oriented toward players.

    You can find the notebook with all the code and the dataset on Github : https://github.com/HextechLab/Worlds2020

    Gathering LoLEsports data

    Following the shutdown of some important API from the lolesports website that allowed us to get hashes to gather data from official matches, the solution is to rely on Leaguepedia which has everything we need.

    Here is an example of how to do it in Python.

    We will use the leaguepdia-parser package to gather what we need from Leaguepedia.

    Find the tournament

    1
    2
    3
    import leaguepedia_parser as lp

    lp.get_regions()
    ['',
     'Africa',
     'Asia',
     'Brazil',
     'China',
     'CIS',
     'Europe',
     'International',
     'Japan',
     'Korea',
     'LAN',
     'LAS',
     'Latin America',
     'LMS',
     'MENA',
     'North America',
     'Oceania',
     'PCS',
     'SEA',
     'Turkey',
     'Unknown',
     'Vietnam',
     'Wildcard']

    Pick your favorite region to get the list of tournaments in this region :

    1
    2
    tournaments = lp.get_tournaments('Europe', year=2020)
    [t["name"] for t in tournaments]
    ['LEC 2020 Spring',
     'LEC 2020 Spring Playoffs',
     'EU Face-Off 2020',
     'LEC 2020 Summer',
     'LEC 2020 Summer Playoffs']

    We will create a custom method for the leaguepedia_parser to get only the information we need :

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    import types

    def get_games_hashes(self, tournament_name=None, **kwargs):
    """
    Returns the list server, gameId and hashes of games played in a tournament.

    :param tournament_name
    Name of the tournament, which can be gotten from get_tournaments().
    :return:
    A list of game dictionaries.
    """
    games = self._cargoquery(tables='ScoreboardGames',
    fields='Tournament = tournament, '
    'MatchHistory = match_history_url, ',
    where="ScoreboardGames.Tournament='{}'".format(tournament_name),
    order_by="ScoreboardGames.DateTime_UTC",
    **kwargs)
    data = [
    {
    "tournament":game["tournament"],
    "server":game["match_history_url"].split("/")[5],
    "gameId":game["match_history_url"].split("/")[6].split("?gameHash=")[0],
    "hash":game["match_history_url"].split("/")[6].split("?gameHash=")[1],
    }
    for game in games
    ]
    return data

    lp.get_games_hashes = types.MethodType(get_games_hashes, lp)

    Getting the hashes

    Getting the hashes for LEC 2020 Summer :

    1
    2
    games = lp.get_games_hashes(tournaments[3]['name'])
    games[:3]
    [{'tournament': 'LEC 2020 Summer',
      'server': 'ESPORTSTMNT04',
      'gameId': '1230688',
      'hash': '25cb7e1966cbcdb5'},
     {'tournament': 'LEC 2020 Summer',
      'server': 'ESPORTSTMNT04',
      'gameId': '1220706',
      'hash': 'c3f45e5bb2a65c80'},
     {'tournament': 'LEC 2020 Summer',
      'server': 'ESPORTSTMNT04',
      'gameId': '1220728',
      'hash': '4bfd5c00f9292be3'}]

    Requesting the match data from all those games :

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    import requests

    base_match_history_stats_url = "https://acs.leagueoflegends.com/v1/stats/game/{}/{}?gameHash={}"
    base_match_history_stats_timeline_url = "https://acs.leagueoflegends.com/v1/stats/game/{}/{}/timeline?gameHash={}"

    all_games_data = []

    for g in games:
    url = base_match_history_stats_url.format(g["server"],g["gameId"],g["hash"])
    timeline_url = base_match_history_stats_timeline_url.format(g["server"],g["gameId"],g["hash"])

    game_data = requests.get(url).json()
    game_data["timeline"] = requests.get(timeline_url).json()

    all_games_data.append(game_data)

    If you get rate limited (errors 429), follow this guide : https://www.hextechdocs.dev/lol/esportsapi/13.esports-match-data#in-need-of-cookies

    Analysis

    Once the data is ehre, let’s crunch some numbers. First of all, you’ll need to select a few specific pieces of information out of the whole match data. These functions will help for that :

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    # Team stats
    # Get each team total damages dealt to champions
    def get_team_damages_to_champions(g):
    t_dam = {100:0,200:0}
    for p in g["participants"]:
    t_dam[p["teamId"]] += p["stats"]["totalDamageDealtToChampions"]
    return t_dam

    # Get the total kills of the team, as this is only available player by player
    def get_team_kills(g):
    t_kills = {100:0,200:0}
    for p in g["participants"]:
    t_kills[p["teamId"]] += p["stats"]["kills"]
    return t_kills

    # Participant stats
    # Get the Gold Advantage of a player at the 15th minute
    def ga_at_15(g, pId):
    g_at_15 = [p["totalGold"] for p in g["timeline"]["frames"][15]["participantFrames"].values() if p["participantId"] == pId][0]
    opp_pId = (pId+5)%10 if not pId == 5 else 10
    opp_g_at_15 = [p["totalGold"] for p in g["timeline"]["frames"][15]["participantFrames"].values() if p["participantId"] == opp_pId][0]
    return g_at_15 - opp_g_at_15

    # Get the CS Difference of a player at the 15th minute
    def cs_diff_at_15(g, pId):
    cs_at_15 = [p["minionsKilled"]+p["jungleMinionsKilled"] for p in g["timeline"]["frames"][15]["participantFrames"].values() if p["participantId"] == pId][0]
    opp_pId = (pId+5)%10 if not pId == 5 else 10
    opp_cs_at_15 = [p["minionsKilled"]+p["jungleMinionsKilled"] for p in g["timeline"]["frames"][15]["participantFrames"].values() if p["participantId"] == opp_pId][0]
    return cs_at_15 - opp_cs_at_15

    Loading ddragon module to translate championId to their name. Note : you need nest_asyncio only if you run this in a Jupyter Notebook.

    1
    2
    3
    4
    5
    import nest_asyncio
    nest_asyncio.apply()

    import static_data
    dd = static_data.ddragon()

    Gather stats from each player in each game.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    players_stats = []

    for g in all_games_data:

    # Get the teams stats
    teams_damages_to_champions = get_team_damages_to_champions(g)
    teams_kills = get_team_kills(g)


    # Translate participantId to the player's name
    pId_to_name = {}
    for p in g["participantIdentities"]:
    pId_to_name[p["participantId"]] = p["player"]["summonerName"]

    for p in g["participants"]:
    players_stats.append({
    "name":pId_to_name[p["participantId"]],
    "champion":dd.getChampion(p["championId"]).name,
    "damage_share":p["stats"]["totalDamageDealtToChampions"] / teams_damages_to_champions[p["teamId"]],
    "kill_participation":(p["stats"]["kills"] + p["stats"]["assists"]) / teams_kills[p["teamId"]] if teams_kills[p["teamId"]] > 0 else 0,
    "cs_diff_at_15":cs_diff_at_15(g, p["participantId"]),
    "ga_at_15":ga_at_15(g, p["participantId"]),
    "kills":p["stats"]["kills"],
    "deaths":p["stats"]["deaths"],
    "assists":p["stats"]["assists"],
    "vision_score":p["stats"]["visionScore"],
    "damage_per_gold":p["stats"]["totalDamageDealtToChampions"] / p["stats"]["goldEarned"],
    "win":p["stats"]["win"]
    })

    Put the stats into a pandas DataFrame.

    1
    2
    3
    import pandas as pd
    df = pd.DataFrame(players_stats)
    df.head()

    name champion damage_share kill_participation cs_diff_at_15 ga_at_15 kills deaths assists vision_score damage_per_gold win
    0 G2 Wunder Mordekaiser 0.207249 0.454545 8 955 6 1 4 32 0.877160 True
    1 G2 Jankos Rek'Sai 0.103866 0.318182 10 -67 1 2 6 64 0.540224 True
    2 G2 Caps Zoe 0.184098 0.636364 -30 37 5 1 9 34 0.844762 True
    3 G2 Perkz Varus 0.421698 0.818182 37 1680 9 0 9 26 1.516857 True
    4 G2 Mikyx Tahm Kench 0.083089 0.545455 8 650 1 1 11 80 0.566123 True

    Group the mean of each stat and the number of games they played in.

    1
    2
    df_results = pd.concat([df.groupby("name").mean(), df.groupby("name").agg(Games=("kills","count"))], axis=1)
    df_results

    damage_share kill_participation cs_diff_at_15 ga_at_15 kills deaths assists vision_score damage_per_gold win Games
    name
    FNC Bwipo 0.223127 0.593547 -9.722222 -194.111111 2.722222 3.833333 5.166667 32.777778 1.136960 0.500000 18
    FNC Hylissang 0.083543 0.596570 -5.888889 140.444444 0.833333 4.555556 7.055556 84.555556 0.667025 0.500000 18
    FNC Nemesis 0.247389 0.562223 -3.166667 -190.666667 2.722222 2.388889 4.611111 32.777778 1.105412 0.500000 18
    FNC Rekkles 0.258534 0.775209 5.777778 72.444444 3.055556 1.333333 6.333333 36.944444 1.107452 0.500000 18
    FNC Selfmade 0.187407 0.710503 11.444444 201.055556 3.000000 2.444444 5.500000 44.611111 0.961258 0.500000 18
    G2 Caps 0.293738 0.700959 2.333333 384.222222 4.777778 2.111111 5.277778 31.500000 1.289828 0.611111 18
    G2 Jankos 0.135096 0.701737 0.722222 4.722222 2.166667 2.666667 6.833333 50.777778 0.795349 0.611111 18
    G2 Mikyx 0.085227 0.574378 8.388889 217.055556 0.777778 2.944444 7.388889 90.888889 0.647563 0.611111 18
    G2 P1noy 0.147956 0.560606 -67.500000 -1493.500000 3.500000 2.500000 5.500000 43.500000 1.070342 0.500000 2
    G2 Perkz 0.279655 0.557734 -3.437500 -260.187500 3.875000 2.562500 4.812500 37.000000 1.195827 0.625000 16
    G2 Wunder 0.220917 0.571255 12.277778 404.777778 2.555556 2.722222 5.055556 31.277778 1.105366 0.611111 18
    MAD Carzzy 0.252405 0.665892 -29.722222 -550.055556 3.055556 1.944444 6.722222 44.888889 1.336119 0.666667 18
    MAD Humanoid 0.308612 0.676741 8.666667 269.055556 4.388889 2.777778 5.500000 31.888889 1.368744 0.666667 18
    MAD Kaiser 0.104116 0.683497 19.555556 368.888889 1.333333 2.000000 8.444444 79.833333 0.794702 0.666667 18
    MAD Orome 0.202742 0.556667 -3.777778 173.333333 2.777778 1.833333 5.222222 28.666667 1.038037 0.666667 18
    MAD Shad0w 0.132126 0.716630 -8.222222 -109.666667 2.611111 2.555556 7.222222 44.055556 0.794622 0.666667 18
    MSF Dan Dan 0.232844 0.593369 -3.666667 -257.555556 2.222222 2.000000 3.388889 30.833333 1.054232 0.388889 18
    MSF Doss 0.071463 0.553586 -1.230769 19.692308 0.230769 3.153846 5.769231 81.538462 0.539777 0.384615 13
    MSF FEBIVEN 0.285648 0.647716 -0.388889 -303.555556 2.444444 2.611111 4.166667 32.166667 1.293193 0.388889 18
    MSF Kobbe 0.269913 0.641566 -2.722222 -4.277778 3.222222 1.833333 3.888889 35.611111 1.092888 0.388889 18
    MSF Razork 0.137768 0.723598 7.222222 83.388889 2.000000 3.388889 5.111111 52.555556 0.777673 0.388889 18
    MSF denyk 0.079974 0.631178 2.000000 -363.000000 0.800000 4.600000 6.600000 98.800000 0.739018 0.400000 5
    OG Alphari 0.248336 0.631274 17.500000 388.944444 2.055556 2.388889 4.055556 35.555556 1.133699 0.333333 18
    OG Destiny 0.059221 0.602118 -1.666667 -47.111111 0.666667 2.000000 5.888889 91.888889 0.479166 0.444444 9
    OG Jactroll 0.068711 0.688606 -5.555556 -293.555556 0.222222 3.777778 5.444444 97.222222 0.608410 0.222222 9
    OG Nukeduck 0.231971 0.704894 -5.111111 -249.500000 2.055556 2.333333 4.444444 35.888889 1.088042 0.333333 18
    OG Upset 0.321765 0.723173 9.277778 11.055556 3.388889 1.222222 3.833333 47.500000 1.371337 0.333333 18
    OG Xerxe 0.133963 0.688985 0.333333 -125.555556 1.555556 2.166667 4.833333 64.166667 0.802195 0.333333 18
    RGE Finn 0.239404 0.599334 -4.333333 230.333333 1.888889 2.055556 6.111111 41.833333 1.118791 0.722222 18
    RGE Hans sama 0.282284 0.656932 10.333333 525.111111 4.444444 1.722222 4.555556 42.444444 1.188017 0.722222 18
    RGE Inspired 0.098220 0.700881 -4.833333 102.611111 1.666667 1.000000 8.000000 57.611111 0.567715 0.722222 18
    RGE Larssen 0.312793 0.720134 11.388889 538.388889 4.777778 1.444444 4.666667 30.222222 1.247148 0.722222 18
    RGE Vander 0.067299 0.595965 -5.555556 -98.277778 0.666667 0.944444 7.500000 82.055556 0.569031 0.722222 18
    S04 Abbedagge 0.285159 0.706940 0.277778 3.611111 3.500000 2.111111 4.277778 40.833333 1.289298 0.444444 18
    S04 Dreams 0.081275 0.671343 0.266667 -36.800000 0.866667 2.400000 7.400000 84.800000 0.678752 0.533333 15
    S04 Gilius 0.137355 0.736826 5.833333 442.083333 4.000000 2.083333 6.250000 58.000000 0.814762 0.666667 12
    S04 Innaxe 0.384667 0.858586 -24.666667 -1184.000000 2.666667 3.000000 1.666667 39.333333 1.650448 0.000000 3
    S04 Lurox 0.097811 0.741703 -7.666667 -228.333333 0.666667 2.500000 2.000000 56.500000 0.522445 0.000000 6
    S04 Neon 0.293243 0.727295 -1.600000 -83.800000 2.600000 2.133333 6.266667 39.266667 1.353045 0.533333 15
    S04 Nukes 0.062412 0.797980 5.000000 199.000000 0.666667 2.666667 3.000000 106.666667 0.403134 0.000000 3
    S04 Odoamne 0.204055 0.665810 4.444444 -25.500000 1.500000 2.555556 6.111111 33.000000 1.016403 0.444444 18
    SK Crownshot 0.305696 0.682608 11.888889 264.555556 3.555556 1.833333 4.833333 40.111111 1.248497 0.500000 18
    SK Jenax 0.231644 0.560635 -5.222222 -460.388889 2.611111 2.611111 4.444444 32.277778 1.120304 0.500000 18
    SK LIMIT 0.089615 0.711859 -8.055556 -138.944444 0.888889 2.500000 7.833333 95.555556 0.699940 0.500000 18
    SK Trick 0.114979 0.642871 0.222222 -151.333333 1.666667 2.833333 6.333333 40.666667 0.685385 0.500000 18
    SK ZaZee 0.258067 0.749928 -4.166667 -79.666667 3.333333 2.166667 5.666667 33.500000 1.087049 0.500000 18
    VIT Cabochard 0.195603 0.555988 -6.777778 -393.833333 1.944444 2.277778 4.000000 36.111111 0.942578 0.388889 18
    VIT Comp 0.337604 0.788173 2.222222 94.888889 4.000000 2.277778 4.555556 45.722222 1.281572 0.388889 18
    VIT Labrov 0.073434 0.792618 0.611111 -145.833333 0.388889 2.611111 8.222222 103.111111 0.552762 0.388889 18
    VIT Milica 0.290508 0.692663 -6.166667 -254.000000 3.111111 1.888889 4.388889 45.000000 1.123236 0.388889 18
    VIT Nji 0.092451 0.572866 -9.666667 -6.222222 0.555556 3.111111 4.777778 60.666667 0.463280 0.444444 9
    VIT Skeanz 0.113250 0.673732 -7.444444 -270.666667 2.000000 2.666667 5.888889 50.111111 0.686650 0.333333 9
    XL Caedrel 0.104300 0.608204 0.333333 -85.388889 1.444444 2.222222 4.055556 52.111111 0.576975 0.444444 18
    XL Kryze 0.241151 0.546163 -0.722222 134.000000 1.888889 2.444444 2.944444 30.111111 0.992337 0.444444 18
    XL Patrik 0.332169 0.704439 8.944444 250.666667 3.611111 2.055556 3.500000 42.000000 1.320411 0.444444 18
    XL Special 0.233506 0.608768 -3.666667 -117.888889 2.000000 2.500000 3.833333 35.722222 0.950198 0.444444 18
    XL Tore 0.088873 0.677933 -6.166667 -88.888889 0.166667 2.388889 6.388889 92.500000 0.662340 0.444444 18

    Then find out who is the best support

    1
    df_results.sort_values("vision_score", ascending=False)[:5]

    damage_share kill_participation cs_diff_at_15 ga_at_15 kills deaths assists vision_score damage_per_gold win Games
    name
    S04 Nukes 0.062412 0.797980 5.000000 199.000000 0.666667 2.666667 3.000000 106.666667 0.403134 0.000000 3
    VIT Labrov 0.073434 0.792618 0.611111 -145.833333 0.388889 2.611111 8.222222 103.111111 0.552762 0.388889 18
    MSF denyk 0.079974 0.631178 2.000000 -363.000000 0.800000 4.600000 6.600000 98.800000 0.739018 0.400000 5
    OG Jactroll 0.068711 0.688606 -5.555556 -293.555556 0.222222 3.777778 5.444444 97.222222 0.608410 0.222222 9
    SK LIMIT 0.089615 0.711859 -8.055556 -138.944444 0.888889 2.500000 7.833333 95.555556 0.699940 0.500000 18

    You can also filter out players that didn’t played a lot

    1
    df_results[df_results["Games"] > 9]

    damage_share kill_participation cs_diff_at_15 ga_at_15 kills deaths assists vision_score damage_per_gold win Games
    name
    FNC Bwipo 0.223127 0.593547 -9.722222 -194.111111 2.722222 3.833333 5.166667 32.777778 1.136960 0.500000 18
    FNC Hylissang 0.083543 0.596570 -5.888889 140.444444 0.833333 4.555556 7.055556 84.555556 0.667025 0.500000 18
    FNC Nemesis 0.247389 0.562223 -3.166667 -190.666667 2.722222 2.388889 4.611111 32.777778 1.105412 0.500000 18
    FNC Rekkles 0.258534 0.775209 5.777778 72.444444 3.055556 1.333333 6.333333 36.944444 1.107452 0.500000 18
    FNC Selfmade 0.187407 0.710503 11.444444 201.055556 3.000000 2.444444 5.500000 44.611111 0.961258 0.500000 18
    G2 Caps 0.293738 0.700959 2.333333 384.222222 4.777778 2.111111 5.277778 31.500000 1.289828 0.611111 18
    G2 Jankos 0.135096 0.701737 0.722222 4.722222 2.166667 2.666667 6.833333 50.777778 0.795349 0.611111 18
    G2 Mikyx 0.085227 0.574378 8.388889 217.055556 0.777778 2.944444 7.388889 90.888889 0.647563 0.611111 18
    G2 Perkz 0.279655 0.557734 -3.437500 -260.187500 3.875000 2.562500 4.812500 37.000000 1.195827 0.625000 16
    G2 Wunder 0.220917 0.571255 12.277778 404.777778 2.555556 2.722222 5.055556 31.277778 1.105366 0.611111 18
    MAD Carzzy 0.252405 0.665892 -29.722222 -550.055556 3.055556 1.944444 6.722222 44.888889 1.336119 0.666667 18
    MAD Humanoid 0.308612 0.676741 8.666667 269.055556 4.388889 2.777778 5.500000 31.888889 1.368744 0.666667 18
    MAD Kaiser 0.104116 0.683497 19.555556 368.888889 1.333333 2.000000 8.444444 79.833333 0.794702 0.666667 18
    MAD Orome 0.202742 0.556667 -3.777778 173.333333 2.777778 1.833333 5.222222 28.666667 1.038037 0.666667 18
    MAD Shad0w 0.132126 0.716630 -8.222222 -109.666667 2.611111 2.555556 7.222222 44.055556 0.794622 0.666667 18
    MSF Dan Dan 0.232844 0.593369 -3.666667 -257.555556 2.222222 2.000000 3.388889 30.833333 1.054232 0.388889 18
    MSF Doss 0.071463 0.553586 -1.230769 19.692308 0.230769 3.153846 5.769231 81.538462 0.539777 0.384615 13
    MSF FEBIVEN 0.285648 0.647716 -0.388889 -303.555556 2.444444 2.611111 4.166667 32.166667 1.293193 0.388889 18
    MSF Kobbe 0.269913 0.641566 -2.722222 -4.277778 3.222222 1.833333 3.888889 35.611111 1.092888 0.388889 18
    MSF Razork 0.137768 0.723598 7.222222 83.388889 2.000000 3.388889 5.111111 52.555556 0.777673 0.388889 18
    OG Alphari 0.248336 0.631274 17.500000 388.944444 2.055556 2.388889 4.055556 35.555556 1.133699 0.333333 18
    OG Nukeduck 0.231971 0.704894 -5.111111 -249.500000 2.055556 2.333333 4.444444 35.888889 1.088042 0.333333 18
    OG Upset 0.321765 0.723173 9.277778 11.055556 3.388889 1.222222 3.833333 47.500000 1.371337 0.333333 18
    OG Xerxe 0.133963 0.688985 0.333333 -125.555556 1.555556 2.166667 4.833333 64.166667 0.802195 0.333333 18
    RGE Finn 0.239404 0.599334 -4.333333 230.333333 1.888889 2.055556 6.111111 41.833333 1.118791 0.722222 18
    RGE Hans sama 0.282284 0.656932 10.333333 525.111111 4.444444 1.722222 4.555556 42.444444 1.188017 0.722222 18
    RGE Inspired 0.098220 0.700881 -4.833333 102.611111 1.666667 1.000000 8.000000 57.611111 0.567715 0.722222 18
    RGE Larssen 0.312793 0.720134 11.388889 538.388889 4.777778 1.444444 4.666667 30.222222 1.247148 0.722222 18
    RGE Vander 0.067299 0.595965 -5.555556 -98.277778 0.666667 0.944444 7.500000 82.055556 0.569031 0.722222 18
    S04 Abbedagge 0.285159 0.706940 0.277778 3.611111 3.500000 2.111111 4.277778 40.833333 1.289298 0.444444 18
    S04 Dreams 0.081275 0.671343 0.266667 -36.800000 0.866667 2.400000 7.400000 84.800000 0.678752 0.533333 15
    S04 Gilius 0.137355 0.736826 5.833333 442.083333 4.000000 2.083333 6.250000 58.000000 0.814762 0.666667 12
    S04 Neon 0.293243 0.727295 -1.600000 -83.800000 2.600000 2.133333 6.266667 39.266667 1.353045 0.533333 15
    S04 Odoamne 0.204055 0.665810 4.444444 -25.500000 1.500000 2.555556 6.111111 33.000000 1.016403 0.444444 18
    SK Crownshot 0.305696 0.682608 11.888889 264.555556 3.555556 1.833333 4.833333 40.111111 1.248497 0.500000 18
    SK Jenax 0.231644 0.560635 -5.222222 -460.388889 2.611111 2.611111 4.444444 32.277778 1.120304 0.500000 18
    SK LIMIT 0.089615 0.711859 -8.055556 -138.944444 0.888889 2.500000 7.833333 95.555556 0.699940 0.500000 18
    SK Trick 0.114979 0.642871 0.222222 -151.333333 1.666667 2.833333 6.333333 40.666667 0.685385 0.500000 18
    SK ZaZee 0.258067 0.749928 -4.166667 -79.666667 3.333333 2.166667 5.666667 33.500000 1.087049 0.500000 18
    VIT Cabochard 0.195603 0.555988 -6.777778 -393.833333 1.944444 2.277778 4.000000 36.111111 0.942578 0.388889 18
    VIT Comp 0.337604 0.788173 2.222222 94.888889 4.000000 2.277778 4.555556 45.722222 1.281572 0.388889 18
    VIT Labrov 0.073434 0.792618 0.611111 -145.833333 0.388889 2.611111 8.222222 103.111111 0.552762 0.388889 18
    VIT Milica 0.290508 0.692663 -6.166667 -254.000000 3.111111 1.888889 4.388889 45.000000 1.123236 0.388889 18
    XL Caedrel 0.104300 0.608204 0.333333 -85.388889 1.444444 2.222222 4.055556 52.111111 0.576975 0.444444 18
    XL Kryze 0.241151 0.546163 -0.722222 134.000000 1.888889 2.444444 2.944444 30.111111 0.992337 0.444444 18
    XL Patrik 0.332169 0.704439 8.944444 250.666667 3.611111 2.055556 3.500000 42.000000 1.320411 0.444444 18
    XL Special 0.233506 0.608768 -3.666667 -117.888889 2.000000 2.500000 3.833333 35.722222 0.950198 0.444444 18
    XL Tore 0.088873 0.677933 -6.166667 -88.888889 0.166667 2.388889 6.388889 92.500000 0.662340 0.444444 18

    You can also target a specific player and get stats on the champion he played

    1
    2
    3
    4
    5
    6
    7
    df[df["name"] == "G2 Caps"].groupby("champion").agg(
    played=("name","count"),
    kill_participation=("kill_participation","mean"),
    cs_diff_at_15=("cs_diff_at_15","mean"),
    ga_at_15=("ga_at_15","mean"),
    winrate=("win","mean")
    )

    played kill_participation cs_diff_at_15 ga_at_15 winrate
    champion
    Azir 1 0.833333 13.0 955.0 0.0
    Cassiopeia 1 0.714286 37.0 128.0 0.0
    Ekko 1 0.750000 -2.0 38.0 1.0
    Galio 1 1.000000 -18.0 -1312.0 0.0
    Kassadin 1 0.200000 -4.0 -102.0 0.0
    Kog'Maw 2 0.787879 -3.5 1119.5 0.5
    LeBlanc 1 0.560000 -19.0 -163.0 1.0
    Orianna 1 0.777778 6.0 -307.0 0.0
    Syndra 2 0.663534 4.5 428.5 1.0
    Twisted Fate 2 0.760417 16.0 855.5 1.0
    Zoe 5 0.671642 -1.0 574.4 0.8

    Now that you have the data and the keys to analyze esports data, make your own stats with more metrics, extend the games analyzed to Playoffs, and even to more regions like LCK and LPL. For other metric, I advise to take a look at this sheet made by LEC analyst that explains the metrics and how to compute them : https://docs.google.com/spreadsheets/d/1hBzgxIPpoBqinOoXCnPvpqUDz4Ja9Lmfm7tqgU3kHRw/edit#gid=1424953934

    You may also want to look at last year article : https://hextechlab.com/2019/10/25/worlds2019/
    The first part to gather the data is outdated, but the analysis on champions is still working and compatible with the data gathered earlier in this article.