Skip to content

alfawal/LoA

Repository files navigation

LoA: League of Archives

Description

LoA: League of Archives is a CLI tool to scape analyzed League of Legends champions stats from OP.GG and BLITZ.GG into XLSX, CSV, JSON or TXT files, visualize the gathered data as a PNG plot and stream the data into a localhost html table and json.

Video Demo

Requirements

Usage

python3 project.py --help
usage: project.py [-h] [-t TYPE] [--plot | --no-plot] [--stream | --no-stream] [-v] provider

LoA: League of Archives - Scrape, export, visualize and stream data from OP.GG and Blitz.GG

Positional arguments:
  provider              Data provider to use, options: {op.gg, blitz.gg}

Optional arguments:
  -h, --help            Show this help message and exit
  -t TYPE, --type TYPE  Data exporting type, options: {xlsx, csv, json, txt}
  --plot, --no-plot     Visualize the data and export it as png
  --stream, --no-stream
                        Stream the data into html table and json response
  -v, --version         Show program's version number and exit

Results will be exported under ./results

Structure

  1. Data gathering preferences:

    • Game patch (version): 12.14
    • Game mode: Ranked Solo/Duo
    • Champion roles: all All (Top Top, Jungle Jungle, Mid Mid, Bottom Bot (ADC), Support Support)
    • Players rank: Platinum Platinum and above (Diamond Diamond, Master Master, Grandmaster Grandmaster, Challenger Challenger)
    • Region: Global
    • Data period: Month or more
  2. Data gathering methods:

    • OP.GG: API Call
    • BLITZ.GG: API Call
  3. Dataframe structuring:

    • Unique value for each champion (161 champion as for patch 12.14)

    • The most played role for a champion will be selected if multiple roles are listed.

    • Champions with "not enough sample size" mark (The provider did not find enough matches to analyze) will automatically have 0 row values.

    • Columns are:

      • ChampionId: int - Source: Provider's response.

      • ChampionName: str - Source: Mapping ChampionId to ChampionName from Data Dragon's champions json response.

      • Role: str - Source: Provider's response.

      • TotalGames: int - Source: Provider's response.

      • wins: int - Source: Provider's response.

      • Losses: int - Source: Provider's response.

      • Winrate: str | float - Source: Formula (rounded to 2 decimal places):

        $$ Winrate \space percentage = {Wins \over Total \space games} \times 100 $$

      • Provider: str - Source: The data fetch source.

Todo

Resources

Disclaimer

This project was made for educational purposes (CS50P) and does not encourage any data usage without permission from its owner.

About

LoA: League of Archives - Scrape, export, visualize and stream data from OP.GG and Blitz.GG

Topics

Resources

License

Stars

Watchers

Forks

Languages