Skip to contents

Retrieves a directory of players for a tour. Since ESPN doesn't have a dedicated player directory endpoint, this aggregates players from recent tournament leaderboards.

Usage

load_players(year = as.integer(format(Sys.Date(), "%Y")), tour = "pga")

Arguments

year

Season year to pull players from. Defaults to current year.

tour

Tour identifier: `"pga"` (default), `"liv"`, `"lpga"`, `"euro"`, or `"champions"`.

Value

A tibble with player data including:

  • player_id: ESPN athlete ID

  • player_name: Player display name

Examples

# \donttest{
# Get player directory
players <- load_players()
# }