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.
Documentation: https://docs.bayesesports.com/docs-data-portal - Historic data is what you also can get from Leaguepedia. EMH (short for Esports Match history) is a way more granular data format. You can find an example game on Bayes Esports data samples page.
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
Papers:
- 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
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
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
- 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
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.