Level 3 — Head coach
Level 3 · Head coach
Identity. Game-by-game decisions. Situational thinking, not just averages.
You move from describing the past to evaluating choices. EV, win probability, and the calculus of should you have gone for it on 4th-and-2.
What you’ll learn
Section titled “What you’ll learn”| SQL | Python |
|---|---|
Window functions (ROW_NUMBER, RANK, LAG/LEAD) | plotly for interactive viz |
| CTEs and subqueries | scipy.stats for distributions and significance |
CASE expressions | play-by-play parsing with nfl_data_py |
Capstone
Section titled “Capstone”Lions 4th-down decision analyzer. Given down, distance, field position, score, and clock, output expected value of going vs kicking vs punting. Run it on every Lions 4th down 2022-2025.
Unlock criteria
Section titled “Unlock criteria”Working calculator + a writeup of one Lions game where your model disagreed with Dan Campbell’s call. Defend or concede the disagreement.
Lesson plan
Section titled “Lesson plan”- Window functions — RANK and ROW_NUMBER
- PARTITION BY and running totals
- LAG and LEAD
- CTEs — readable multi-step queries
- CASE expressions
- plotly for interactive charts
- scipy.stats — significance and intervals
- Play-by-play with nfl_data_py
Prerequisite: load play-by-play data
Section titled “Prerequisite: load play-by-play data”Lessons 8 and the capstone need the pbp table loaded — it’s not part of the
default L1/L2 setup. From data/:
uv run python -m onepride_data.load --years 2022-2024 --tables pbpThat pulls a few hundred MB. One-time cost.