Skip to contents

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())

Arguments

team_abbr

Team abbreviation

year

Year to load

Value

A data frame of contract data.

col_nametypesdescription
yearnumericPayroll season.
teamcharacterTeam abbreviation supplied to the function.
player_namecharacterPlayer name.
roster_statuscharacterPayroll table the row came from: Active, IL, or Retained Salary.
poscharacterPlayer position.
expcharacterYears of MLB service experience.
options_minorcharacterRemaining minor-league option years.
statuscharacterContract status (e.g. signed, arbitration, pre-arbitration).
payroll_salarynumericSalary counted against the team payroll (USD).
payroll_salary_adjustednumericPayroll salary adjusted for prorated and retained amounts (USD).
base_salarynumericPlayer base salary for the season (USD).
signing_bonusnumericSigning bonus allocated to the season (USD).
waiver_optionscharacterWaiver and option flags reported by Spotrac.

Columns after roster_status mirror Spotrac's current payroll table and may change as Spotrac updates its layout.

Examples

# \donttest{
 try(sptrc_team_active_payroll(team_abbr = "BAL", year = most_recent_mlb_season()))
#>  2026-09-10 00:50:35.389782: Invalid arguments or no contract data available!
#> data frame with 0 columns and 0 rows
# }