Skip to contents

Links ESPN player IDs (used by [load_holes()], [load_leaderboard()] and [add_win_probability()]) to PGA Tour player IDs (used by [load_shots()], [load_tee_times()] and [load_strokes_gained()]).

Usage

load_player_ids(player = NULL)

Arguments

player

Optional player name filter (partial match, case-insensitive).

Value

A tibble with player_name, espn_player_id, pga_player_id, first_season, last_season and events_matched.

Details

Pairs come from events that appear in both sources (2012 on): a player with the same name in the same event votes for a pair, and a pair needs at least two such events. IDs that pair with more than one partner (for example two players with the same name) are left out rather than guessed.

Examples

# \donttest{
load_player_ids("Scheffler")
#> # A tibble: 1 × 6
#>   player_name       espn_player_id pga_player_id first_season last_season
#>   <chr>             <chr>          <chr>                <int>       <int>
#> 1 Scottie Scheffler 9478           46046                 2014        2026
#> # ℹ 1 more variable: events_matched <int>
# }