Scrape Team Active Payroll Breakdown from Spotrac
Source:R/sptrc_team_active_payroll.R
sptrc_team_active_payroll.Rd
This function allows you to scrape a team's active payroll from Spotrac.
Usage
sptrc_team_active_payroll(team_abbr, year = most_recent_mlb_season())
Value
A data frame of contract data.
col_name | types |
year | numeric |
team | character |
player_name | character |
roster_status | character |
age | numeric |
pos | numeric |
status | numeric |
waiver_options | numeric |
base_salary | numeric |
signing_bonus | numeric |
payroll_salary | numeric |
adj_salary | numeric |
payroll_percent | numeric |
lux_tax_salary | numeric |
total_salary | numeric |
Examples
# \donttest{
try(sptrc_team_active_payroll(team_abbr = "BAL", year = most_recent_mlb_season()))
#> ── MLB Active Payroll data from Spotrac.com ───────── baseballr 1.6.0 ──
#> ℹ Data updated: 2024-04-13 21:57:24 UTC
#> # A tibble: 32 × 15
#> year team player_name roster_status age pos status
#> <dbl> <chr> <chr> <chr> <dbl> <chr> <chr>
#> 1 2024 BAL Corbin Burnes Active 29 SP Arb 3
#> 2 2024 BAL Craig Kimbrel Active 36 RP/CL Vet
#> 3 2024 BAL Anthony Santander Active 29 RF Arb 4 (S2)
#> 4 2024 BAL Cedric Mullins Active 29 CF Arb 2
#> 5 2024 BAL Austin Hays Active 28 LF Arb 2
#> 6 2024 BAL Ryan Mountcastle Active 27 DH Arb 1
#> 7 2024 BAL James McCann Active 34 C Vet
#> 8 2024 BAL Ryan O'Hearn Active 30 1B Arb 3
#> 9 2024 BAL Jorge Mateo Active 29 SS Arb 2
#> 10 2024 BAL Daniel Coulombe Active 34 RP Arb 3
#> # ℹ 22 more rows
#> # ℹ 8 more variables: waiver_options <dbl>, base_salary <dbl>,
#> # signing_bonus <dbl>, payroll_salary <dbl>, adj_salary <dbl>,
#> # payroll_percent <dbl>, lux_tax_salary <dbl>, total_salary <dbl>
# }