Skip to contents

Returns a data frame with field names and descriptions for leaderboard, hole-by-hole, logo or what's in the bag data.

Usage

pga_field_descriptions(
  data_type = c("leaderboard", "holes", "logos", "witb", "witb_switches")
)

Arguments

data_type

Character. One of "leaderboard", "holes", "logos", "witb" ([load_witb()]) or "witb_switches" ([load_witb_switches()]).

Value

A tibble with field and description columns.

Examples

pga_field_descriptions("leaderboard")
#> # A tibble: 9 × 2
#>   field           description                                   
#>   <chr>           <chr>                                         
#> 1 position        Final tournament standing                     
#> 2 player_id       ESPN athlete ID                               
#> 3 player_name     Player display name                           
#> 4 total_score     Total strokes across completed rounds         
#> 5 score_to_par    Score relative to par (e.g., '-11', 'E', '+5')
#> 6 status          Player status (live API only)                 
#> 7 tournament_id   ESPN event ID                                 
#> 8 tournament_name Name of the tournament                        
#> 9 year            Tournament year                               
pga_field_descriptions("holes")
#> # A tibble: 15 × 2
#>    field           description                                                  
#>    <chr>           <chr>                                                        
#>  1 player_id       ESPN athlete ID                                              
#>  2 player_name     Player display name                                          
#>  3 position        Final leaderboard standing                                   
#>  4 tournament_id   ESPN event ID                                                
#>  5 tournament_name Name of the tournament                                       
#>  6 round           Round number (5 = playoff)                                   
#>  7 hole            Hole number (1-18)                                           
#>  8 par             Par for the hole                                             
#>  9 score           Strokes taken on the hole                                    
#> 10 score_type      Score classification (EAGLE, BIRDIE, PAR, BOGEY, etc.)       
#> 11 year            Tournament year                                              
#> 12 field_avg       Field scoring average on the hole in that round (hosted data…
#> 13 to_par          Score relative to par on the hole (hosted data only)         
#> 14 vs_field        Strokes vs the field average on the hole (hosted data only)  
#> 15 cume_to_par     Running tournament score to par through the hole, playoff ho…
pga_field_descriptions("logos")
#> # A tibble: 13 × 2
#>    field              description                                               
#>    <chr>              <chr>                                                     
#>  1 logo_type          tour, tournament, course or club                          
#>  2 name               Display name                                              
#>  3 logo_url           Logo image URL                                            
#>  4 logo_source        Where the logo was found: pgatour, wikimedia, club_site o…
#>  5 source_page        Page the logo was found on                                
#>  6 tour               Tour code (pga, lpga, dpwt, liv, kft, champions, ...); NA…
#>  7 pga_tournament_id  PGA Tour tournament ID (tournaments)                      
#>  8 espn_tournament_id ESPN event ID (tournaments)                               
#>  9 course_id          ShotLink course ID (courses)                              
#> 10 club_id            Club slug, e.g. augusta-national; one club can have many …
#> 11 primary_color      Primary color as hex, where known                         
#> 12 secondary_color    Secondary color as hex, where known                       
#> 13 checked_at         Date the URL last returned an image                       
pga_field_descriptions("witb")
#> # A tibble: 49 × 2
#>    field         description                                                    
#>    <chr>         <chr>                                                          
#>  1 bag_id        Bag ID: source and its post key, e.g. golfwrx:687118           
#>  2 player_id     PGA Tour player ID, as in load_shots(); NA for players without…
#>  3 player_name   Player name as printed by the source                           
#>  4 as_of_date    Date of the bag post                                           
#>  5 event_name    Event the bag was seen at, where known                         
#>  6 tournament_id PGA Tour tournament ID, where the event is known               
#>  7 source        golfwrx or clubtracker (PGA Tour Club Tracker)                 
#>  8 source_url    Page the bag was published on                                  
#>  9 slot          driver, fairway, hybrid, utility, iron, wedge or putter        
#> 10 club_label    Club as listed, e.g. 3W, 7i, 56 or Putter                      
#> # ℹ 39 more rows