Skip to content

FloPrm/lol_analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

Repository files navigation

League of Legends Analytics

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.

πŸ‘‹ About This Repository

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

Table of Contents
  1. About This Repository
  2. Table of Contents
  3. LoL Data Sources
  4. Resources

-----------------------------------------------------

🌱 LoL Data Sources

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.

πŸͺœ Solo Queue Data

Documentation: https://developer.riotgames.com/

Back to Contents

Collecting Data

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

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

Back to Contents

-----------------------------------------------------

πŸ“Ί Esports Data

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 API

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

Oracle's Elixir Dataset

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

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.

LoL Data Portal

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.

LoLEsports Live Data

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/

Back to Contents

-----------------------------------------------------

🏠 LoL Client Data

Documentation: https://github.com/Pupix/rift-explorer - An automatically generated documentation of Riot Games LCU API.

Back to Contents

-----------------------------------------------------

πŸ“š Resources

Libraries

All languages

Python

Back to Contents

-----------------------------------------------------

Tutorials

Python

Elixir

Others

Back to Contents

-----------------------------------------------------

Written Pieces

Blogs I couldn't include them all, but Itero.gg has released a lot of articles in their Esports Analyst Club newsletter.

Papers:

Back to Contents

-----------------------------------------------------

Videos and Podcasts

-----------------------------------------------------

Github Repositories

Using the Riot Official API:

Using Leaguepedia API:

Using Oracle's Elixir dataset:

Using Bayes API:

Organize your replay files (.rofl):

Extracting positional data from VODS using computer vision:

Tools for Google Sheet:

Back to Contents

-----------------------------------------------------

Discord Servers

Back to Contents

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published