Skip to main content

MLB dataset loaders — Other

load_mlb_re24_matrix​

Release: mlb_game_state · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_game_state/mlb_re24_matrix_{season}.parquet

Returns​

col_nametypedescription
base_stateStringThree-character pre-play base occupancy where each slot carries its base number when occupied and an underscore when empty, so ___ is bases empty and 123 is bases loaded.
outsInt64Outs in the inning after the play.
reFloat64Mean runs the batting team went on to score from this base-out state through the end of the half-inning, with bottom-of-the-9th-and-later halves excluded to avoid walk-off selection bias.
nUInt32Plate appearances observed starting in this base-out state, the sample size behind re.
seasonInt64Season year.
load_mlb_re24_matrix(seasons=2024)

load_mlb_we_table​

Release: mlb_game_state · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_game_state/mlb_we_table_{season}.parquet

Returns​

col_nametypedescription
inning_cappedInt64Inning number with the ninth and every extra inning collapsed into 9, so extras share the ninth-inning win-expectancy cells.
halfString
base_stateStringThree-character pre-play base occupancy where each slot carries its base number when occupied and an underscore when empty, so ___ is bases empty and 123 is bases loaded.
outs_startInt64Outs already recorded when the plate appearance began, normally 0 through 2, though a handful of published rows carry a stale 3 that the RE24 matrix filters out but this table does not.
score_diff_bucketInt64Home score minus away score before the play, clipped to the range -6 through +6 so blowouts collapse into the end buckets.
home_win_expFloat64Home team win expectancy before the play.
nUInt32Plate appearances observed in this state bucket, the sample size behind the Laplace-smoothed home_win_exp.
thinBooleanWhether the win-expectancy cell was estimated from a thin sample of historical games.
seasonInt64Season year.
load_mlb_we_table(seasons=2024)

load_mlb_wpa​

Release: mlb_game_state · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_game_state/mlb_wpa_{season}.parquet

Returns​

col_nametypedescription
game_idStringUnique ESPN game/event identifier.
at_bat_indexInt64Zero-based index of the at-bat within the game.
wpaFloat64
seasonInt64Season year.
load_mlb_wpa(seasons=2024)

load_mlb_pbp​

Release: mlb_pbp · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_pbp/mlb_pbp_{season}.parquet

Returns​

col_nametypedescription
game_pkInt64statsapi game identifier; the join key to every other MLB release.
at_bat_indexInt64Zero-based index of the plate appearance within the game; joins to mlb_pitches and mlb_runners.
inningInt64Inning number, counting from 1; extra innings continue the sequence.
half_inningStringtop or bottom.
batter_idInt64statsapi person id of the batter.
pitcher_idInt64statsapi person id of the pitcher.
event_typeStringMachine-readable plate-appearance outcome (e.g. single, strikeout, field_out).
eventStringHuman-readable outcome of the plate appearance.
descriptionStringNarrative text for the plate appearance.
rbiInt64Runs batted in credited to this plate appearance.
away_scoreInt64Away score AFTER the plate appearance.
home_scoreInt64Home score AFTER the plate appearance.
is_scoring_playBooleanWhether the plate appearance scored a run.
outsInt64Outs recorded after the plate appearance.
start_timeStringUTC timestamp when the plate appearance began; null in older seasons.
end_timeStringUTC timestamp when the plate appearance ended; null in older seasons.
post_on_first_idInt64Person id on first base after the plate appearance; null when unoccupied.
post_on_second_idInt64Person id on second base after the plate appearance; null when unoccupied.
post_on_third_idInt64Person id on third base after the plate appearance; null when unoccupied.
load_mlb_pbp(seasons=2024)

load_mlb_pitches​

Release: mlb_pitches · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_pitches/mlb_pitches_{season}.parquet

Returns​

col_nametypedescription
game_pkInt64statsapi game identifier; the join key to every other MLB release.
at_bat_indexInt64Zero-based index of the plate appearance within the game; joins to mlb_pbp and mlb_runners.
pitch_numberInt64One-based pitch number within the plate appearance.
batter_idInt64statsapi person id of the batter.
pitcher_idInt64statsapi person id of the pitcher.
pitch_typeStringClassified pitch-type code (FF, SL, CH, ...). statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
pitch_nameStringHuman-readable pitch type. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
call_codeStringUmpire call code (B, C, S, X, ...).
call_descriptionStringHuman-readable umpire call.
ballsInt64Ball count BEFORE the pitch.
strikesInt64Strike count BEFORE the pitch.
outsInt64Outs BEFORE the pitch.
start_speedFloat64Release speed in mph. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
end_speedFloat64Speed crossing the plate in mph. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
spin_rateFloat64Spin rate in rpm. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
extensionFloat64Release extension toward the plate in feet. Later than the rest of pitchData: measured 0% through 2016 and ~100% from 2017, so it is null for the 2007-2016 PITCHf/x seasons that do carry speed and spin.
pxFloat64Horizontal location crossing the plate in feet from the plate's centre, catcher's view. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
pzFloat64Height crossing the plate in feet above the ground. statsapi pitchData, measured fill: ~0% before 2007, 45.7% in 2007 (mid-season PITCHf/x rollout across ballparks), 96.6% in 2008, ~100% from 2015. Null for pitches the system never tracked.
sz_topFloat64Top of the batter's strike zone in feet. Derived from the batter, not pitchData, so it is populated back to 1988.
sz_botFloat64Bottom of the batter's strike zone in feet. Derived from the batter, not pitchData, so it is populated back to 1988.
launch_speedFloat64Exit velocity off the bat in mph. statsapi hitData, Statcast-era and batted balls only: null before 2015 and ~17% populated after, which is the share of pitches put in play rather than a coverage gap.
launch_angleFloat64Vertical launch angle in degrees. statsapi hitData, Statcast-era and batted balls only: null before 2015 and ~17% populated after, which is the share of pitches put in play rather than a coverage gap.
total_distanceFloat64Batted-ball distance travelled in feet. statsapi hitData, Statcast-era and batted balls only: null before 2015 and ~17% populated after, which is the share of pitches put in play rather than a coverage gap.
trajectoryStringBatted-ball trajectory (ground_ball, line_drive, fly_ball, popup). Legacy scorer field, batted balls only: ~20% populated in every season back to 1988, and present long before Statcast.
hardnessStringScorer's contact-quality grade (soft, medium, hard). Legacy scorer field, batted balls only: ~20% populated in every season back to 1988, and present long before Statcast.
load_mlb_pitches(seasons=2024)

load_mlb_runners​

Release: mlb_runners · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_runners/mlb_runners_{season}.parquet

Returns​

col_nametypedescription
game_pkInt64statsapi game identifier; the join key to every other MLB release.
at_bat_indexInt64Zero-based index of the plate appearance within the game; joins to mlb_pbp and mlb_pitches.
runner_idInt64statsapi person id of the baserunner.
origin_baseStringBase the runner occupied when the plate appearance began; null for the batter.
start_baseStringBase the runner started this movement from; null when the movement begins at the plate.
end_baseStringBase the runner finished on; null when retired or when scoring is recorded by is_scoring_event.
out_baseStringBase at which the runner was retired; null when not retired.
is_outBooleanWhether the runner was retired on this movement.
out_numberInt64Which out of the half-inning this retirement was; null when not retired.
eventStringHuman-readable event that caused the movement.
event_typeStringMachine-readable event that caused the movement.
movement_reasonStringstatsapi reason code for a movement not caused by the plate appearance itself (e.g. r_stolen_base_2b).
is_scoring_eventBooleanWhether this movement scored a run.
rbiBooleanWhether the run was credited as an RBI to the batter.
earnedBooleanWhether the run was earned against the responsible pitcher.
responsible_pitcher_idInt64statsapi person id of the pitcher charged with the runner.
load_mlb_runners(seasons=2024)

load_mlb_statcast​

Release: mlb_statcast · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_statcast/mlb_statcast_{season}.parquet

Returns​

col_nametypedescription
pitch_typeStringAbbreviation of the pitch type thrown (e.g. FF, SL, CH).
game_dateStringGame date (YYYY-MM-DD).
release_speedFloat64Pitch velocity out of the hand (mph).
release_pos_xFloat64Horizontal release position of the ball, catcher's perspective (feet).
release_pos_zFloat64Vertical release position of the ball, catcher's perspective (feet).
player_nameStringBatter name, Last, First (Baseball Savant's batter-side player_name).
batterInt64MLBAM player id of the batter.
pitcherInt64MLBAM player id of the pitcher.
eventsStringPlate-appearance result on the pitch that ended it (e.g. single, strikeout, walk); null on every other pitch.
descriptionStringPitch outcome (e.g. ball, called_strike, swinging_strike, foul, hit_into_play).
spin_dirFloat64Deprecated spin direction field, no longer populated.
spin_rate_deprecatedFloat64Deprecated legacy spin-rate field, no longer populated.
break_angle_deprecatedFloat64Deprecated legacy break-angle field, no longer populated.
break_length_deprecatedFloat64Deprecated legacy break-length field, no longer populated.
zoneFloat64Strike-zone region the pitch crossed (1-14 Gameday zone).
desStringFull text description of the play.
game_typeStringGame-type code; spring training (S) and exhibition (E) games are included alongside R and the postseason.
standStringSide of the plate the batter is standing (L or R).
p_throwsStringHand the pitcher throws with (L or R).
home_teamStringHome team abbreviation (e.g. SF).
away_teamStringAway team abbreviation (e.g. LAD).
typeStringPitch result class -- B ball, S strike (including fouls), X ball in play.
hit_locationFloat64Fielder position number that fielded the ball.
bb_typeStringBatted-ball type (ground_ball, line_drive, fly_ball, popup).
ballsInt64Ball count before the pitch.
strikesInt64Strike count before the pitch.
game_yearInt64Season year of the game.
pfx_xFloat64Horizontal pitch movement from the catcher's perspective (feet).
pfx_zFloat64Vertical pitch movement from the catcher's perspective (feet).
plate_xFloat64Horizontal position of the pitch crossing the plate (feet from center).
plate_zFloat64Vertical position of the pitch crossing the plate (feet above ground).
on_3bInt64MLBAM ID of the runner on third base, if any; published as a float and cast to Int64 by the loader.
on_2bInt64MLBAM ID of the runner on second base, if any; published as a float and cast to Int64 by the loader.
on_1bInt64MLBAM ID of the runner on first base, if any; published as a float and cast to Int64 by the loader.
outs_when_upInt64Number of outs when the batter came to the plate.
inningInt64Inning number.
inning_topbotStringHalf of the inning (Top or Bot).
hc_xFloat64Hit coordinate X on the field diagram.
hc_yFloat64Hit coordinate Y on the field diagram.
tfs_deprecatedFloat64Deprecated time-from-start field, no longer populated.
tfs_zulu_deprecatedFloat64Deprecated Zulu time-from-start field, no longer populated.
umpireFloat64Deprecated umpire field; always null.
sv_idStringDeprecated Sportvision/Statcast pitch identifier, no longer populated.
vx0Float64Velocity of the pitch in the x-direction at y=50 ft (ft/s).
vy0Float64Velocity of the pitch in the y-direction at y=50 ft (ft/s).
vz0Float64Velocity of the pitch in the z-direction at y=50 ft (ft/s).
axFloat64Acceleration of the pitch in the x-direction at y=50 ft (ft/s^2).
ayFloat64Acceleration of the pitch in the y-direction at y=50 ft (ft/s^2).
azFloat64Acceleration of the pitch in the z-direction at y=50 ft (ft/s^2).
sz_topFloat64Top of the batter's strike zone for the pitch (feet).
sz_botFloat64Bottom of the batter's strike zone for the pitch (feet).
hit_distance_scFloat64Statcast-measured projected distance of the batted ball (feet).
launch_speedFloat64Exit velocity of the batted ball (mph).
launch_angleFloat64Vertical launch angle of the batted ball (degrees).
effective_speedFloat64Perceived velocity adjusted for release extension (mph).
release_spin_rateFloat64Spin rate of the pitch at release (rpm).
release_extensionFloat64Distance toward the plate at release (feet).
game_pkInt64Unique game identifier.
fielder_2Int64MLBAM ID of the catcher.
fielder_3Int64MLBAM ID of the first baseman.
fielder_4Int64MLBAM ID of the second baseman.
fielder_5Int64MLBAM ID of the third baseman.
fielder_6Int64MLBAM ID of the shortstop.
fielder_7Int64MLBAM ID of the left fielder.
fielder_8Int64MLBAM ID of the center fielder.
fielder_9Int64MLBAM ID of the right fielder.
release_pos_yFloat64Release position of the ball toward the plate (feet).
estimated_ba_using_speedangleFloat64Expected batting average based on exit velocity and launch angle.
estimated_woba_using_speedangleFloat64Expected wOBA based on exit velocity and launch angle.
woba_valueFloat64wOBA value assigned to the event.
woba_denomFloat64wOBA denominator (plate-appearance weight) for the event.
babip_valueFloat64BABIP value assigned to the event (0 or 1).
iso_valueFloat64Isolated power value assigned to the event.
launch_speed_angleFloat64Batted-ball classification code (1-6) from exit velocity and angle.
at_bat_numberInt64Sequential plate-appearance number within the game.
pitch_numberInt64Pitch number within the plate appearance.
pitch_nameStringFull name of the pitch type (e.g. 4-Seam Fastball, Slider).
home_scoreInt64Home team score before the pitch (see post_home_score).
away_scoreInt64Away team score before the pitch (see post_away_score).
bat_scoreInt64Batting team score before the pitch.
fld_scoreInt64Fielding team score before the pitch.
post_away_scoreInt64Away team score after the pitch.
post_home_scoreInt64Home team score after the pitch.
post_bat_scoreInt64Batting team score after the pitch.
post_fld_scoreInt64Fielding team score after the pitch.
if_fielding_alignmentStringInfield defensive alignment (Standard, Strategic, Infield shift).
of_fielding_alignmentStringOutfield defensive alignment (Standard, Strategic, 4th outfielder).
spin_axisFloat64Spin axis of the pitch as a clock-face angle (degrees).
delta_home_win_expFloat64Change in home team win expectancy on the play.
delta_run_expFloat64Change in run expectancy on the play.
bat_speedFloat64Bat speed at the point of contact (mph).
swing_lengthFloat64Length of the swing path to contact (feet).
miss_distanceFloat64How far the bat missed the ball on a swing and miss (Savant bat tracking); null on every other pitch and before bat tracking.
estimated_slg_using_speedangleFloat64Expected slugging based on exit velocity and launch angle.
delta_pitcher_run_expFloat64Change in run expectancy credited to the pitcher.
hyper_speedFloat64Adjusted (90th-percentile) exit velocity (mph).
home_score_diffInt64Home team score minus away team score before the pitch.
bat_score_diffInt64Batting team score minus fielding team score before the pitch.
home_win_expFloat64Home team win expectancy before the play.
bat_win_expFloat64Batting team win expectancy before the play.
age_pit_legacyInt64Pitcher age using the legacy calculation.
age_bat_legacyInt64Batter age using the legacy calculation.
age_pitInt64Pitcher age for the season.
age_batInt64Batter age for the season.
n_thruorder_pitcherInt64Times through the order the pitcher is facing the lineup.
n_priorpa_thisgame_player_at_batInt64Number of prior plate appearances by the batter in the game.
pitcher_days_since_prev_gameFloat64Days since the pitcher's previous game appearance.
batter_days_since_prev_gameFloat64Days since the batter's previous game appearance.
pitcher_days_until_next_gameFloat64Days until the pitcher's next game appearance.
batter_days_until_next_gameFloat64Days until the batter's next game appearance.
api_break_z_with_gravityFloat64Vertical pitch break including gravity (inches).
api_break_x_armFloat64Horizontal pitch break to the pitcher's arm side (inches).
api_break_x_batter_inFloat64Horizontal pitch break toward/away from the batter (inches).
arm_angleFloat64Pitcher's arm angle at release (degrees).
attack_angleFloat64Angle of the bat's path at contact (degrees).
attack_directionFloat64Horizontal direction of the swing at contact (degrees).
swing_path_tiltFloat64Vertical tilt of the swing path (degrees).
intercept_ball_minus_batter_pos_x_inchesFloat64Horizontal offset of ball-bat intercept from batter position (inches).
intercept_ball_minus_batter_pos_y_inchesFloat64Depth offset of ball-bat intercept from batter position (inches).
seasonInt64Season year.
load_mlb_statcast(seasons=2024)

load_mlb_schedule​

Release: mlb_schedules · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_schedules/mlb_schedule_{season}.parquet

Returns​

col_nametypedescription
game_pkInt64statsapi game identifier; the join key to every other MLB release.
game_dateStringOfficial game date (YYYY-MM-DD, local to the venue).
game_datetimeStringScheduled first-pitch time as an ISO-8601 UTC timestamp string (e.g. 2024-02-22T20:10:00Z).
seasonInt64MLB season year the game belongs to (the asset's season).
game_typeStringstatsapi game-type code (R regular season, S spring training, E exhibition, A All-Star, F/D/L/W wild card / division series / LCS / World Series).
status_codeStringStatus code identifier (e.g. 'S', 'P', 'I', 'F').
detailed_stateStringDetailed status description (e.g. 'Scheduled', 'Pre-Game', 'In Progress').
abstract_stateStringCoarse game state (Preview, Live or Final).
home_team_idInt64Home team id.
home_team_nameStringHome team name.
home_scoreInt64Home team's final run total (null for a game not yet played).
away_team_idInt64Away team id.
away_team_nameStringAway team name.
away_scoreInt64Away team's final run total (null for a game not yet played).
venue_idInt64MLBAM venue ID.
venue_nameStringVenue name.
double_headerStringDoubleheader indicator ('N', 'S', 'Y').
game_numberInt64Game number within a doubleheader.
series_descriptionStringDescription of the series.
load_mlb_schedule(seasons=2024)

load_mlb_expected_stats​

Release: mlb_hitting_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_hitting_models/mlb_expected_stats_{season}.parquet

Returns​

col_nametypedescription
batterInt64MLBAM player id of the batter.
seasonInt64Season year.
paInt64Plate appearances for the batter in the season, counted as the Statcast rows that END a plate appearance (a non-empty events value). Pitches within a plate appearance are not counted.
abInt64At-bats, derived from the same plate-appearance-ending rows by excluding walks, hit-by-pitches, sacrifice flies, sacrifice bunts and catcher's interference.
xwobaFloat64Expected wOBA blending the exit-velocity by launch-angle grid's predicted contact value on balls in play with realized wOBA value on walks, hit-by-pitches and strikeouts, over the wOBA denominator; low-sample batters can exceed 1.
xbaFloat64Grid-predicted hit probability summed over the at-bat balls in play that carry launch data, plus the realized hit for balls in play Statcast did not track, divided by at-bats, on the conventional batting-average scale. An untracked ball in play takes its realized outcome exactly as xwoba does, rather than counting in ab with a zero numerator, which deflated league-mean xBA by the untracked share.
xslgFloat64The same construction on total bases -- grid-predicted total bases where launch data exists, realized total bases for untracked balls in play -- divided by at-bats, on the conventional slugging scale.
wobaFloat64Actual weighted on-base average (wOBA) for the player over the sample.
baFloat64Actual batting average for the player over the sample (0-1), alongside the expected-stat columns.
load_mlb_expected_stats(seasons=2024)

load_mlb_expected_hr​

Release: mlb_hitting_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_hitting_models/mlb_expected_hr_{season}.parquet

Returns​

col_nametypedescription
batterInt64MLBAM player id of the batter.
seasonInt64Season year.
hrInt64Home runs hit by the batter over the covered sample.
xhr_neutralFloat64Park-neutral expected home runs, summing over the batter's balls in play the home-run probability read off the exit-velocity by launch-angle by spray-angle grid.
xhr_park_adjFloat64The same expected-home-run sum after scaling each ball by its ballpark's Savant home-run park factor over 100; published values run between 0.77 and 1.26 times xhr_neutral.
hr_above_expectedFloat64Home runs actually hit minus xhr_neutral, so it grades over- and under-performance against the park-neutral expectation rather than the park-adjusted one.
load_mlb_expected_hr(seasons=2024)

load_mlb_batter_projection​

Release: mlb_hitting_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_hitting_models/mlb_batter_projection_{season}.parquet

Returns​

col_nametypedescription
batterInt64MLBAM player id of the batter.
ageInt64Player age (in years).
proj_xwobaFloat64Projected expected weighted on-base average for the batter.
proj_paFloat64Combined prior-three-season pa behind the projection, its effective sample size; it inherits the pitch-row counting of load_mlb_expected_stats pa rather than true plate appearances.
load_mlb_batter_projection(seasons=2024)

load_mlb_oaa​

Release: mlb_fielding_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_fielding_models/mlb_oaa_{season}.parquet

Returns​

col_nametypedescription
fielder_idStringMLBAM identifier of the fielder charged with the ball in play, resolved from whichever fielder_N column matches the responsible position and published as a string rather than an integer.
positionInt64Listed roster position (G, F, C, etc.).
opportunitiesUInt32Balls in play charged to this fielder at this position, the sample the oaa sum runs over.
oaaFloat64Outs above average: outs the fielder actually recorded minus what a per-position catch-probability logistic expected from the same batted-ball trajectories, summed across their opportunities.
seasonInt64Season year.
load_mlb_oaa(seasons=2024)

load_mlb_catcher_framing​

Release: mlb_fielding_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_fielding_models/mlb_catcher_framing_{season}.parquet

Returns​

col_nametypedescription
catcher_idStringMLBAM identifier of the receiving catcher, taken from Savant's fielder_2 and published as a string rather than an integer.
takesUInt32Called strikes plus balls the catcher received across the season, a pure workload count; the framing figures themselves sum only over the shadow-zone subset of these.
framing_runsFloat64Runs saved by receiving, summing actual called strike minus modeled strike probability times that count's strike run value over shadow-zone takes only.
strikes_gainedFloat64The same shadow-zone sum of actual called strike minus modeled strike probability left unweighted by run value, so it measures stolen strikes rather than runs.
seasonInt64Season year.
load_mlb_catcher_framing(seasons=2024)

load_mlb_xera​

Release: mlb_pitching_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_pitching_models/mlb_xera_{season}.parquet

Returns​

col_nametypedescription
pitcherInt64MLBAM player id of the pitcher.
seasonInt64Season year.
x_wobaFloat64Expected weighted on-base average, derived from batted-ball quality rather than outcomes.
x_eraFloat64ERA-scale conversion of x_woba as league_era plus (x_woba minus league_woba) over woba_scale times pa_per_9, an exact linear function of x_woba that can go negative for extreme pitchers.
load_mlb_xera(seasons=2024)

load_mlb_stuff_plus​

Release: mlb_pitching_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_pitching_models/mlb_stuff_plus_{season}.parquet

Returns​

col_nametypedescription
pitcherInt64MLBAM player id of the pitcher.
pitch_typeStringAbbreviation of the pitch type thrown (e.g. FF, SL, CH).
stuff_rv_hatFloat64Mean predicted per-pitch run value from the bundled xgboost stuff model over this pitcher's pitches of this type, on Savant's batter-perspective delta_run_exp scale so lower is better for the pitcher.
stuff_plusFloat64Stuff+ on the 100-is-average scale, exactly 100 minus 10 times (stuff_rv_hat minus the league mean) over the league SD, so higher is better and outlier run-value predictions can push it well below zero.
seasonInt64Season year.
load_mlb_stuff_plus(seasons=2024)

load_mlb_command_plus​

Release: mlb_pitching_models · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_pitching_models/mlb_command_plus_{season}.parquet

Returns​

col_nametypedescription
pitcherInt64MLBAM player id of the pitcher.
location_rv_hatFloat64Mean predicted per-pitch run value from the bundled location model, which sees plate location, count, handedness and pitch type but no raw pitch physics; lower is better for the pitcher.
command_plusFloat64Command+/Location+ on the 100-is-average scale, exactly 100 minus 10 times (location_rv_hat minus the league mean) over the league SD; it grades where the pitch finished, not intent, since Statcast ships no catcher target.
seasonInt64Season year.
load_mlb_command_plus(seasons=2024)

load_mlb_groups​

Release: mlb_groups · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_groups/mlb_groups.parquet

Coverage

One season-less file: one row per group lineage (the league, subdivisions, conferences, divisions) with the first and last season it had members. group_id is SDV's own id (e.g. mlb:al-east) and names a lineage: a rename that keeps continuity keeps the id, a new body gets a new one, and notes records each call. Seasons are the calendar year.

Returns​

col_nametypedescription
leagueStringLeague code of the table ("mlb"); the prefix of every group_id in it.
group_idStringSDV group id, {league}:{slug}. It names a lineage: renames that keep continuity keep the id, and a new body (a new conference, or a merger the sources treat as new) gets a new one.
levelStringHierarchy level of the group: "league", "subdivision", "conference" or "division".
first_seasonInt32First season in which the group had at least one member (calendar year).
last_seasonInt32Last season in which the group had at least one member (calendar year).
notesStringBuilder notes on the group: the lineage decisions behind its group_id and any source caveats.
load_mlb_groups()

load_mlb_group_seasons​

Release: mlb_groups · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_groups/mlb_group_seasons.parquet

Coverage

One season-less file: one row per group per season it existed, with its name, short name, abbreviation and parent group AS OF that season (never today's label applied to the past) and its member count. season is the calendar year.

Returns​

col_nametypedescription
leagueStringLeague code of the table ("mlb"); the prefix of every group_id in it.
group_idStringSDV group id, {league}:{slug}. It names a lineage: renames that keep continuity keep the id, and a new body (a new conference, or a merger the sources treat as new) gets a new one.
seasonInt32Season the row describes (calendar year).
levelStringHierarchy level of the group: "league", "subdivision", "conference" or "division".
nameStringFull name of the group as of that season -- the label in use then, not today's name.
short_nameStringShort display name of the group as of that season.
abbreviationStringAbbreviation of the group as of that season.
parent_group_idStringgroup_id one level up as of that season (division -> conference -> subdivision -> league); null at the top level or where no higher group applied that season.
n_teamsInt32Number of member teams in the group that season.
load_mlb_group_seasons()

load_mlb_group_aliases​

Release: mlb_groups · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_groups/mlb_group_aliases.parquet

Coverage

One season-less file: every name, abbreviation, slug and source id that a source (espn, mlb) uses for a group, each with the seasons it is valid for (valid_from / valid_to, inclusive; null = unbounded). Match a source's conference or division label here to reach group_id.

Returns​

col_nametypedescription
leagueStringLeague code of the table ("mlb"); the prefix of every group_id in it.
group_idStringSDV group id, {league}:{slug}. It names a lineage: renames that keep continuity keep the id, and a new body (a new conference, or a merger the sources treat as new) gets a new one.
sourceStringSource that uses this label or id (in this table: espn, mlb); "sdv" marks SDV's own labels.
source_idStringThe source's own id for the group (ESPN group id, NCAA conf_id, CFBD id, MLB division id) when it has one; null otherwise.
name_kindStringKind of label in value: "name", "short_name", "abbreviation", "slug" or "code".
valueStringThe label exactly as the source writes it; match a source's conference or division label against it to reach group_id.
valid_fromInt32First season the alias is valid for, inclusive (calendar year); null = unbounded.
valid_toInt32Last season the alias is valid for, inclusive (calendar year); null = unbounded (still in use).
load_mlb_group_aliases()

load_mlb_team_group_seasons​

Release: mlb_groups · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_groups/mlb_team_group_seasons_{season}.parquet

Coverage

One row per team per season: the SDV subdivision, conference and division group ids the team belonged to that season (null where a level does not apply), the team name as of that season, where the membership came from, and whether a second source agreed (null when only one source covers the season). team_id is a string: the ESPN team id where ESPN covers the team, otherwise the MLB Stats API id; team_id_source names the id space. season is the calendar year; seasons 1901-2026.

Returns​

col_nametypedescription
leagueStringLeague code of the table ("mlb"); the prefix of every group_id in it.
seasonInt32Season of the membership (calendar year).
team_idStringTeam id as a string: the ESPN team id where ESPN covers the team, otherwise the league's own id; team_id_source says which.
team_id_sourceStringId space of team_id (in this table: espn, mlb).
team_nameStringTeam name as of that season, not today's.
subdivision_idStringSDV group_id of the team's subdivision that season (e.g. FBS / FCS, Division I); null where the league has no subdivision level.
conference_idStringSDV group_id of the team's conference that season; null where the team had no conference (an independent, or a season played without conferences).
division_idStringSDV group_id of the team's division that season; null where the level does not apply.
sourceStringSource the membership was taken from -- the most reliable per-season source for that era.
sources_agreeBooleanWhether a second source agreed on the membership; null when only one source covers the season.
notesStringBuilder notes on the team-season, such as a source disagreement or which of several listed memberships was kept.
load_mlb_team_group_seasons(seasons=2024)

load_mlb_park_dimensions​

Release: mlb_parks · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/mlb_parks/mlb_park_dimensions.parquet

Coverage

One season-less file, seasons 2001 on: one row per MLB venue per season (regular-season, spring-training, neutral and international sites) from the MLB Stats API venues endpoint, with fence distances in feet at MLB's seven markers, capacity, turf, roof, azimuth, elevation and coordinates as of that season. venue_id is a string (the MLB Stats API venue id, venue.id in game feeds); venue_name is the name in use that season. The API lags or misses some fence moves: cited corrections (Camden Yards, Petco Park, T-Mobile Park, Comerica Park, 2022 Rate Field and Progressive Field) are applied and described in notes, which is null on uncorrected rows.

Returns​

col_nametypedescription
leagueStringLeague code of the table ("mlb").
seasonInt32Season the row describes (calendar year, 2001 on).
venue_idStringMLB Stats API venue id (venue.id in MLB game feeds and schedules), published as a string.
venue_nameStringVenue name as of that season (e.g. PacBell Park 2001-03, SBC Park 2004-05, AT&T Park 2006-18, Oracle Park 2019-), not today's name.
retro_park_idStringRetrosheet park id (e.g. "BOS07") from the MLB Stats API's cross-reference; null for most spring-training and minor-league parks.
left_line_ftInt32Distance in feet from home plate to the fence at the left-field foul pole.
left_ftInt32Distance in feet from home plate to the fence at MLB's left-field marker.
left_center_ftInt32Distance in feet from home plate to the fence at MLB's left-centre marker; a park may re-label which point this is (Oracle Park's reads 364 through 2019, then the 399 ft deep left-centre).
center_ftInt32Distance in feet from home plate to the fence in straightaway centre field.
right_center_ftInt32Distance in feet from home plate to the fence at MLB's right-centre marker.
right_ftInt32Distance in feet from home plate to the fence at MLB's right-field marker.
right_line_ftInt32Distance in feet from home plate to the fence at the right-field foul pole.
capacityInt32Seating capacity that season.
turf_typeStringPlaying surface: "Grass" or "Artificial Turf".
roof_typeStringRoof: "Open", "Retractable" or "Dome".
azimuth_degFloat64MLB's azimuthAngle: degrees clockwise from north of the line from home plate to centre field (Fenway Park 45, Progressive Field 0).
elevation_ftInt32Elevation of the venue in feet above sea level.
latitudeFloat64Latitude of the venue in decimal degrees.
longitudeFloat64Longitude of the venue in decimal degrees.
notesStringNull unless a curated correction applies to the row; then which columns changed, from what to what, why, and the citation.
load_mlb_park_dimensions()