A space for League of Legends analytics projects by Arailla, including a curated list of publicly available resources published by the League of Legends community.
The README of this repository is an attempt to gather all LoL data-related guides, libraries, tutorials, or any other resources that may be of use to a League of Legends Data Analyst. If you feel like there's any resource that I've missed, please feel free to create a pull request or contact me on Twitter/X!
βΉοΈ This repository has been heavily inspired by the work of Edd Wester on his Football Analytics Github, which I highly recommend.
Table of Contents
While all data come from the League of Legends servers, you'll need to know how to query different APIs depending on which kind of data you're interested in. Solo Queue data is available through the Riot official API, while games played on the tournament realms can be accessed in different ways.
Documentation: https://developer.riotgames.com/
The following links are coming straight from https://riot-api-libraries.readthedocs.io/en/latest/collectingdata.html
Collecting large amounts of match IDs is far from straightforward and requires quite a few requests. If you want to spare yourself a couple of steps, Canisback on the Riot Games Third-Party Developer Community Discord currently hosts a list of match IDs that you can use to pull matches from the matches/{matchId}
endpoints. These lists are provided for free to the community for use and may go down or stop being updated at any time.
You can also use the League endpoints to get lists of ranked summoners. The positional league endpoints provide a paginated list of all summoners in a Tier + Division + Position (e.g., all ranked Diamond II Top laners). Alternatively, Canisback on the Discord currently hosts a list of league IDs that you can use to pull summoners from the leagues/{leagueId}
endpoints. These lists are provided for free to the community for use and may go down or stop being updated at any time.
Static data comes in extremely handy when you want to
- get a champion name from their ID
- display any game asset
- get champions and item stats
Since the data only changes when a new patch comes out, it's highly recommended for you to implement caching.
ddragon
is the official CDN where you can retrieve all of this information. However, you might find it quite underwhelming if you're interested in champion and item stats as it only gives you the minimal stats.
DDragon data only changes when a new LoL patch is released, which you can see the availability of in: https://ddragon.leagueoflegends.com/api/versions.json
Documentation: https://developer.riotgames.com/docs/lol
cdragon
is a massive collection of community-generated files to augment the data in DDragon. You'll find that items and spell descriptions match the ones you'll see when looking at their in-game description.
Documentation: https://riot-api-libraries.readthedocs.io/en/latest/ddragon.html
You can also clone this repository which contains and archives all of the official DDragon content: https://github.com/InFinity54/LoL_DDragon
Esports Data is about all of the matches played on tournament servers, thus not accessible by the Riot official API.
Riot mentioned that this data would be accessible to the community at some point in the future, but for now:
Leaguepedia is one of the few community projects that have been given access to the LoL Data Portal and thus act as a proxy for the public to have access to these matches, as well as aggregated data coming from their own pages.
Documentation: https://lol.fandom.com/wiki/Help:Leaguepedia_API
If you'd rather work with a prebuilt dataset, Oracle's Elixir is the perfect place for you to start as you can download .csv
files with the biggest leagues' data: https://oracleselixir.com/tools/downloads
Chinese Matches (mainly LPL and LDL) are quite specific as these competitions are not hosted by Riot themselves, and thus the data is not available from the same sources nor format (you'll notice that the data points do not exactly match the ones you get from the other leagues).
Leaguepedia is maintaining a link between the calendar and their lpl.qq link (under the "VODs & Match Links" tournament section), which in turn can be used to fetch the in-game data.
You can see it being called when opening an lpl.qq link, i.e., https://lpl.qq.com/es/stats.shtml?bmid=10413
A full API definition can be found here, but only a fraction of the endpoints can be queried using the token you can find when looking at lpl.qq match pages.
While it's not opened to the community as of yet, esports teams from ERL1+ can access it. They have access to their scrims (private training matches) data as well as all of Riot's matches data, in a very detailed (second per second) manner.
You may have heard of this data as Bayes Esports', which was the previous data provider contracted to Riot. The LoL Data portal is now being operated by GRID Esports. Source: https://esportsinsider.com/2023/11/riot-games-grid-major-data-partnership-acquires-equity-stake
GRID Esports does not provide any open documentation nor data samples.
There is an API used by https://lolesports.com/, but it is not officially supported and may change at any time without warning. There is some unofficial documentation here, but it might not be accurate or up-to-date https://vickz84259.github.io/lolesports-api-docs/
Documentation: https://github.com/Pupix/rift-explorer - An automatically generated documentation of Riot Games LCU API.
All languages
- Riot API Libraries can all be found on https://riot-api-libraries.readthedocs.io/en/latest/libraries.html
Python
Python
- An Introduction to the Riot API and its full Youtube playlist - from itero.gg
- Extracting League of Legends data with Riot API
- Leaguepedia API by Arces - stream replay of a live coding session
- An introduction to Streamlit and Plotly β using Champions Queue data by Arailla
Elixir
- Probuild Ex by mrdotB - creating a fully functioning probuild clone in Elixir
Others
Blogs I couldn't include them all, but Itero.gg has released a lot of articles in their Esports Analyst Club newsletter.
- Predicting and analyzing metagames in League of Legends by Xenesis
- Rating Performances in Competitive Environment by Xenesis
- Why is the League of Legends meta so stale? from itero.gg
- LoL: How to win your Solo Queue Draft - a statistical analysis of 1M+ games from itero.gg
- LoL: The Best Opportunities for AI in Esports from itero.gg
- FlyTracker - A Disambiguation by Sam Hine
Papers:
- The SIDO Performance Model for League of Legends
- An Approach for Team Composition in League of Legends using Genetic Algorithm (2019)
- Factor Analysis for behavior analysis by Warock
- How to Use Game Data to Win in Esports by Evil Geniuses
- How Data Is Used Within Esports Orgs by Evil Geniuses
- Analyst Insider by Jack J
- Deep Dive 2021-2023 by Beora
- π«π· KC Analyst Q&A by Xenesis
Using the Riot Official API:
- LeagueStats - A website for League of Legends summoners' stats by LeagueStatsGG
- LoL Matchup Optimizer by Max-We
- LoL Tracker by danblock
- Riot API Tools by Beora
Using Leaguepedia API:
- League of Elo by jprMesh
- ProRankings by xtevenx
Using Oracle's Elixir dataset:
- Match Modeling by ProjektZero
Using Bayes API:
Organize your replay files (.rofl):
Extracting positional data from VODS using computer vision:
- DeeperLeague by davidweatherall
- LoL Automated Video Analyser - LAVA by Steeeephen
Tools for Google Sheet:
- Set Images by Beora
- Riot Games Third Party Developer Community
- LoLStaff Analysis π§π· / πͺπΈ server organized by SrVenancio
- LoL Analyst Community organized by Alejandro Flores
- iTero Gaming organized by Jack J
- Oracle's Elixir organized by Tim Sevenhuysen
- GamesOfLegends organized by Bynjee
- LoL Coach FR π«π· server organized by Supernova
- Analitycy π΅π± server organized by Arces, Sanchi, and Devilpiotr
This repository isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends Β© Riot Games, Inc.