espn_metrics | R Documentation |
ESPN Metrics
Get win probability chart data from ESPN Graciously contributed by MrCaseB:
espn_metrics_wp(game_id)
game_id |
(Integer required): Game ID filter for querying a single game
Can be found using the |
espn_metrics_wp()
- A data frame with 5 variables:
game_id
: character.Referencing game ID (should be same as game_id
from other functions).
play_id
: character.Referencing play ID.
seconds_left
: integer.Seconds left in the game.
home_win_percentage
: double.The probability of the home team winning the game.
away_win_percentage
: double.The probability of the away team winning the game (calculated as 1 - home_win_percentage
- tie_percentage
).
tie_percentage
: double.The probability of the game ending the final period in a tie.
try(espn_metrics_wp(game_id = 401114164))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.