尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
This project analyzes the NBA Last Two Minute (L2M) Report through an interactive Flask dashboard.
The L2M report is the league's transparency initiative for officiating decisions in the final two minutes of close games (fourth quarter and overtime). This app turns that raw report data into a decision-quality dashboard focused on trends, call types, teams, and players.
The broader goal is aligned with the literature review direction: use L2M data to investigate officiating quality, call recognition, and potential patterns in high-leverage moments.檢視完整 README ↗This project analyzes the NBA Last Two Minute (L2M) Report through an interactive Flask dashboard.
The L2M report is the league's transparency initiative for officiating decisions in the final two minutes of close games (fourth quarter and overtime). This app turns that raw report data into a decision-quality dashboard focused on trends, call types, teams, and players.
The broader goal is aligned with the literature review direction: use L2M data to investigate officiating quality, call recognition, and potential patterns in high-leverage moments.
Each event is classified into one of four outcomes:
CC - Correct CallCNC - Correct No-CallIC - Incorrect CallINC - Incorrect No-CallTwo key metrics are used throughout the dashboard:
CC / (CC + IC)CC / (CC + INC)The source dataset includes rich context. The dashboard currently relies most on the fields below:
gid, date, season, playoff, home, away, home_score, away_scorecall, type2 (normalized type), decision, commentscommitting, committing_team, disadvantaged_teamCurrent data scale from the project research notes:
The UI is organized into tabs with filterable views (season, stage, team, call, and min sample):
CC, IC, INC, plus accuracy and recognitionCC, CNC, IC, INCIC and INC eventsl2m_app/app.py - Flask app and API endpointsl2m_app/data.py - loads the static dataset into an in-memory SQLite databasel2m_app/templates/index.html - dashboard layout and client-side logicl2m_app/static/style.css - dashboard stylingdata/l2m_slim.csv.gz - the dataset the app runs on (committed, ~0.7 MB)data/L2M_stats_nba.csv - archival full export, 64 columns (not used at runtime)pip install -r requirements.txtpython -m l2m_app.apphttp://127.0.0.1:5000Set L2M_DEBUG=1 to enable the Flask debug reloader. It is off by default.
This is a static dashboard. There is no ETL, no scheduled job, and nothing to operate: the app ships one data file and reads it.
On startup, l2m_app/data.py decompresses data/l2m_slim.csv.gz and loads it into an
in-memory SQLite database, adding indexes on season, decision, committing_team,
disadvantaged_team, and (call, type2). Flask then serves JSON endpoints backed by
ordinary SQL:
/api/meta/api/call-types/api/decision-breakdown/api/season-trends/api/team-errors/api/recent-games/api/top-playersThe front-end fetches these and re-renders tables and charts whenever filters change.
Loading takes well under a second and happens once per process, so it is paid on cold start and never again. This is what lets the app run on a read-only, serverless filesystem while keeping every query in SQL.
Each thread gets its own connection onto that one shared in-memory database. A single connection shared across threads returns corrupted results under the parallel fetches the dashboard issues on load.
data/l2m_slim.csv.gz is a snapshot. To rebuild it, select these 15 columns -- the only
ones any endpoint reads -- from the l2m table of the full dataset, ordered by rowid,
and write them as UTF-8 CSV compressed with gzip:
gid, date, season, playoff, home, away, home_score, away_score,
call, type2, decision, committing, committing_team, disadvantaged_team, game_details
Every column is TEXT. Keep it that way when reloading: gid values such as
0021400883 lose their leading zeros under a numeric type affinity.
Deployed on Vercel, which detects Flask from pyproject.toml and runs it as a serverless
function. Relevant configuration:
pyproject.toml - dependencies, and tool.vercel.entrypoint pointing at l2m_app.app:app.python-version - pins Python 3.13vercel.json / .vercelignore - keep the archival CSV and local database out of the bundleDeploying means pushing to the connected Git branch. Refreshing the data means regenerating
data/l2m_slim.csv.gz and committing it -- the dataset is baked into each deployment.