Skip to contents

Returns strokes gained data from the PGA Tour, with all six SG categories per player: putting, around the green, approach, off the tee, tee to green, and total.

Usage

load_strokes_gained(player = NULL, use_bundled = FALSE, year = NULL)

Arguments

player

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

use_bundled

If TRUE, skip the download and use the dataset bundled with the package. Defaults to FALSE.

year

Optional season year filter (e.g., 2026).

Value

A tibble with one row per player and columns:

  • player_id: PGA Tour player ID

  • player_name: Player display name

  • country: Three-letter country code

  • sg_putt: Strokes Gained: Putting (per round avg)

  • sg_arg: Strokes Gained: Around the Green (per round avg)

  • sg_app: Strokes Gained: Approach the Green (per round avg)

  • sg_ott: Strokes Gained: Off the Tee (per round avg)

  • sg_t2g: Strokes Gained: Tee to Green (per round avg)

  • sg_total: Strokes Gained: Total (per round avg)

  • rounds: Number of measured (ShotLink) rounds

  • season: PGA Tour season year

Details

By default, downloads the latest data from GitHub releases (updated weekly). Falls back to the bundled dataset shipped with the package if the download fails (e.g., no internet connection).

Examples

sg <- load_strokes_gained(use_bundled = TRUE)
load_strokes_gained("Scheffler", use_bundled = TRUE, year = 2026)
#> # A tibble: 1 × 11
#>   player_id player_name     country sg_putt sg_arg sg_app sg_ott sg_t2g sg_total
#>   <chr>     <chr>           <chr>     <dbl>  <dbl>  <dbl>  <dbl>  <dbl>    <dbl>
#> 1 46046     Scottie Scheff… USA       0.574  0.392  0.673   0.61   1.67     2.25
#> # ℹ 2 more variables: rounds <int>, season <int>
# \donttest{
load_strokes_gained()
#> # A tibble: 1,489 × 11
#>    player_id player_name    country sg_putt sg_arg sg_app sg_ott sg_t2g sg_total
#>    <chr>     <chr>          <chr>     <dbl>  <dbl>  <dbl>  <dbl>  <dbl>    <dbl>
#>  1 28237     Rory McIlroy   NIR       0.425  0.297  0.633  1.20   2.13      2.55
#>  2 35450     Patrick Cantl… USA       0.386  0.356  0.64   0.475  1.47      1.86
#>  3 24502     Adam Scott     AUS       0.348  0.351  0.846  0.285  1.48      1.83
#>  4 33448     Justin Thomas  USA      -0.186  0.352  0.985  0.479  1.82      1.63
#>  5 29221     Webb Simpson   USA       0.608  0.294  0.613 -0.007  0.899     1.51
#>  6 46970     Jon Rahm       ESP       0.336  0.073  0.405  0.692  1.17      1.50
#>  7 32839     Hideki Matsuy… JPN       0.011  0.347  0.759  0.381  1.49      1.50
#>  8 48081     Xander Schauf… USA       0.244  0.211  0.481  0.456  1.15      1.39
#>  9 36689     Brooks Koepka  USA       0.226  0.036  0.636  0.468  1.14      1.37
#> 10 25364     Paul Casey     ENG      -0.092  0.133  0.706  0.614  1.45      1.36
#> # ℹ 1,479 more rows
#> # ℹ 2 more variables: rounds <int>, season <int>
# }