Inspiration Basketball comparisons often present a ranking or prediction without enough context to evaluate it. CourtVision brings team, player, lineup, and shooting evidence into one workspace, with sample sizes and model limitations visible alongside the results.

What it does Start with two teams to compare a matchup or explore a best-of-seven series. Compare player profiles, search observed lineups with required and excluded players, and inspect shooting patterns across 219,527 recorded attempts. Save studies and export evidence as JSON for reproducible comparisons.

CourtVision helps analysts identify rotation candidates for film review, compare players for a role, and investigate whether scoring differences come from shot selection or conversion. It is a historical research tool, not a live prediction service.

How it was built The interface uses JavaScript, HTML, CSS, SVG, and Canvas. Python pipelines process cached NBA data from BoxScore Lab and SportsDataverse/hoopR, with provenance hashes and CC BY 4.0 attribution. pandas, scikit-learn, SQLite, and FastAPI support the analysis and local API. Exported model coefficients run directly in the browser. The complete prototype also runs offline from a single HTML file. Original software is MIT licensed.

Challenges and lessons Small lineup samples can produce misleading rankings, so the app shrinks estimates toward the available-team average and exposes sensitivity to the prior. Chronological model evaluation requires preventing future information from entering pregame features. Consistent results across the Python API, browser calculations, and offline build are checked automatically.

The evaluation also showed why small improvements need scrutiny: the exploratory matchup vulnerability index did not demonstrate reliable incremental predictive value. It remains clearly labeled as exploratory.

Results An Elo-based game model achieved 0.5996 log loss against a 0.6884 home-rate baseline on a separate 1,071-game 2025–26 audit. A shot-location/context model achieved 0.6487 log loss against a 0.6741 shot-value baseline on 2024–25 shots. All 32 Python tests, eight JavaScript suites, and 11 cached-source checksums passed for the submitted build.

Limitations and next steps Lineup comparisons are observational, and the series simulator is a conditional scenario tool rather than a playoff-validated forecast. The displayed workspace uses a historical 2024–25 snapshot and does not incorporate live injuries or roster changes. Further work would expand lineup coverage, add more independent evaluation seasons, and support structured analyst feedback.

Share this project:

Updates

Submission history