Get NBA win probability chart data from ESPN
Value
espn_nba_wp() - A data frame with 21 variables:
| col_name | types | description |
| game_id | numeric | Unique game identifier. |
| play_id | character | Unique play identifier within a game. |
| home_win_percentage | numeric | Home win percentage (0-1 decimal). |
| away_win_percentage | numeric | Away win percentage (0-1 decimal). |
| tie_percentage | numeric | Tie percentage (0-1 decimal). |
| sequence_number | character | Sequence number representing a shot-possession (V3 PBP). |
| text | character | Text description of the play / record. |
| away_score | integer | Away team score at the time of the play. |
| home_score | integer | Home team score at the time of the play. |
| scoring_play | logical | TRUE if the play resulted in points scored. |
| score_value | integer | Point value of the play (2 / 3 / 1). |
| participants | list | Participants. |
| shooting_play | logical | TRUE if the play was a shooting attempt. |
| type_id | character | Type identifier (numeric). |
| type_text | character | Display text for the type field. |
| period_number | integer | Numeric period (1-4 for quarters; 5+ for OT). |
| period_display_value | character | Period display label (e.g. '1st Quarter', 'OT'). |
| clock_display_value | character | Game clock display string (e.g. '8:32'). |
| team_id | character | Unique team identifier. |
| coordinate_x | integer | X coordinate on the court (half-court layout). |
| coordinate_y | integer | Y coordinate on the court (half-court layout). |
See also
Other ESPN NBA Functions:
espn_nba_athlete_awards(),
espn_nba_athlete_career_stats(),
espn_nba_athlete_contract(),
espn_nba_athlete_contracts(),
espn_nba_athlete_eventlog(),
espn_nba_athlete_eventlog_v2(),
espn_nba_athlete_gamelog(),
espn_nba_athlete_info(),
espn_nba_athlete_overview(),
espn_nba_athlete_seasons(),
espn_nba_athlete_splits(),
espn_nba_athlete_statisticslog(),
espn_nba_athlete_stats(),
espn_nba_athletes_index(),
espn_nba_award(),
espn_nba_betting(),
espn_nba_calendar(),
espn_nba_coach(),
espn_nba_coach_season(),
espn_nba_coaches(),
espn_nba_conferences(),
espn_nba_draft(),
espn_nba_draft_athletes(),
espn_nba_draft_pick(),
espn_nba_draft_rounds(),
espn_nba_draft_status(),
espn_nba_event_broadcasts(),
espn_nba_event_odds(),
espn_nba_event_officials(),
espn_nba_event_powerindex(),
espn_nba_event_predictor(),
espn_nba_event_probabilities(),
espn_nba_event_propbets(),
espn_nba_event_situation(),
espn_nba_franchise(),
espn_nba_franchises(),
espn_nba_freeagents(),
espn_nba_futures(),
espn_nba_game_all(),
espn_nba_game_rosters(),
espn_nba_injuries(),
espn_nba_leaders(),
espn_nba_news(),
espn_nba_pbp(),
espn_nba_player_box(),
espn_nba_player_stats(),
espn_nba_powerindex(),
espn_nba_scoreboard(),
espn_nba_season_awards(),
espn_nba_season_group(),
espn_nba_season_group_children(),
espn_nba_season_group_teams(),
espn_nba_season_groups(),
espn_nba_season_info(),
espn_nba_season_leaders(),
espn_nba_season_ranking(),
espn_nba_season_rankings(),
espn_nba_season_type(),
espn_nba_season_types(),
espn_nba_season_week(),
espn_nba_season_weeks(),
espn_nba_seasons(),
espn_nba_standings(),
espn_nba_team(),
espn_nba_team_box(),
espn_nba_team_current_roster(),
espn_nba_team_depthchart(),
espn_nba_team_injuries(),
espn_nba_team_leaders(),
espn_nba_team_news(),
espn_nba_team_odds_records(),
espn_nba_team_record(),
espn_nba_team_roster(),
espn_nba_team_schedule(),
espn_nba_team_season_profile(),
espn_nba_team_season_roster(),
espn_nba_team_stats(),
espn_nba_teams(),
espn_nba_tournament(),
espn_nba_tournament_seasons(),
espn_nba_tournaments(),
espn_nba_transactions(),
espn_nba_venues(),
espn_nba_week_ranking(),
espn_nba_week_rankings()
Examples
# \donttest{
espn_nba_wp(game_id = 401283399)
#> ── ESPN NBA Win Probability Information from ESPN.com ─────────── hoopR 3.1.0 ──
#> ℹ Data updated: 2026-05-19 01:34:22 UTC
#> # A tibble: 472 × 24
#> game_id play_id home_win_percentage away_win_percentage tie_percentage
#> <dbl> <chr> <dbl> <dbl> <dbl>
#> 1 401283399 4012833994 0.615 0.385 0
#> 2 401283399 4012833997 0.6 0.4 0
#> 3 401283399 4012833998 0.595 0.405 0
#> 4 401283399 4012833999 0.594 0.406 0
#> 5 401283399 40128339911 0.61 0.39 0
#> 6 401283399 40128339912 0.615 0.385 0
#> 7 401283399 40128339913 0.599 0.401 0
#> 8 401283399 40128339914 0.593 0.407 0
#> 9 401283399 40128339915 0.54 0.46 0
#> 10 401283399 40128339916 0.577 0.423 0
#> # ℹ 462 more rows
#> # ℹ 19 more variables: sequence_number <chr>, text <chr>, away_score <int>,
#> # home_score <int>, scoring_play <lgl>, score_value <int>,
#> # participants <list>, wallclock <chr>, shooting_play <lgl>,
#> # points_attempted <int>, short_description <chr>, type_id <chr>,
#> # type_text <chr>, period_number <int>, period_display_value <chr>,
#> # clock_display_value <chr>, team_id <chr>, coordinate_x <int>, …
# }
