Skip to content

Add win probability API and graphs#61

Merged
andschneider merged 6 commits intomainfrom
win-probability
Jun 16, 2025
Merged

Add win probability API and graphs#61
andschneider merged 6 commits intomainfrom
win-probability

Conversation

@andschneider
Copy link
Collaborator

This adds a win probability endpoint from the stats API and graphs in the Schedule and Gameday views.

  • In the Schedule tab, the whole game win probability is shown so you can get a quick overview of the flow of the game. This is heavily inspired by Baseball Savant's win probability graph.
image
  • In the Gameday tab, the last few at bats are shown with more stats around the win probability for that specific at bat. The at bat selection scrolls with the plays, which lets you see how impactful specific at bats were to the win probability. The info is:
    • leverage index (li)
    • win probability added (wpa)
    • home team win probability (win)
Screenshot 2025-06-14 at 10 30 10 AM

@andschneider andschneider merged commit 6dfa496 into main Jun 16, 2025
2 checks passed
@andschneider andschneider deleted the win-probability branch June 16, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant