尚未检测到更新。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.