What is League of Legends?
League of Legends (LoL) is a competitive multiplayer online battle arena game where two teams of five players battle to destroy the opposing team’s base. Each player controls a unique character, called a “champion,” that fulfills specific roles in the team. The roles are as follows:
- Top Lane: Usually features durable champions who excel in one-on-one fights and can split-push objectives.
- Jungle: Moves around the map defeating neutral monsters and helping other lanes by setting up ambushes (called “ganks”).
- Mid Lane: Often plays champions that deal high burst damage and can influence multiple parts of the map.
- Bot Lane (ADC): Focuses on consistent ranged damage and relies heavily on gold and positioning.
- Support: Aids the team with healing, shielding, or crowd control, often paired with the ADC in the bot lane.
Victory depends on coordination, individual performance, and strategic decisions throughout the match. This analysis seeks to determine which champions yield the highest win rates in my gameplay and uncover insights into how I can improve my overall performance. Within league, I primarily play support, so most of the games seen in my analysis will comprise of champions that fit that role.
Dataset and Variables
The visualizations in this report were created from an API pulled Dataset from Riot games. Below is the code used to extract the data used.
import requests
import pandas as pd
import openpyxl
import time
import json
#Getting puuid
api_key = "RGAPI-d495340f-90ee-4c2c-845a-8f46e26c603c"
puuid_apiurl= "https://americas.api.riotgames.com/riot/account/v1/accounts/by-riot-id/Lil%20Dev/NA1?api_key="+api_key
resp= requests.get(puuid_apiurl)
player_info = resp.json()
puuid=player_info['puuid']
print(puuid)
#Getting Last 100 Matches
match_apiurl= "https://americas.api.riotgames.com/lol/match/v5/matches/by-puuid/g1x4Ag2D0oWbkoegi0OfgOvPJq3OgAzSVqPzt4eUg8obAM-c0noIlkr6pLJMa89MHT7iH9YU2kJbTg/ids?start=0&count=100&api_key="+api_key
resp_matches = requests.get(match_apiurl)
matches=resp_matches.json()
print(matches)
#Getting match info
match_info = "https://americas.api.riotgames.com/lol/match/v5/matches/"
classic_matches = []
for i in matches:
resp_matchinfo = requests.get(match_info + i + "?api_key=" + api_key)
time.sleep(.83333)
match_data = resp_matchinfo.json()
if match_data['info'].get('gameMode') != 'CLASSIC':
continue
puuid_index=match_data['metadata']['participants'].index(puuid)
my_matches=match_data['info']['participants'][puuid_index]
game_duration= match_data['info']['gameDuration']
time_stamp= match_data['info']['gameCreation']
my_matches['gameDuration']=game_duration
my_matches['Date']=time_stamp
classic_matches.append(my_matches)
#exporting my data
df=pd.DataFrame(classic_matches)
df.to_excel("Lolol.xlsx",'plzwork')
This code extracts all of my games labeled as classic, which riot describes as any game played on the normal summoners rift map. The specific variables within this data set that I used are (The Dataset will be available to download at the end):
- Champion Name – Which Champion I played
- Champ Level
- Number of Games Played – How many games did I play
- Wins
- Win Rate – Wins/total number of games
- Role – What role did I play that game
- Kill/Death Average – A ratio that determines how many kills I get per death. (Calculated by adding up my kills and assists, and then dividing by my deaths. A higher number is better)
- Average Game Duration (In Minutes)
Visualizations
Conclusion
This analysis highlights clear patterns in my gameplay, that I win most consistently on a few key champions, I’m strongest in the Support role and my most decisive games tend to be the shortest. These trends give me a concrete direction for improvement, to lean into my best champions, gather more data where sample sizes are small, and examine what leads to longer, less successful games. As I continue adding matches to this dataset, I’ll be able to refine these insights and track my progress over time. Ultimately, this project shows how even casual gaming data can reveal meaningful patterns and help guide better gameplay decisions


