A Streamlit-powered data analytics platform for NBA game predictions and DraftKings Pick 6 analysis.
- Game Predictions: Win probabilities, predicted spreads & totals for every NBA game
- Pick 6 Analysis: Player prop modeling with over/under probabilities and entry building tools
- Team Stats: Interactive team dashboards with rolling averages, rankings, and comparisons
- Player Stats: Individual player analysis, game logs, splits, and trend charts
- Model Performance: Accuracy tracking, calibration plots, and backtesting results
- nba_api — Primary data source for game data, box scores, player stats, and league standings
- Basketball Reference — Advanced metrics, four factors, and historical data
- The Odds API — Market odds for model calibration and edge detection
- ESPN / Rotowire — Injury reports and lineup confirmations
| Category | Tools |
|---|---|
| App Framework | Streamlit |
| Data | nba_api, BeautifulSoup4, requests |
| Analysis | pandas, NumPy, SciPy, statsmodels |
| ML Models | scikit-learn, XGBoost, LightGBM |
| Visualization | Plotly, Matplotlib, Seaborn |
See the docs/ folder for detailed planning:
- Data Sources — nba_api endpoints, scraping targets, odds APIs
- Features — Team, player, matchup, and Pick 6 feature engineering
- Layout — Streamlit page structure and UI design
- Models — ML model selection, training, and evaluation
- Predictions — Game outcome and Pick 6 prediction methodology
- Referee assignments now use
nba_officialas primary source with ESPN fallback; eliminated duplicates (e.g. J.T. Orr / JT Orr mismatch), and droppedESPN_GAME_IDfrom schema. - Added workflow
.github/workflows/referee-assignments.ymlscheduled at0 16 * * *(11 AM ET) and manualworkflow_dispatch. - Implemented
scripts/preload_cache.pyto prewarm parquet cache + run predictions; integrated into.github/workflows/nightly-pipeline.yml. - Added
get_today_predictions()andrun_and_cache_predictions()inutils/data_fetcher.py. - Added disk cache for
get_standings()with same-day freshness guard inutils/data_fetcher.py. - Fixed injury report team field parsing in
get_injury_report()(team_entry.displayNameinstead of nestedteam.displayName). - Moved injury report section to top-level in
pages/1_Game_Predictions.pyso it renders independent of prediction success. - Verified and corrected column mapping in Streamlit UI:
pages/3_Team_Stats.py: standings columnsHOME,ROAD,L10,strCurrentStreak(real API fields), plus humanized labels.pages/4_Player_Stats.py: renamed game log columns with confirmed fields (GAME_DATE,MATCHUP,WL,FG_PCT, etc.).pages/1_Game_Predictions.py: injury report title-case columns and include team correctly.
- Added a robust data verification process to inspect actual parquet schema before renaming columns (avoid assumptions).