Mack's LoL Scout
Cheat sheet

Glossary

Short definitions, plus why you care and where it shows up. If a term makes you sigh, it belongs here.

Python basics

Dependency

A library your code uses (like requests, pandas, plotly).

If you import something and Python says “No module named ...”, you’re missing a dependency.

Module

A Python file you can import (like scout.py) or run (like python -m ...).

This project grows into multiple modules so each file stays small and readable.

Package

A folder of Python code (often with __init__.py) that you import as a unit.

Packages let you organize code into folders instead of one mega-file.

__main__.py

A special file that runs when you do python -m package.

It’s the “entry point” for your CLI when you run python -m src.scout.

__init__.py

A file that marks a folder as an importable package (classic style).

If imports or python -m get weird, empty __init__.py files can make Python stop arguing.

Terminal + Files

Working directory

The folder your command is “currently in” when you run a program.

Relative paths like data/raw/... only work if you run from the project root.

Relative path

A file path like data/raw/matches.json that starts from your current folder.

It’s convenient, but it breaks if you run the program from the wrong place.

Secrets + Config

Environment variable

A setting stored outside your code, provided by your terminal/OS.

Great for API keys: your code can read them, but you don’t hardcode secrets.

API key

A secret token that proves you’re allowed to call an API.

Missing/expired keys cause 401/403. Your code can be perfect and still fail without a key.

Errors + Debugging

Traceback

The stack of calls Python prints when it crashes.

Read from the bottom: the last line is the real error; the line above usually points to your bug.

Exception

An error object Python throws when something goes wrong.

Catching exceptions lets you skip one bad match instead of crashing the whole run.

IndentationError

Python complaining about incorrect indentation.

Indentation is syntax in Python. One wrong indent can break the whole file.

KeyError

You asked a dict for a key that doesn’t exist.

Usually means “your JSON shape isn’t what you thought.” Print keys and use .get() while exploring.

TypeError

You tried to use the wrong type (like indexing a list with a string).

This is the “I thought it was a dict but it was a list” bug. Print type() and keys/length.

FileNotFoundError

Python couldn’t find a file at the path you gave it.

Often means you ran the command from the wrong folder (working directory).

Data + Files

CSV

A simple table format: one row per record, columns separated by commas.

It’s the bridge between “pile of JSON” and “analysis + charts”.

Raw dataset

The original JSON you downloaded from the API.

You don’t “fix” raw data. You save it so bugs are reproducible and analysis is stable.

Derived dataset

Files you generate from raw data (like CSV and reports).

Derived files are rebuildable. If something is wrong, delete and regenerate.

Cache

Saved responses so you don’t re-download constantly.

It makes reruns fast and keeps you from getting 429’d into the shadow realm.

Update mode

A switch that tells your program to fetch fresh data instead of reusing local files.

It’s a simple alternative to TTL. Default runs are calm; update runs are intentional.

IDs + Routing

Riot ID

A player-facing identifier: GameName#TAG.

You type this. The program turns it into the IDs the API actually wants.

PUUID

A long, stable player ID used to fetch match history.

It’s the “join key” for your dataset: Riot ID → PUUID → matches → CSV → reports.

Routing value

Which host you call (platform vs regional).

Wrong host = 404s or empty lists. This is the #1 “my code is cursed” illusion.

HTTP + JSON

HTTP status code

A number that describes what happened (200, 401, 403, 404, 429…).

It tells you what to fix: keys, routing, URLs, or rate limits.

Header

Extra metadata sent with a request (like your API key).

If auth is missing/wrong, you’ll see 401/403 and nothing else matters.

JSON

A text format for nested data: objects and arrays.

In Python, JSON becomes dict/list. Knowing that makes “nested data” less scary.

Rate limit (429)

The server telling you to chill.

It means “slow down + cache”. It does not mean “you are bad at coding”.

Analysis + Charts

DataFrame

A table (rows + columns) used for analysis.

Once your matches are in a DataFrame, stats and charts become straightforward.

groupby

A “split → compute → combine” pattern (counts, means, winrates).

This is how you turn “a pile of games” into “champ pool winrates”.

Rolling window

Compute a metric over the last N games (like winrate over the last 10).

It smooths noisy game-to-game swings into a trend you can actually read.

Plotly

A library that turns data into interactive charts saved as HTML files.

You get “shareable charts” without building a web app.