NFL/fantasy football data tools. Two independent parts:
- Standalone NFL analytics plots (R).
- Fantasy "moneyball" pipeline for Room 40 (Python + R): VORP/ADP draft prep, projections, live draft tools.
Repo assumed cloned to ~/foosball. Outputs write to outputs/, trained models to models/.
R: tidyverse, nflreadr, nflfastR, ggplot2, patchwork, plotly, fflr, ggimage, ggthemes, httr, rvest, wdman, tidytext, jsonlite (per-script, see each file's library() calls).
Python: pandas, numpy, scipy, scikit-learn, lightgbm, matplotlib, plotly, dash, requests, joblib.
Independent of the fantasy pipeline. Each script fetches its own data.
Room 40 settings: 12 teams, full PPR, QB/RB/RB/WR/WR/TE/FLEX/K/DEF/BN x5, no keepers.
Objective: rank draft value from data, not gut feel. VORP over raw projections, empirical league splits over assumed ones, leakage-safe time-based train/val splits (same standard as the SPY trading model).
Phases run in order; each depends on the prior phase's output files.
| Script | Output | Function |
|---|---|---|
r/fetchNflBreakoutSignals.R |
— | Raw signal inputs (efficiency, usage trend) for 2nd/3rd-year breakout scoring. |
python/buildNflBreakoutScore.py |
— | Composite z-scored breakout score for young skill players — strong underlying signal, production hasn't caught up yet. |
r/fetchNflRookieData.R |
— | Draft capital + combine testing, rookies with no NFL usage history. |
python/buildNflRookieLandingSpot.py |
— | Vacated target/snap share on a rookie's new team — clear path to touches, independent of talent. |
python/buildNflRookieTrainingPanel.py / python/trainNflRookieModel.py |
— | Small-sample rookie-year model (Ridge only): draft capital + combine + landing spot. No prior-year usage available for the main model. |
python/scoreNfl2026Rookies.py |
— | Scores the incoming rookie class with the rookie prior model. |
nflDraftDashboard.py (browser dashboard) + a Chrome extension for a pinned side panel next to your Sleeper draft tab. Polls a Sleeper draft and recommends picks in real time. Runs entirely on your own machine — nothing uploaded anywhere.
- Install Python from python.org (Windows/Mac installer, defaults are fine). On Windows, check "Add Python to PATH."
- Download this repo: GitHub → green "Code" button → "Download ZIP" → unzip.
- Open a terminal in the unzipped folder:
- Windows: File Explorer → address bar → type
cmd→ Enter. - Mac: Terminal →
cd(with trailing space) → drag the folder in → Enter.
- Windows: File Explorer → address bar → type
- Install dependencies:
pip install pandas numpy requests plotly dash - Get
vorp_2026.csvfrom James (it's the pipeline's model output, not source code — not included in the repo download). Place it atoutputs/fantasy/vorp_2026.csvinside your copy.
- Draft ID: open your Sleeper draft, copy the number from the URL —
https://sleeper.com/draft/nfl/1234567890123456789. - Slot: your pick position in round 1 (e.g. pick 5th → slot
5).
Start the dashboard:
python python/nflDraftDashboard.py --port 8877
No draft ID/slot needed at launch — the app starts blank and stays running across every mock draft. Leave the terminal open; closing it stops the dashboard.
Install the extension (one-time):
- Chrome →
chrome://extensions→ enable Developer mode (top right). - Load unpacked → select
chrome-extension/live-draft-sidepanelinside your unzipped repo. - Click the extension's toolbar icon — opens a pinned side panel next to any tab, including your Sleeper draft.
- In the panel's top bar, enter
http://127.0.0.1:8877and click Save. This persists across restarts.
Each draft:
- In the dashboard (side panel or
http://127.0.0.1:8877in a full tab), paste your draft ID/URL and slot into the input bar at top. - Click Load Draft.
- To switch to a new mock, paste the new draft ID/slot and click Load Draft again — no restart required.
Running the dashboard on a different machine than your browser (e.g. hosting on a home server, viewing from a laptop): start it with --host 0.0.0.0 instead of the default 127.0.0.1, then use that machine's LAN IP (e.g. http://10.0.0.x:8877) in the extension's URL bar instead of 127.0.0.1. Only do this on a trusted home network — 0.0.0.0 accepts connections from any device that can reach that IP.
| Symptom | Fix |
|---|---|
command not found: python |
Use python3 instead of python. |
| Stuck at "Draft not started yet" | Draft hasn't begun on Sleeper's end, or wrong draft ID — recheck the URL. |
ModuleNotFoundError |
Re-run the pip install command from step 1.4. |
| Extension side panel says "refused to connect" | Dashboard isn't running, or the URL in the panel doesn't match where it's actually listening (127.0.0.1 vs a LAN IP — see above). |
outputs/populates on first run; gitignored except for example images inimages/.models/ships pretrained (16.pklfiles, ~2MB) — draft-day tools work out of the box, no retraining required.- Live draft tools (
nflDraftWatch.py,nflDraftDashboard.py,nflDraftLive.py) require a real or mock Sleeper draft ID. - All plots use a dark navy theme (
#02233F/#1c2e4a) for consistency across the repo.


















