| Title: | Acquiring and Analyzing Baseball Data |
|---|---|
| Description: | Provides numerous utilities for acquiring and analyzing baseball data from online sources such as 'Baseball Reference' <https://www.baseball-reference.com/>, 'FanGraphs' <https://www.fangraphs.com/>, and the 'MLB Stats' API <https://www.mlb.com/>. |
| Authors: | Bill Petti [aut], Saiem Gilani [aut, cre] (ORCID: <https://orcid.org/0000-0002-7194-9067>), Ben Baumer [ctb], Ben Dilday [ctb], Robert Frey [ctb], Camden Kay [ctb] |
| Maintainer: | Saiem Gilani <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 2.0.0 |
| Built: | 2026-06-08 05:30:47 UTC |
| Source: | https://github.com/billpetti/baseballr |
(legacy) Scrape Batter Game Logs from FanGraphs
batter_game_logs_fg(playerid, year)batter_game_logs_fg(playerid, year)
playerid |
This is the playerid used by FanGraphs for a given player |
year |
The season for which game logs should be returned (use the YYYY format) |
A data frame of batter game logs.
bref_daily_batter(): Scrape Batter Performance Data Over a Custom Time Frame
bref_daily_pitcher(): Scrape Pitcher Performance Data Over a Custom Time Frame
bref_standings_on_date(): Scrape MLB Standings on a Given Date
bref_team_results(): Scrape Team Results
bref_daily_batter("2015-05-10", "2015-06-20")
bref_daily_batter("2015-05-10", "2015-06-20")
bref_standings_on_date(date = "2015-08-04", division = "AL East")
bref_team_results("NYM", 2015)
bref_team_results(Tm="TBR", year=2008)
Uses bref_team_results() to calculate team consistency metrics
team_consistency(year=2015)
This function allows you to scrape basic batter statistics over a custom time frame. Data is sourced from Baseball-Reference.com.
bref_daily_batter(t1, t2)bref_daily_batter(t1, t2)
t1 |
First date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
t2 |
Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
Returns a tibble of batter performance over the requested date range, one row per player, with the following columns:
| col_name | types | description |
| bbref_id | character | Baseball-Reference player id (slug). |
| season | integer | Season year. |
| Name | character | Player name. |
| Age | numeric | Player age during the season. |
| Level | character | League level (e.g. Maj-AL, Maj-NL). |
| Team | character | Team name. |
| G | numeric | Games played. |
| PA | numeric | Plate appearances. |
| AB | numeric | At-bats. |
| R | numeric | Runs scored. |
| H | numeric | Hits. |
| X1B | numeric | Singles. |
| X2B | numeric | Doubles. |
| X3B | numeric | Triples. |
| HR | numeric | Home runs. |
| RBI | numeric | Runs batted in. |
| BB | numeric | Walks (bases on balls). |
| IBB | numeric | Intentional walks. |
| uBB | numeric | Unintentional walks. |
| SO | numeric | Strikeouts. |
| HBP | numeric | Times hit by pitch. |
| SH | numeric | Sacrifice hits (bunts). |
| SF | numeric | Sacrifice flies. |
| GDP | numeric | Grounded into double plays. |
| SB | numeric | Stolen bases. |
| CS | numeric | Times caught stealing. |
| BA | numeric | Batting average. |
| OBP | numeric | On-base percentage. |
| SLG | numeric | Slugging percentage. |
| OPS | numeric | On-base plus slugging. |
try(bref_daily_batter(t1="2015-05-10", t2="2015-06-20"))try(bref_daily_batter(t1="2015-05-10", t2="2015-06-20"))
This function allows you to scrape basic pitcher statistics over a custom time frame. Data is sourced from Baseball-Reference.com.
bref_daily_pitcher(t1, t2)bref_daily_pitcher(t1, t2)
t1 |
First date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
t2 |
Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
Returns a tibble of pitcher performance over the requested date range, one row per player, with the following columns:
| col_name | types | description |
| bbref_id | character | Baseball-Reference player id (slug). |
| season | integer | Season year. |
| Name | character | Player name. |
| Age | numeric | Player age during the season. |
| Level | character | League level (e.g. Maj-AL, Maj-NL). |
| Team | character | Team name. |
| G | numeric | Games pitched. |
| GS | numeric | Games started. |
| W | numeric | Wins. |
| L | numeric | Losses. |
| SV | numeric | Saves. |
| IP | numeric | Innings pitched. |
| H | numeric | Hits allowed. |
| R | numeric | Runs allowed. |
| ER | numeric | Earned runs allowed. |
| uBB | numeric | Unintentional walks allowed. |
| BB | numeric | Walks allowed. |
| SO | numeric | Strikeouts. |
| HR | numeric | Home runs allowed. |
| HBP | numeric | Batters hit by pitch. |
| ERA | numeric | Earned run average (per 9 innings). |
| AB | numeric | At-bats against. |
| X1B | numeric | Singles allowed. |
| X2B | numeric | Doubles allowed. |
| X3B | numeric | Triples allowed. |
| IBB | numeric | Intentional walks allowed. |
| GDP | numeric | Double plays induced. |
| SF | numeric | Sacrifice flies allowed. |
| SB | numeric | Stolen bases allowed. |
| CS | numeric | Runners caught stealing. |
| PO | numeric | Pickoffs. |
| BF | numeric | Batters faced. |
| Pit | numeric | Total pitches thrown. |
| Str | numeric | Strikes thrown (as a share of pitches). |
| StL | numeric | Looking (called) strikes share. |
| StS | numeric | Swinging strikes share. |
| GB.FB | numeric | Ground ball to fly ball share. |
| LD | numeric | Line drive share. |
| PU | numeric | Pop-up (infield fly) share. |
| WHIP | numeric | Walks plus hits per inning pitched. |
| BAbip | numeric | Batting average on balls in play allowed. |
| SO9 | numeric | Strikeouts per 9 innings. |
| SO.W | numeric | Strikeout-to-walk ratio. |
| SO_perc | numeric | Strikeout rate (per batter faced). |
| uBB_perc | numeric | Unintentional walk rate (per batter faced). |
| SO_uBB | numeric | Strikeouts minus unintentional walks. |
try(bref_daily_pitcher("2015-05-10", "2015-06-20"))try(bref_daily_pitcher("2015-05-10", "2015-06-20"))
This function allows you to scrape the standings from MLB for any date you choose.
bref_standings_on_date(date, division, from = FALSE)bref_standings_on_date(date, division, from = FALSE)
date |
a date object |
division |
One or more of AL East, AL Central, AL West, AL Overall, NL East, NL Central, NL West, and NL Overall |
from |
a logical indicating whether you want standings up to and including the date (FALSE, default) or rather standings for games played after the date |
Returns a tibble of MLB standings, one row per team in the requested division, with the following columns:
| col_name | types | description |
| Tm | character | Team abbreviation. |
| W | integer | Wins as of the requested date. |
| L | integer | Losses as of the requested date. |
| W-L% | numeric | Winning percentage. |
| GB | character | Games behind the division leader (-- for the leader). |
| RS | integer | Runs scored. |
| RA | integer | Runs allowed. |
| pythW-L% | numeric | Pythagorean (expected) winning percentage from RS/RA. |
try(bref_standings_on_date(date = "2015-08-04", division = "AL East"))try(bref_standings_on_date(date = "2015-08-04", division = "AL East"))
This function allows you to scrape schedule and results for a major league team from Baseball-Reference.com
bref_team_results(Tm, year)bref_team_results(Tm, year)
Tm |
The abbreviation used by Baseball-Reference.com for the team whose results you want to scrape. |
year |
Season for which you want to scrape the park factors. |
Returns a tibble of MLB team results, one row per game on the team's schedule, with the following columns:
| col_name | types | description |
| Gm | character | Game number / label in the schedule (includes postseason labels). |
| Date | character | Day-of-week and calendar date of the game. |
| Tm | character | Team abbreviation. |
| H_A | character | Home/away indicator (A denotes a road game). |
| Opp | character | Opponent team abbreviation. |
| Result | character | Game outcome from the team's perspective (W/L). |
| R | integer | Runs scored by the team. |
| RA | integer | Runs allowed (opponent runs). |
| Inn | integer | Innings played when not nine (e.g. extra innings). |
| Record | character | Team's cumulative win-loss record after the game. |
| Rank | character | Team's standing/rank in its division after the game. |
| GB | character | Games behind the division leader after the game. |
| Win | character | Winning pitcher. |
| Loss | character | Losing pitcher. |
| Save | character | Pitcher credited with the save (N if none). |
| Time | character | Duration of the game. |
| D/N | character | Day (D) or night (N) game. |
| Attendance | numeric | Announced attendance. |
| cLI | numeric | Championship leverage index of the game. |
| Streak | character | Win/loss streak entering the game. |
| Orig_Scheduled | character | Original scheduled date (for rescheduled games). |
| Year | numeric | Season year. |
try(bref_team_results("NYM", 2015)) try(bref_team_results(Tm="TBR", year=2008))try(bref_team_results("NYM", 2015)) try(bref_team_results(Tm="TBR", year=2008))
chadwick_player_lu(): Directly download the Chadwick Bureau's public register of baseball players and the various IDs associated with them in different systems of record.
playername_lookup(): Look up Baseball Player Name.
playerid_lookup(): Look up Baseball Player IDs.
chadwick_player_lu()
playername_lookup(4885)
playername_lookup("kaaihki01")
playerid_lookup("Garcia", "Karim")
Utility functions to help ensure that Chadwick is set up correctly.
The easiest way for the Chadwick CLI
tools to work on *nix systems is to
set the LD_LIBRARY_PATH environment variable. Unfortunately this environment
variable is not set by default during the Chadwick installation.
chadwick_ld_library_path() checks to find the Chadwick shared libraries, and then
set the LD_LIBRARY_PATH environment variable.
If chadwick_ld_library_path() returns TRUE, the cwevent command line program
that retrosheet_data()
depends on should work.
The other functions documented here are mostly for internal use.
chadwick_path() chadwick_is_installed() chadwick_find_lib() chadwick_set_ld_library_path() chadwick_ld_library_path()chadwick_path() chadwick_is_installed() chadwick_find_lib() chadwick_set_ld_library_path() chadwick_ld_library_path()
If Chadwick is not installed NULL. If Chadwick is installed, the path to the cwevent binary.
TRUE or FALSE
Path to the Chadwick shared library.
chadwick_path() chadwick_is_installed() chadwick_find_lib() ## Not run: if (chadwick_ld_library_path()) { retrosheet_data(tempdir()) } ## End(Not run)chadwick_path() chadwick_is_installed() chadwick_find_lib() ## Not run: if (chadwick_ld_library_path()) { retrosheet_data(tempdir()) } ## End(Not run)
Download the Chadwick Bureau's public register of baseball players
chadwick_player_lu() get_chadwick_lu()chadwick_player_lu() get_chadwick_lu()
A data frame of baseball players and the various IDs associated with them in different systems of record and the following columns:
| col_name | types | description |
| key_person | character | Chadwick Bureau primary person key. |
| key_uuid | character | Chadwick Bureau universally unique identifier for the person. |
| key_mlbam | integer | MLB Advanced Media (MLBAM) player ID. |
| key_retro | character | Retrosheet player ID. |
| key_bbref | character | Baseball-Reference major league player ID. |
| key_bbref_minors | character | Baseball-Reference minor league player ID. |
| key_fangraphs | integer | FanGraphs player ID. |
| key_npb | integer | Nippon Professional Baseball (Japan) player ID. |
| key_sr_nfl | character | Sports Reference NFL player ID. |
| key_sr_nba | character | Sports Reference NBA player ID. |
| key_sr_nhl | character | Sports Reference NHL player ID. |
| key_wikidata | character | Wikidata entity ID for the person. |
| name_last | character | Player last name. |
| name_first | character | Player first name. |
| name_given | character | Player full given (legal) name. |
| name_suffix | character | Name suffix (e.g. Jr., Sr., III). |
| name_matrilineal | character | Maternal surname, where recorded. |
| name_nick | character | Player nickname. |
| birth_year | integer | Year of birth. |
| birth_month | integer | Month of birth. |
| birth_day | integer | Day of birth. |
| death_year | integer | Year of death. |
| death_month | integer | Month of death. |
| death_day | integer | Day of death. |
| pro_played_first | integer | First season the person played professional baseball. |
| pro_played_last | integer | Last season the person played professional baseball. |
| mlb_played_first | integer | First MLB season as a player. |
| mlb_played_last | integer | Last MLB season as a player. |
| col_played_first | integer | First college season as a player. |
| col_played_last | integer | Last college season as a player. |
| pro_managed_first | integer | First professional season as a manager. |
| pro_managed_last | integer | Last professional season as a manager. |
| mlb_managed_first | integer | First MLB season as a manager. |
| mlb_managed_last | integer | Last MLB season as a manager. |
| col_managed_first | integer | First college season as a manager. |
| col_managed_last | integer | Last college season as a manager. |
| pro_umpired_first | integer | First professional season as an umpire. |
| pro_umpired_last | integer | Last professional season as an umpire. |
| mlb_umpired_first | integer | First MLB season as an umpire. |
| mlb_umpired_last | integer | Last MLB season as an umpire. |
A data frame of baseball players and the various IDs associated with them in different systems of record.
try(chadwick_player_lu())try(chadwick_player_lu())
This function allows you to code a batted ball as a barrel as defined by the Statcast research team using data as provided by baseballsavant.mlb.com.
code_barrel(df)code_barrel(df)
df |
A dataframe generated by baseballsavant.mlb.com that must include the following variables: |
Returns a tibble with the additional column, barrel.
A tibble giving column structure of MLB Draft data
column_structure_draft_mlbcolumn_structure_draft_mlb
An object of class tbl_df (inherits from tbl, data.frame) with 0 rows and 72 columns.
(legacy) Scrape Batter Performance Data Over a Custom Time Frame
daily_batter_bref(t1, t2)daily_batter_bref(t1, t2)
t1 |
First date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
t2 |
Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
Returns a tibble of batter performance
bref_daily_batter()
(legacy) Scrape Pitcher Performance Data Over a Custom Time Frame
daily_pitcher_bref(t1, t2)daily_pitcher_bref(t1, t2)
t1 |
First date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
t2 |
Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
Returns a tibble of pitcher performance
bref_daily_pitcher()
This function allows you to classify individual pitches based on the various categories from the Edge% metric. The dataframe passed to the function must include the batter's handedness, the px and pz coordinates from the PITCHf/x system, and the batter's height.
edge_code(df, height_var_name = "b_height")edge_code(df, height_var_name = "b_height")
df |
A dataframe that, at a minimum, includes the following columns: batter height (b_height), the batter's handedness (stand), vertical location of the pitch (pz), and then horizontal location of the pitch (pz) |
height_var_name |
The name of the variable in the data set that includes the batter's height. Defaults to b_height which assumes an height + inch format. If the variable name is "Height" it assumes the variable is already converted to inches (as is the case in some databases) |
Returns a tibble with the additional edge columns necessary for calculations.
This function allows you to calculate the percent of pitches thrown to different edges of the strike zone for a pitch by pitch data set that has been coded using the edge_code() function.
edge_frequency(df, group = NULL)edge_frequency(df, group = NULL)
df |
A data frame of pitch by pitch data that has been coded using the |
group |
Character string indicating what column to group the frequency by. For example, "pitcher" or "batter". Defaults to NULL, which calculates the frequencies across the entire data set. |
Returns a tibble with the additional edge columns necessary for frequency calculations.
Wrappers around ESPN's Major League Baseball endpoints (espn_mlb_*()).
They cover ESPN's three public hosts:
site.api.espn.com – scoreboard, schedule, game summary (play-by-play,
team / player box scores), teams, rosters.
sports.core.api.espn.com – reference data: athletes, coaches, seasons,
franchises, draft, futures, leaders, standings, events, plays, and
per-competitor game detail.
site.web.api.espn.com – athlete overviews, game logs, splits, and
league-wide statistics.
These complement the MLB Stats API wrappers (mlb_*()), FanGraphs (fg_*()),
Baseball Reference (bref_*()), and Baseball Savant / Statcast
(statcast_*()) families. The espn_mlb_*() naming mirrors the sister
SportsDataverse packages – hoopR (espn_nba_* / espn_mbb_*), wehoop
(espn_wnba_* / espn_wbb_*), and cfbfastR (espn_cfb_*).
espn_mlb_pbp() – play-by-play (pitch- and at-bat-level).
espn_mlb_scoreboard() – scores / schedule for a date (YYYYMMDD).
espn_mlb_team_box() – team batting / pitching / fielding box score.
espn_mlb_player_box() – player batting / pitching box score.
espn_mlb_game_all() – all three (plays, team box, player box) in one call.
espn_mlb_game_rosters() – the two game-day rosters.
espn_mlb_teams(), espn_mlb_team_roster(), espn_mlb_standings().
espn_mlb_team_stats(), espn_mlb_player_stats(), espn_mlb_leaders().
espn_mlb_athletes_index(), espn_mlb_player_info(), espn_mlb_draft().
ESPN wrappers call .retry_request() directly without ..., so per-call
proxy overrides are not supported. Route requests through
options(baseballr.proxy = ...) or the http_proxy / https_proxy
environment variables instead.
Other ESPN MLB Functions:
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
Get ESPN MLB Athletes Index
Get ESPN MLB Athletes Index
espn_mlb_athletes_index( season = most_recent_mlb_season(), active = TRUE, limit = 5000L, ... )espn_mlb_athletes_index( season = most_recent_mlb_season(), active = TRUE, limit = 5000L, ... )
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
active |
logical. When |
limit |
integer. Maximum number of rows to return. Default 5000.
Pass a small value (e.g. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A single baseballr_data tibble with one row per athlete.
| col_name | types | description |
| athlete_id | character | Unique athlete identifier (ESPN). |
| full_name | character | Player's full name. |
| jersey | character | Jersey number worn by the player. |
| position | character | Listed roster position (G, F, C, etc.). |
| team_id | character | Unique team identifier. |
| headshot | character | Headshot image URL. |
| status | character | Status label. |
| link | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_athletes_index(season = 2025, limit = 50)espn_mlb_athletes_index(season = 2025, limit = 50)
Returns the name, description, and winners of one MLB season award. Most awards have a single winner; multi-recipient awards (e.g. All-MLB First Team) return one row per winner.
espn_mlb_award(award_id, season = most_recent_mlb_season(), ...)espn_mlb_award(award_id, season = most_recent_mlb_season(), ...)
award_id |
ESPN award identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A tibble with one row per winner.
| col_name | types | description |
| league | character | League slug ("mlb"). |
| season | integer | Season year. |
| award_id | character | ESPN award identifier. |
| name | character | Award name (e.g. "MVP"). |
| description | character | Award description. |
| athlete_id | character | ESPN athlete id of winner (parsed from athlete_ref). |
| team_id | character | ESPN team id (parsed from team_ref). |
| athlete_ref | character | $ref to winner's per-season athlete resource. |
| team_ref | character | $ref to winner's per-season team resource.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# MVP award id = 33 espn_mlb_award(award_id = 33, season = 2024)# MVP award id = 33 espn_mlb_award(award_id = 33, season = 2024)
Get ESPN MLB's Betting information
espn_mlb_betting(game_id)espn_mlb_betting(game_id)
game_id |
Game ID |
Returns a named list of data frames: pickcenter, againstTheSpread, predictor
pickcenter
| col_name | types | description |
| details | character | Details. |
| over_under | numeric | Over under. |
| spread | numeric | Spread. |
| provider_id | integer | Unique identifier for provider. |
| provider_name | character | Provider name. |
| provider_priority | integer | Provider priority. |
| away_team_odds_favorite | logical | Away team's team odds favorite. |
| away_team_odds_underdog | logical | Away team's team odds underdog. |
| away_team_odds_money_line | integer | Away team's team odds money line. |
| away_team_odds_spread_odds | numeric | Away team's team odds spread odds. |
| away_team_odds_team_id | integer | Unique identifier for away team odds team. |
| away_team_odds_win_percentage | numeric | Away team odds win percentage (0-1 decimal). |
| away_team_odds_average_score | numeric | Away team's team odds average score. |
| away_team_odds_money_line_odds | numeric | Away team's team odds money line odds. |
| away_team_odds_spread_return | numeric | Away team's team odds spread return. |
| away_team_odds_spread_record_wins | integer | Away team's team odds spread record wins. |
| away_team_odds_spread_record_losses | integer | Away team's team odds spread record losses. |
| away_team_odds_spread_record_pushes | integer | Away team's team odds spread record pushes. |
| away_team_odds_spread_record_summary | character | Away team's team odds spread record summary. |
| home_team_odds_favorite | logical | Home team's team odds favorite. |
| home_team_odds_underdog | logical | Home team's team odds underdog. |
| home_team_odds_money_line | integer | Home team's team odds money line. |
| home_team_odds_spread_odds | numeric | Home team's team odds spread odds. |
| home_team_odds_team_id | integer | Unique identifier for home team odds team. |
| home_team_odds_win_percentage | numeric | Home team odds win percentage (0-1 decimal). |
| home_team_odds_average_score | numeric | Home team's team odds average score. |
| home_team_odds_money_line_odds | numeric | Home team's team odds money line odds. |
| home_team_odds_spread_return | numeric | Home team's team odds spread return. |
| home_team_odds_spread_record_wins | integer | Home team's team odds spread record wins. |
| home_team_odds_spread_record_losses | integer | Home team's team odds spread record losses. |
| home_team_odds_spread_record_pushes | integer | Home team's team odds spread record pushes. |
| home_team_odds_spread_record_summary | character | Home team's team odds spread record summary. |
| game_id | integer | Unique game identifier. |
againstTheSpread
| col_name | types | description |
| id | integer | Id. |
| uid | character | ESPN UID string (universal identifier). |
| display_name | character | Display name. |
| abbreviation | character | Short abbreviation. |
| logo | character | Team or league logo URL. |
| logos | list | Logos. |
| records | list | Records. |
| game_id | integer | Unique game identifier. |
| team_id | integer | Unique team identifier. |
predictor
| col_name | types | description |
| game_id | integer | Unique game identifier. |
| home_team_id | integer | Unique identifier for the home team. |
| away_team_id | integer | Unique identifier for the away team. |
| away_team_game_projection | numeric | Away team's team game projection. |
| away_team_chance_loss | numeric | Away team's team chance loss. |
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_betting(game_id = 401283399))try(espn_mlb_betting(game_id = 401283399))
Get ESPN MLB Calendar
Get ESPN MLB Calendar
espn_mlb_calendar(season = most_recent_mlb_season())espn_mlb_calendar(season = most_recent_mlb_season())
season |
integer or character. Four-digit season year (e.g. |
Retrieve the ESPN MLB schedule calendar for a given season. The underlying
scoreboard response contains a leagues[[1]]$calendar block with season-type
entries (pre-season, regular, post). Uses getOption("baseballr.proxy") or
http_proxy/https_proxy environment variables for proxy configuration
(per-call proxy override is not supported for ESPN wrappers).
Returns a tibble of calendar entries.
| col_name | types | description |
| season | character | Season identifier (4-digit year or 'YYYY-YY' string). |
| season_type | character | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN). |
| season_type_label | character | |
| season_start_date | character | Date in YYYY-MM-DD format. |
| season_end_date | character | Date in YYYY-MM-DD format. |
| label | character | |
| alternate_label | character | |
| detail | character | |
| value | character | Numeric or string value field. |
| start_date | character | Start date (YYYY-MM-DD). |
| end_date | character | End date (YYYY-MM-DD). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_calendar(season = 2025)espn_mlb_calendar(season = 2025)
Returns biography, current team / college refs, and counts of career
record entries + per-season coaching entries for one MLB coach. Backed
by sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/{coach_id}.
espn_mlb_coach(coach_id, ...)espn_mlb_coach(coach_id, ...)
coach_id |
ESPN coach identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| coach_id | character | ESPN coach identifier. |
| uid | character | ESPN UID string. |
| first_name | character | First name. |
| last_name | character | Last name. |
| date_of_birth | character | Date of birth (ISO 8601). |
| birth_city | character | Birth city. |
| birth_state | character | Birth state / region. |
| n_career_records | integer | Count of career-records entries. |
| n_coach_seasons | integer | Count of seasons coached. |
| college_ref | character | $ref to the coach's college. |
| team_ref | character | $ref to the coach's current team. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_coach(coach_id = 52120)espn_mlb_coach(coach_id = 52120)
Returns a coach's career record by type in long format (one row per
stat in the record's stats[] array). record_type codes commonly
populated: 0 = Total, 1 = Pre Season, 2 = Regular Season, 3 = Post
Season. Use espn_mlb_coaches() to discover coach_ids for a season.
espn_mlb_coach_record(coach_id, record_type = 0L, ...)espn_mlb_coach_record(coach_id, record_type = 0L, ...)
coach_id |
ESPN coach identifier (use |
record_type |
Integer record type: 0 = Total (default), 1 = Pre Season, 2 = Regular Season, 3 = Post Season. |
... |
Additional arguments; currently unused. |
A long tibble.
Note: ESPN's core-v2 coach feed is sparsely populated for MLB and this frequently returns an empty tibble. When populated, the columns are:
| col_name | types | description |
| coach_id | character | Unique ESPN coach identifier. |
| record_type | integer | Record type identifier. |
| name | character | Record name (e.g. 'overall'). |
| summary | character | Record summary (e.g. 'W-L'). |
| stat_name | character | Statistic name. |
| value | numeric | Statistic value. |
| display_value | character | Human-readable statistic value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_coach_record(coach_id = 52120, record_type = 2)espn_mlb_coach_record(coach_id = 52120, record_type = 2)
Per-season coach detail (name, birth info, $refs to team/college/
person). ESPN's coverage of this endpoint is sparse; many
(coach × season) combinations return 404.
espn_mlb_coach_season(coach_id, season = most_recent_mlb_season(), ...)espn_mlb_coach_season(coach_id, season = most_recent_mlb_season(), ...)
coach_id |
ESPN coach identifier. |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Coach-in-Season Detail
A single-row tibble.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| coach_id | character | ESPN coach id. |
| uid | character | ESPN UID string. |
| first_name | character | First name. |
| last_name | character | Last name. |
| date_of_birth | character | Date of birth. |
| birth_city | character | Birth city. |
| birth_state | character | Birth state / region. |
| n_records | integer | Count of records entries. |
| person_ref | character | $ref to person resource. |
| college_ref | character | $ref to college. |
| team_ref | character | $ref to team-in-season.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_coach_season(coach_id = 52120, season = 2025)espn_mlb_coach_season(coach_id = 52120, season = 2025)
Get ESPN MLB Coaches
Get ESPN MLB Coaches
espn_mlb_coaches(season = most_recent_mlb_season(), ...)espn_mlb_coaches(season = most_recent_mlb_season(), ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A single baseballr_data tibble with one row per coach.
| col_name | types | description |
| coach_id | character | |
| first_name | character | Player's first name. |
| last_name | character | Player's last name. |
| full_name | character | Player's full name. |
| experience | integer | Years of professional experience. |
| team_id | character | Unique team identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_coaches(season = 2025)espn_mlb_coaches(season = 2025)
Get ESPN MLB Conferences
Get ESPN MLB Conferences
espn_mlb_conferences()espn_mlb_conferences()
A baseballr_data tibble with one row per conference:
| col_name | types | description |
| group_id | integer | Group identifier (e.g. conference group_id). |
| conference_short_name | character | Conference short name (e.g. 'ACC'). |
| conference_uid | character | ESPN universal conference identifier. |
| conference_name | character | Full conference name. |
| conference_logo | character | Logo image URL for conference. |
| parent_group_id | integer | Unique identifier for parent group. |
| conference_id | integer | Conference identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_conferences())try(espn_mlb_conferences())
Get ESPN MLB Draft Picks
Get ESPN MLB Draft Picks
espn_mlb_draft(season = most_recent_mlb_season(), ...)espn_mlb_draft(season = most_recent_mlb_season(), ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
Calls the ESPN core-v2 endpoint
https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{year}/draft/rounds,
which returns each round of the draft with its picks inlined as picks: [...].
For historical seasons with no ESPN draft data the function returns an empty
tibble rather than erroring.
A baseballr_data tibble with one row per draft pick:
| col_name | types | description |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| round | integer | Tournament / playoff round. |
| pick | integer | |
| overall | integer | Overall. |
| traded | logical | |
| trade_note | character | |
| status | character | Status label. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_ref | character | |
| team_id | character | Unique team identifier. |
| team_ref | character |
Athlete and team details (name, position, college, abbreviation) are not
inlined in the draft response; resolve them via espn_mlb_player_info()
or espn_mlb_team() using the returned IDs.
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft(season = 2024)espn_mlb_draft(season = 2024)
Returns rich single-row detail for one drafted athlete in one MLB
draft year: name, height, weight, position, pick (overall/round/team),
and a $ref to the athlete's core-v2 profile. Use
espn_mlb_draft_athletes() to enumerate draftees for a year.
espn_mlb_draft_athlete_detail( season = most_recent_mlb_season(), athlete_id, ... )espn_mlb_draft_athlete_detail( season = most_recent_mlb_season(), athlete_id, ... )
season |
Draft year (numeric). Defaults to the most recent MLB season. |
athlete_id |
ESPN draftee identifier. |
... |
Additional arguments; currently unused. |
A single-row tibble.
Note: ESPN does not currently populate the MLB draft feed, so this typically returns an empty tibble. When populated, the columns are:
| col_name | types | description |
| season | integer | Draft season (4-digit year). |
| athlete_id | character | Unique ESPN athlete identifier. |
| athlete_full_name | character | Drafted player full name. |
| position | character | Player position abbreviation. |
| round | integer | Draft round number. |
| pick | integer | Pick number within the round. |
| overall | integer | Overall pick number. |
| team_id | character | Drafting team identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft_athlete_detail(season = 2024, athlete_id = 33192)espn_mlb_draft_athlete_detail(season = 2024, athlete_id = 33192)
Returns one row per drafted athlete in a given MLB draft year.
espn_mlb_draft_athletes(season = most_recent_mlb_season(), ...)espn_mlb_draft_athletes(season = most_recent_mlb_season(), ...)
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Draft Athletes Index
A tibble of athlete IDs + $ref URLs.
Note: ESPN does not currently populate the MLB draft-prospect feed, so this typically returns an empty tibble. When populated, the columns are:
| col_name | types | description |
| season | integer | Draft season (4-digit year). |
| round | integer | Draft round number. |
| pick | integer | Pick number within the round. |
| overall | integer | Overall pick number. |
| athlete_id | character | Unique ESPN athlete identifier. |
| athlete_full_name | character | Drafted player full name. |
| position | character | Player position abbreviation. |
| team_id | character | Drafting team identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft_athletes(season = 2024)espn_mlb_draft_athletes(season = 2024)
Returns a single MLB draft pick. Defaults to the most recent MLB
season's #1 overall pick. For a full draft, use espn_mlb_draft().
espn_mlb_draft_pick( season = most_recent_mlb_season(), round = 1L, pick = 1L, ... )espn_mlb_draft_pick( season = most_recent_mlb_season(), round = 1L, pick = 1L, ... )
season |
Season year. Defaults to most recent MLB season. |
round |
Draft round (default 1). |
pick |
Pick number within the round (default 1). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Draft Pick Detail
A single-row tibble.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year of the draft. |
| round | integer | Round number. |
| pick | integer | Pick within the round. |
| overall | integer | Overall pick number. |
| traded | logical | Whether the pick was traded. |
| trade_note | character | Trade note (if any). |
| status | character | Pick status name. |
| athlete_id | character | Drafted athlete's ESPN id. |
| team_id | character | Drafting team's ESPN id. |
| athlete_ref | character | $ref to athlete. |
| team_ref | character | $ref to team.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft_pick(season = 2024, round = 1, pick = 1)espn_mlb_draft_pick(season = 2024, round = 1, pick = 1)
Returns one row per round of the MLB draft (typically 2 rounds: 1st with 30 picks, 2nd with ~28 picks).
espn_mlb_draft_rounds(season = most_recent_mlb_season(), ...)espn_mlb_draft_rounds(season = most_recent_mlb_season(), ...)
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Draft Rounds Summary
A tibble with one row per round.
Note: ESPN does not currently populate the MLB draft feed, so this typically returns an empty tibble. When populated, the columns are:
| col_name | types | description |
| season | integer | Draft season (4-digit year). |
| round | integer | Draft round number. |
| display_name | character | Round display name. |
| number_of_picks | integer | Number of picks in the round. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft_rounds(season = 2024)espn_mlb_draft_rounds(season = 2024)
Returns the current status of one MLB draft year (round, state, description). Live during the draft; static afterward.
espn_mlb_draft_status(season = most_recent_mlb_season(), ...)espn_mlb_draft_status(season = most_recent_mlb_season(), ...)
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Draft Status
A single-row tibble.
| col_name | types | description |
| league | character | League. |
| season | integer | Season (4-digit year). |
| round | integer | Draft round. |
| type_id | character | Type id. |
| type_name | character | Type name. |
| type_state | character | Type state. |
| description | character | Description. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_draft_status(season = 2024)espn_mlb_draft_status(season = 2024)
Returns franchise-level metadata for an MLB franchise. Franchise IDs are stable across relocations and rebrands — useful for tracking franchise history independent of current team identity.
espn_mlb_franchise(franchise_id, ...)espn_mlb_franchise(franchise_id, ...)
franchise_id |
ESPN franchise identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| id | character | ESPN franchise identifier. |
| uid | character | ESPN UID string. |
| slug | character | URL-safe identifier. |
| location | character | Franchise location. |
| name | character | Franchise name. |
| nickname | character | Common nickname (often same as name). |
| abbreviation | character | Short abbreviation. |
| display_name | character | Full display name. |
| short_display_name | character | Short display name. |
| color | character | Primary color (hex, no leading '#'). |
| is_active | logical | Whether franchise is currently active. |
| league | character | League slug ("mlb"). |
| logo | character | Primary logo URL. |
| logo_dark | character | Dark-mode logo URL. |
| venue_ref | character | $ref to franchise's primary venue. |
| team_ref | character | $ref to the current team for franchise.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_franchise(franchise_id = 13)espn_mlb_franchise(franchise_id = 13)
Returns the full MLB franchises index from
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/franchises.
Each row is one franchise with its ID and the canonical $ref URL —
pass an ID to espn_mlb_franchise() for full franchise detail.
espn_mlb_franchises(...)espn_mlb_franchises(...)
... |
Additional arguments; currently unused. |
A tibble with one row per franchise.
| col_name | types | description |
| franchise_id | character | ESPN franchise identifier. |
| ref | character | Full $ref URL for franchise detail. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_franchises()espn_mlb_franchises()
Get ESPN MLB Free Agents
Get ESPN MLB Free Agents
espn_mlb_freeagents(season = most_recent_mlb_season(), ...)espn_mlb_freeagents(season = most_recent_mlb_season(), ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
Calls the ESPN core-v2 endpoint
https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{year}/freeagents.
As of 2026-05, this endpoint returns HTTP 500 for every season tested and
there is no documented replacement; the function consequently returns an
empty tibble and emits a CLI error message. It is retained so that downstream
code does not break if ESPN restores the endpoint, but should not be relied
on in the meantime.
A baseballr_data tibble with one row per free agent:
| col_name | types | description |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| position | character | Listed roster position (G, F, C, etc.). |
| prior_team_id | character | |
| status | character | Status label. |
| signed_team_id | character | |
| signed_date | character | |
| contract_value | character | |
| contract_term_years | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_freeagents(season = 2025)espn_mlb_freeagents(season = 2025)
Returns the full futures-betting board for an MLB season, in long
format: one row per (market x team). Markets include championship
winner, conference winner, division winner, MVP odds, etc. Backed by
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{season}/futures.
espn_mlb_futures(season = most_recent_mlb_season(), ...)espn_mlb_futures(season = most_recent_mlb_season(), ...)
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A long-format tibble.
| col_name | types | description |
| season | integer | Season year. |
| league | character | League slug ("mlb"). |
| market_id | character | ESPN futures-market identifier. |
| market_name | character | Internal market name (e.g. "MLB - Winner"). |
| market_type | character | Market type code (winLeague, winConference, winDivision, ...). |
| market_display | character | Human-readable name (e.g. "MLB Championship Winner"). |
| provider_id | character | Sportsbook provider identifier. |
| provider_name | character | Sportsbook provider name (e.g. "ESPN BET"). |
| team_id | character | ESPN team id (parsed from team_ref). |
| odds_value | character | American odds for the team (e.g. "-250", "+800"). |
| team_ref | character | $ref to the per-season team resource.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_futures(season = 2025)espn_mlb_futures(season = 2025)
Get ESPN MLB game data (Pbp, Team and Player Box)
espn_mlb_game_all(game_id)espn_mlb_game_all(game_id)
game_id |
Game ID |
A named list of data frames: Plays, Team, Player
espn_mlb_game_all() bundles three tibbles returned in one call. Each
component is identical to the matching standalone function – see those
for the full column documentation:
Plays – play-by-play, identical to espn_mlb_pbp().
Team – team box score, identical to espn_mlb_team_box().
Player – player box score, identical to espn_mlb_player_box().
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_game_all(game_id = 401283399))try(espn_mlb_game_all(game_id = 401283399))
Get ESPN MLB Event Broadcasts
Get ESPN MLB Event Broadcasts
espn_mlb_game_broadcasts(event_id, ...)espn_mlb_game_broadcasts(event_id, ...)
event_id |
ESPN event/game identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A tibble with one row per broadcast outlet for the game.
| col_name | types | description |
| event_id | character | Unique event / game identifier (ESPN). |
| broadcast_id | character | |
| type_id | character | Type identifier (numeric). |
| type_short_name | character | |
| type_long_name | character | |
| market_id | character | |
| market_type | character | |
| names | character | |
| lang | character | |
| region | character | Region label. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_broadcasts(event_id = "401283399")espn_mlb_game_broadcasts(event_id = "401283399")
espn_mlb_scoreboard(): Scores and schedule for a date (YYYYMMDD).
espn_mlb_pbp(): Pitch- and at-bat-level play-by-play for a game.
espn_mlb_team_box(): Team batting / pitching / fielding box score (one wide row per team).
espn_mlb_player_box(): Player batting / pitching box score (one row per athlete-side).
espn_mlb_game_all(): Plays, team box, and player box bundled in one call.
espn_mlb_game_rosters(): The two game-day rosters.
espn_mlb_game_probables(): Probable / announced starting pitchers.
espn_mlb_game_info(): Venue, attendance, game duration, and the umpire crew.
espn_mlb_betting(), espn_mlb_game_odds(), espn_mlb_game_propbets(): Odds and prop bets.
espn_mlb_wp(), espn_mlb_game_probabilities(): Win-probability series.
espn_mlb_game_situation(), espn_mlb_game_play(), espn_mlb_game_play_personnel(): Per-play detail.
espn_mlb_game_team_statistics(), espn_mlb_game_team_linescores(), espn_mlb_game_team_leaders(),
espn_mlb_game_team_records(), espn_mlb_game_team_roster(), espn_mlb_game_team_score(): Per-competitor game detail.
espn_mlb_game_officials(), espn_mlb_game_official_detail(), espn_mlb_game_broadcasts(): Officials and broadcasts.
Game-level ESPN endpoints: scoreboard / schedule, the game-summary feed (play-by-play and box scores), rosters, win probability, odds, and per-competitor game detail. Box scores are returned wide and tidy.
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
Returns one wide row of game metadata from the ESPN game-summary gameInfo
block: venue, attendance, game duration, and the umpire crew (home-plate,
first-, second-, and third-base umpires).
espn_mlb_game_info(game_id)espn_mlb_game_info(game_id)
game_id |
Game ID – ESPN event identifier (character or numeric). |
A single-row baseballr_data tibble.
| col_name | types | description |
| game_id | integer | Unique ESPN game/event identifier. |
| venue_id | character | Unique ESPN venue identifier. |
| venue_name | character | Venue (ballpark) full name. |
| venue_city | character | Venue city. |
| venue_state | character | Venue state / province. |
| attendance | integer | Announced attendance. |
| game_duration | character | Elapsed game time (H:MM). |
| home_plate_umpire | character | Home-plate umpire. |
| first_base_umpire | character | First-base umpire. |
| second_base_umpire | character | Second-base umpire. |
| third_base_umpire | character | Third-base umpire. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_game_info(game_id = "401570000"))try(espn_mlb_game_info(game_id = "401570000"))
Get ESPN MLB Event Odds
Get ESPN MLB Event Odds
espn_mlb_game_odds(event_id, ...)espn_mlb_game_odds(event_id, ...)
event_id |
ESPN event/game identifier (character or numeric). |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A tibble with one row per odds provider.
| col_name | types | description |
| event_id | character | Unique event / game identifier (ESPN). |
| provider_id | character | Unique identifier for provider. |
| provider_name | character | Provider name. |
| details | character | Details. |
| over_under | numeric | Over under. |
| spread | numeric | Spread. |
| home_money_line | integer | |
| away_money_line | integer | |
| home_team_odds_open | numeric | |
| home_team_odds_close | numeric | |
| away_team_odds_open | numeric | |
| away_team_odds_close | numeric |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_odds(event_id = "401283399")espn_mlb_game_odds(event_id = "401283399")
Returns a single-row tibble for one referee assigned to one MLB event,
with their name, position (Referee / Crew Chief / Umpire), and crew
order. Pair with espn_mlb_game_officials() to enumerate the crew.
espn_mlb_game_official_detail(event_id, order, ...)espn_mlb_game_official_detail(event_id, order, ...)
event_id |
ESPN event identifier. |
order |
Crew order index (1 = first official). Pair with the |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| official_id | character | Official id. |
| first_name | character | First name. |
| last_name | character | Last name. |
| full_name | character | Full name. |
| display_name | character | Display name. |
| position_id | character | Unique position identifier. |
| position_name | character | Position name. |
| order | integer | Order. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_official_detail(event_id = 401283399, order = 1)espn_mlb_game_official_detail(event_id = 401283399, order = 1)
Get ESPN MLB Event Officials
Get ESPN MLB Event Officials
espn_mlb_game_officials(event_id, ...)espn_mlb_game_officials(event_id, ...)
event_id |
ESPN event/game identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A tibble with one row per official assigned to the game.
| col_name | types | description |
| event_id | character | Unique event / game identifier (ESPN). |
| official_id | character | Unique official / referee identifier. |
| full_name | character | Player's full name. |
| display_name | character | Display name. |
| position_id | character | Unique position identifier. |
| position_name | character | Listed roster position (e.g. 'Pitcher', 'Shortstop', 'Catcher'). |
| position_type | character | |
| order | integer | Display order within the result set. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_officials(event_id = "401283399")espn_mlb_game_officials(event_id = "401283399")
Returns the rich detail block for a single MLB play: sequence, period,
clock, text, scoring/shooting flags, current home/away score, team
$ref, and shot coordinates if applicable. Complements the bulk
espn_mlb_pbp() output by exposing the canonical core-v2 play record.
espn_mlb_game_play(event_id, play_id, ...)espn_mlb_game_play(event_id, play_id, ...)
event_id |
ESPN event identifier. |
play_id |
ESPN play identifier (visible in |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| play_id | character | Play id. |
| sequence_number | character | Sequence number. |
| type_id | character | Type id. |
| type_text | character | Type text. |
| text | character | Text description. |
| short_text | character | Short text. |
| period | integer | Inning number. |
| clock | character | Clock. |
| scoring_play | logical | Scoring play. |
| score_value | numeric | Score value. |
| away_score | integer | Away team run total. |
| home_score | integer | Home team run total. |
| shooting_play | logical | Shooting play. |
| coordinate_x | numeric | Coordinate x. |
| coordinate_y | numeric | Coordinate y. |
| team_ref | character | Team ref. |
| wallclock | character | Wallclock. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_play(event_id = 401283399, play_id = 4012833994)espn_mlb_game_play(event_id = 401283399, play_id = 4012833994)
Returns the players on court at a specific MLB play in long format (one row per athlete entry across both competitors). Foundation for lineup analysis. ESPN coverage is sparse — many plays return zero rows; the wrapper returns a typed empty tibble in that case.
espn_mlb_game_play_personnel(event_id, play_id, ...)espn_mlb_game_play_personnel(event_id, play_id, ...)
event_id |
ESPN event identifier. |
play_id |
ESPN play identifier. |
... |
Additional arguments; currently unused. |
A long tibble with one row per on-court athlete.
Note: ESPN baseball plays do not carry a personnel sub-resource, so this typically returns an empty tibble (it is meaningful for sports such as football). When populated:
| col_name | types | description |
| event_id | character | Unique ESPN event/game identifier. |
| play_id | character | Unique play identifier within the game. |
| athlete_id | character | Athlete involved in the play. |
| participant_type | character | Role of the athlete in the play. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_play_personnel(event_id = 401283399, play_id = 4012833994)espn_mlb_game_play_personnel(event_id = 401283399, play_id = 4012833994)
Returns the long-format per-game box score for a single athlete in one
MLB event. One row per (category x stat). Same shape as
espn_mlb_game_team_statistics() but scoped to a single
athlete-in-event instead of the full team. stat_type defaults to 0
(regular-season aggregate as ESPN tags it for finished events).
espn_mlb_game_player_box(event_id, team_id, athlete_id, stat_type = 0L, ...)espn_mlb_game_player_box(event_id, team_id, athlete_id, stat_type = 0L, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier (the competitor the athlete played for). |
athlete_id |
ESPN athlete identifier. |
stat_type |
Integer stat-type segment. Defaults to 0 (the only type commonly populated for finished events). |
... |
Additional arguments; currently unused. |
A long tibble with one row per (category x stat).
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| athlete_id | character | Unique ESPN athlete identifier. |
| stat_type | integer | Stat type. |
| category_name | character | Category name. |
| category_display | character | Category display. |
| stat_name | character | Stat name. |
| stat_abbrev | character | Stat abbrev. |
| stat_display | character | Stat display. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_player_box(event_id = 401283399, team_id = 29, athlete_id = 33192)espn_mlb_game_player_box(event_id = 401283399, team_id = 29, athlete_id = 33192)
Returns the per-team power-index $ref URLs for one MLB event.
Coverage is sparse — many events return zero items.
espn_mlb_game_powerindex(event_id, ...)espn_mlb_game_powerindex(event_id, ...)
event_id |
ESPN event identifier. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Event Power Index Index
A tibble with one row per team-game power-index entry.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| ref | character | Ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_powerindex(event_id = 401283399)espn_mlb_game_powerindex(event_id = 401283399)
Returns pre-game predictor statistics for one MLB event in long format: one row per (team × statistic). Typical stats include matchup quality, predicted score, win probability, and team strength metrics. Returns empty for events without predictor data (often the case for already-played games).
espn_mlb_game_predictor(event_id, ...)espn_mlb_game_predictor(event_id, ...)
event_id |
ESPN event identifier. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Event Predictor (Pre-game)
A long tibble with rows for both home and away teams.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| name | character | Name. |
| short_name | character | Short display name. |
| last_modified | character | Last modified. |
| side | character | Side. |
| team_id | character | Unique ESPN team identifier. |
| stat_name | character | Statistic name. |
| stat_display | character | Stat display. |
| description | character | Description. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
| team_ref | character | Team ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_predictor(event_id = 401283399)espn_mlb_game_predictor(event_id = 401283399)
Get ESPN MLB Event Win Probabilities
Get ESPN MLB Event Win Probabilities
espn_mlb_game_probabilities(event_id, limit = 200, ...)espn_mlb_game_probabilities(event_id, limit = 200, ...)
event_id |
ESPN event/game identifier (character or numeric). |
limit |
integer. Maximum number of probability rows to return.
Defaults to |
... |
Additional arguments; currently unused. |
A tibble with one row per play-level win-probability entry.
| col_name | types | description |
| event_id | character | Unique event / game identifier (ESPN). |
| sequence_number | character | Sequence number of the play within the game. |
| play_id | character | Unique play identifier within a game. |
| period | integer | Inning number. |
| clock | character | Game clock value (typically empty for baseball). |
| home_win_percentage | numeric | Home win percentage (0-1 decimal). |
| away_win_percentage | numeric | Away win percentage (0-1 decimal). |
| tie_percentage | numeric | Tie percentage (0-1 decimal). |
| secs_to_end_of_period | numeric | |
| secs_to_end_of_game | numeric |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_probabilities(event_id = "401283399", limit = 50)espn_mlb_game_probabilities(event_id = "401283399", limit = 50)
Returns the probable / announced starting pitchers for a game, one row per
team, parsed from the ESPN game-summary header.competitions.competitors
probables block. Available for upcoming and completed games.
espn_mlb_game_probables(game_id)espn_mlb_game_probables(game_id)
game_id |
Game ID – ESPN event identifier (character or numeric). |
A baseballr_data tibble with one row per team's probable starter.
| col_name | types | description |
| game_id | integer | Unique ESPN game/event identifier. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=post). |
| team_id | integer | Unique ESPN team identifier. |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name. |
| home_away | character | Venue label for the team ('home' or 'away'). |
| athlete_id | integer | Unique ESPN athlete identifier (pitcher). |
| athlete_full_name | character | Pitcher full name. |
| athlete_display_name | character | Pitcher display name. |
| athlete_short_name | character | Pitcher short display name. |
| jersey | character | Jersey number. |
| position | character | Position abbreviation (SP / RP / P). |
| throws | character | Throwing handedness (L / R). |
| headshot_href | character | Headshot image URL. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_game_probables(game_id = "401570000"))try(espn_mlb_game_probables(game_id = "401570000"))
Returns prop-bet markets for one MLB event + provider in long format:
one row per (athlete × prop type). Each row has american / decimal /
fraction odds plus the current target (e.g. over/under line). Hits the
core-v2 competitions/{id}/odds/{provider_id}/propBets endpoint and
auto-paginates.
espn_mlb_game_propbets(event_id, provider_id, ...)espn_mlb_game_propbets(event_id, provider_id, ...)
event_id |
ESPN event identifier. |
provider_id |
Sportsbook provider id (e.g. 58 = ESPN BET,
100 = Caesars). Look up via |
... |
Additional arguments; currently unused. |
Get ESPN MLB Event Prop Bets (Long Format)
A long tibble with one row per (athlete × prop type).
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| provider_id | character | Provider id. |
| athlete_id | character | Unique ESPN athlete identifier. |
| prop_type_id | character | Prop type id. |
| prop_type_name | character | Prop type name. |
| american | character | American. |
| decimal | numeric | Decimal. |
| fraction | character | Fraction. |
| total | numeric | Total. |
| current_target | numeric | Current target. |
| last_updated | character | Last updated. |
| athlete_ref | character | Athlete ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_propbets(event_id = 401283399, provider_id = 58)espn_mlb_game_propbets(event_id = 401283399, provider_id = 58)
Get ESPN MLB game rosters
espn_mlb_game_rosters(game_id)espn_mlb_game_rosters(game_id)
game_id |
Game ID |
A game rosters data frame
| col_name | types | description |
| athlete_id | integer | Unique ESPN athlete identifier. |
| athlete_uid | character | Athlete uid. |
| athlete_guid | character | Athlete guid. |
| athlete_type | character | Athlete type. |
| sdr | integer | Sdr. |
| first_name | character | First name. |
| last_name | character | Last name. |
| full_name | character | Full name. |
| athlete_display_name | character | Athlete display name (full). |
| short_name | character | Short display name. |
| weight | integer | Weight. |
| display_weight | character | Display weight. |
| height | integer | Height. |
| display_height | character | Display height. |
| age | integer | Age. |
| date_of_birth | character | Date of birth. |
| debut_year | integer | Debut year. |
| birth_place_city | character | Birth place city. |
| birth_place_state | character | Birth place state. |
| birth_place_country | character | Birth place country. |
| slug | character | Slug. |
| headshot_href | character | Headshot href. |
| headshot_alt | character | Headshot alt. |
| athlete_jersey_number | character | Athlete jersey number. |
| position_id | integer | Position id. |
| position_name | character | Position name. |
| position_display_name | character | Position display name. |
| position_abbreviation | character | Position abbreviation. |
| position_leaf | logical | Position leaf. |
| positions_ref | character | Positions ref. |
| positions_id | character | Positions id. |
| positions_name | character | Positions name. |
| positions_display_name | character | Positions display name. |
| positions_abbreviation | character | Positions abbreviation. |
| positions_leaf | logical | Positions leaf. |
| positions_parent_ref | character | Positions parent ref. |
| positions_statistics_ref | character | Positions statistics ref. |
| linked | logical | Linked. |
| years | integer | Years. |
| debut_year_2 | integer | Debut year 2. |
| debut_ref | character | Debut ref. |
| debut_ref_1 | character | Debut ref 1. |
| active | logical | TRUE if the row represents an active record. |
| status_id | integer | Status id. |
| status_name | character | Game status (e.g. 'STATUS_FINAL'). |
| status_type | character | Status type. |
| status_abbreviation | character | Status abbreviation. |
| bats_type | character | Bats type. |
| bats_abbreviation | character | Bats abbreviation. |
| bats_display_value | character | Bats display value. |
| throws_type | character | Throws type. |
| throws_abbreviation | character | Throws abbreviation. |
| throws_display_value | character | Throws display value. |
| starter | logical | TRUE if the player started the game. |
| valid | logical | Valid. |
| display_name | character | Display name. |
| bat_order | integer | Spot in the batting order (1-9; NA if not applicable). |
| record_number | integer | Record number. |
| at_bats | list | At bats. |
| positions | list | Positions. |
| notes | list | Notes. |
| subbed_in_did_sub | logical | Subbed in did sub. |
| subbed_out_did_sub | logical | Subbed out did sub. |
| team_id | integer | Unique ESPN team identifier. |
| team_guid | character | ESPN team GUID. |
| team_uid | character | ESPN universal team identifier (UID). |
| team_sdr | character | Team sdr. |
| team_slug | character | URL-safe team identifier. |
| team_location | character | Team city / location. |
| team_name | character | Team nickname (e.g. 'Yankees'). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name (e.g. 'New York Yankees'). |
| team_short_display_name | character | Short team display name. |
| team_color | character | Team primary color (hex, no leading '#'). |
| team_alternate_color | character | Team alternate color (hex). |
| team_is_active | logical | Team is active. |
| is_all_star | logical | Is all star. |
| logo_href | character | Logo href. |
| logo_dark_href | character | Logo dark href. |
| logos_href_2 | character | Logos href 2. |
| logos_href_3 | character | Logos href 3. |
| logos_href_4 | character | Logos href 4. |
| logos_width_4 | integer | Logos width 4. |
| logos_height_4 | integer | Logos height 4. |
| logos_alt_4 | character | Logos alt 4. |
| logos_rel_full_4 | character | Logos rel full 4. |
| logos_rel_primary_logo_on_white_color | character | Logos rel primary logo on white color. |
| logos_last_updated_4 | character | Logos last updated 4. |
| logos_href_5 | character | Logos href 5. |
| logos_width_5 | integer | Logos width 5. |
| logos_height_5 | integer | Logos height 5. |
| logos_alt_5 | character | Logos alt 5. |
| logos_rel_full_5 | character | Logos rel full 5. |
| logos_rel_primary_logo_on_black_color | character | Logos rel primary logo on black color. |
| logos_last_updated_5 | character | Logos last updated 5. |
| logos_href_6 | character | Logos href 6. |
| logos_width_6 | integer | Logos width 6. |
| logos_height_6 | integer | Logos height 6. |
| logos_alt_6 | character | Logos alt 6. |
| logos_rel_full_6 | character | Logos rel full 6. |
| logos_rel_primary_logo_on_primary_color | character | Logos rel primary logo on primary color. |
| logos_last_updated_6 | character | Logos last updated 6. |
| logos_href_7 | character | Logos href 7. |
| logos_width_7 | integer | Logos width 7. |
| logos_height_7 | integer | Logos height 7. |
| logos_alt_7 | character | Logos alt 7. |
| logos_rel_full_7 | character | Logos rel full 7. |
| logos_rel_primary_logo_on_secondary_color | character | Logos rel primary logo on secondary color. |
| logos_last_updated_7 | character | Logos last updated 7. |
| logos_href_8 | character | Logos href 8. |
| logos_width_8 | integer | Logos width 8. |
| logos_height_8 | integer | Logos height 8. |
| logos_alt_8 | character | Logos alt 8. |
| logos_rel_full_8 | character | Logos rel full 8. |
| logos_rel_primary_logo_black | character | Logos rel primary logo black. |
| logos_last_updated_8 | character | Logos last updated 8. |
| logos_href_9 | character | Logos href 9. |
| logos_width_9 | integer | Logos width 9. |
| logos_height_9 | integer | Logos height 9. |
| logos_alt_9 | character | Logos alt 9. |
| logos_rel_full_9 | character | Logos rel full 9. |
| logos_rel_primary_logo_white | character | Logos rel primary logo white. |
| logos_last_updated_9 | character | Logos last updated 9. |
| logos_href_10 | character | Logos href 10. |
| logos_width_10 | integer | Logos width 10. |
| logos_height_10 | integer | Logos height 10. |
| logos_alt_10 | character | Logos alt 10. |
| logos_rel_full_10 | character | Logos rel full 10. |
| logos_rel_secondary_logo_on_white_color | character | Logos rel secondary logo on white color. |
| logos_last_updated_10 | character | Logos last updated 10. |
| logos_href_11 | character | Logos href 11. |
| logos_width_11 | integer | Logos width 11. |
| logos_height_11 | integer | Logos height 11. |
| logos_alt_11 | character | Logos alt 11. |
| logos_rel_full_11 | character | Logos rel full 11. |
| logos_rel_secondary_logo_on_black_color | character | Logos rel secondary logo on black color. |
| logos_last_updated_11 | character | Logos last updated 11. |
| logos_href_12 | character | Logos href 12. |
| logos_width_12 | integer | Logos width 12. |
| logos_height_12 | integer | Logos height 12. |
| logos_alt_12 | character | Logos alt 12. |
| logos_rel_full_12 | character | Logos rel full 12. |
| logos_rel_secondary_logo_on_primary_color | character | Logos rel secondary logo on primary color. |
| logos_last_updated_12 | character | Logos last updated 12. |
| logos_href_13 | character | Logos href 13. |
| logos_width_13 | integer | Logos width 13. |
| logos_height_13 | integer | Logos height 13. |
| logos_alt_13 | character | Logos alt 13. |
| logos_rel_full_13 | character | Logos rel full 13. |
| logos_rel_secondary_logo_on_secondary_color | character | Logos rel secondary logo on secondary color. |
| logos_last_updated_13 | character | Logos last updated 13. |
| logos_href_14 | character | Logos href 14. |
| logos_width_14 | integer | Logos width 14. |
| logos_height_14 | integer | Logos height 14. |
| logos_alt_14 | character | Logos alt 14. |
| logos_rel_full_14 | character | Logos rel full 14. |
| logos_rel_secondary_logo_black | character | Logos rel secondary logo black. |
| logos_last_updated_14 | character | Logos last updated 14. |
| logos_href_15 | character | Logos href 15. |
| logos_width_15 | integer | Logos width 15. |
| logos_height_15 | integer | Logos height 15. |
| logos_alt_15 | character | Logos alt 15. |
| logos_rel_full_15 | character | Logos rel full 15. |
| logos_rel_secondary_logo_white | character | Logos rel secondary logo white. |
| logos_last_updated_15 | character | Logos last updated 15. |
| game_id | integer | Unique ESPN game/event identifier. |
| order | integer | Order. |
| home_away | character | Venue label for the team ('home' or 'away'). |
| winner | logical | Winner. |
| nickname | character | Team nickname. |
| draft_display_text | character | Draft display text. |
| draft_round | integer | Draft round. |
| draft_year | integer | Draft year. |
| draft_selection | integer | Draft selection. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_game_rosters(game_id = 401283399))try(espn_mlb_game_rosters(game_id = 401283399))
Returns the live game situation for one MLB event: timeouts remaining,
team fouls, fouls to give, bonus state, and a $ref to the last play.
During a live game this reflects current state; after the game ends
the values are frozen.
espn_mlb_game_situation(event_id, ...)espn_mlb_game_situation(event_id, ...)
event_id |
ESPN event identifier. |
... |
Additional arguments; currently unused. |
A single-row tibble with timeouts + fouls for both teams.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| home_timeouts_current | integer | Home timeouts current. |
| home_timeouts_remaining | integer | Home timeouts remaining. |
| away_timeouts_current | integer | Away timeouts current. |
| away_timeouts_remaining | integer | Away timeouts remaining. |
| home_team_fouls | integer | Home team fouls. |
| home_team_fouls_current | integer | Home team fouls current. |
| home_fouls_to_give | integer | Home fouls to give. |
| home_bonus_state | character | Home bonus state. |
| away_team_fouls | integer | Away team fouls. |
| away_team_fouls_current | integer | Away team fouls current. |
| away_fouls_to_give | integer | Away fouls to give. |
| away_bonus_state | character | Away bonus state. |
| last_play_ref | character | Last play ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_situation(event_id = 401283399)espn_mlb_game_situation(event_id = 401283399)
Returns the per-team statistical leaders for one MLB event in long format: one row per (category x athlete rank). Categories typically include batting average, home runs, RBIs, and MLB rating.
espn_mlb_game_team_leaders(event_id, team_id, ...)espn_mlb_game_team_leaders(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
... |
Additional arguments; currently unused. |
A long tibble with one row per (category x rank).
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| category_name | character | Statistic category name. |
| category_display | character | Category display. |
| category_abbrev | character | Category abbrev. |
| rank | integer | Rank within the result set. |
| athlete_id | character | Unique ESPN athlete identifier. |
| display_value | character | Human-readable value. |
| value | numeric | Numeric value. |
| athlete_ref | character | Athlete ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_leaders(event_id = 401283399, team_id = 29)espn_mlb_game_team_leaders(event_id = 401283399, team_id = 29)
Returns the per-inning run breakdown for one team in one MLB event. One row per inning (regulation innings plus any extra innings).
espn_mlb_game_team_linescores(event_id, team_id, ...)espn_mlb_game_team_linescores(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier (the competitor whose linescore to fetch). |
... |
Additional arguments; currently unused. |
A tibble with one row per inning.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| period | integer | Inning number. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
| source | character | Source. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_linescores(event_id = 401283399, team_id = 29)espn_mlb_game_team_linescores(event_id = 401283399, team_id = 29)
Returns team records as of the given MLB event: overall, home, away, conference, and division breakdowns where available. One row per record type.
espn_mlb_game_team_records(event_id, team_id, ...)espn_mlb_game_team_records(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
... |
Additional arguments; currently unused. |
A tibble with one row per record type.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| record_id | character | Record id. |
| name | character | Name. |
| abbreviation | character | Short abbreviation. |
| display_name | character | Display name. |
| short_display_name | character | Short display name. |
| type | character | Type. |
| summary | character | Record summary (e.g. 'W-L'). |
| value | numeric | Numeric value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_records(event_id = 401283399, team_id = 29)espn_mlb_game_team_records(event_id = 401283399, team_id = 29)
Returns the game-day roster index for one team in one MLB event.
Each row carries the athlete id and the core-v2 $ref URL — use
the ref to dereference athlete-game splits or biographical data.
espn_mlb_game_team_roster(event_id, team_id, ...)espn_mlb_game_team_roster(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
... |
Additional arguments; currently unused. |
A tibble with one row per active athlete.
Note: ESPN's core-v2 per-game competitor roster is not populated for
MLB and typically returns an empty tibble; use espn_mlb_game_rosters()
(site summary) for game-day rosters. When populated:
| col_name | types | description |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| athlete_id | character | Unique ESPN athlete identifier. |
| athlete_display_name | character | Player display name. |
| position | character | Position abbreviation. |
| jersey | character | Jersey number. |
| starter | logical | TRUE if the player started the game. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_roster(event_id = 401283399, team_id = 29)espn_mlb_game_team_roster(event_id = 401283399, team_id = 29)
Returns a single-row tibble describing one athlete's game-day roster
entry for one MLB event. Carries the starter flag, didNotPlay
flag with reason, ejection flag, and the substitution slot if the
athlete came in for another player. Pair with
espn_mlb_game_team_roster() to enumerate the roster.
espn_mlb_game_team_roster_entry(event_id, team_id, athlete_id, ...)espn_mlb_game_team_roster_entry(event_id, team_id, athlete_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
athlete_id |
ESPN athlete identifier. |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| athlete_id | character | Unique ESPN athlete identifier. |
| player_id | character | Player id. |
| period | integer | Inning number. |
| active | logical | Active. |
| starter | logical | TRUE if a starter. |
| did_not_play | logical | Did not play. |
| reason | character | Reason. |
| ejected | logical | Ejected. |
| for_player_id | character | For player id. |
| jersey | character | Jersey number. |
| display_name | character | Display name. |
| athlete_ref | character | Athlete ref. |
| position_ref | character | Position ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_roster_entry(event_id = 401283399, team_id = 13, athlete_id = 33192)espn_mlb_game_team_roster_entry(event_id = 401283399, team_id = 13, athlete_id = 33192)
Returns a one-row tibble with one team's final score for one MLB event:
numeric value, display string, winner flag, and source metadata.
Quick-lookup wrapper — use espn_mlb_game_team_linescores() for
per-period detail.
espn_mlb_game_team_score(event_id, team_id, ...)espn_mlb_game_team_score(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
| winner | logical | Winner. |
| source_id | character | Source id. |
| source_description | character | Source description. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_score(event_id = 401283399, team_id = 29)espn_mlb_game_team_score(event_id = 401283399, team_id = 29)
Returns full team-game statistics for one team in one MLB event in long format: one row per (category x stat). Covers offensive, defensive, and general categories with both raw values and display strings.
espn_mlb_game_team_statistics(event_id, team_id, ...)espn_mlb_game_team_statistics(event_id, team_id, ...)
event_id |
ESPN event identifier. |
team_id |
ESPN team identifier. |
... |
Additional arguments; currently unused. |
A long tibble with one row per (category x stat).
| col_name | types | description |
| league | character | League. |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| category_name | character | Statistic category name. |
| category_display | character | Category display. |
| stat_name | character | Statistic name. |
| stat_abbrev | character | Stat abbrev. |
| stat_display | character | Stat display. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_game_team_statistics(event_id = 401283399, team_id = 29)espn_mlb_game_team_statistics(event_id = 401283399, team_id = 29)
Get ESPN MLB Injuries
Get ESPN MLB Injuries
espn_mlb_injuries(season = most_recent_mlb_season(), ...)espn_mlb_injuries(season = most_recent_mlb_season(), ...)
season |
Numeric or character season year (e.g. |
... |
Currently unused; reserved for future argument threading. |
Returns a tibble of league-wide MLB injury records. Returns an empty tibble (zero rows) when no injuries are reported.
Injuries
| col_name | types | description |
| team_id | character | Unique team identifier. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| position | character | Listed roster position (G, F, C, etc.). |
| status | character | Status label. |
| date | character | Date in YYYY-MM-DD format. |
| type | character | Record type / category. |
| side | character | Side label (e.g. 'home', 'away', or 'overUnder'). |
| returns_at | character | |
| short_comment | character | |
| long_comment | character | Long-form play / event comment. |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_injuries()espn_mlb_injuries()
Get ESPN MLB League Leaders
Get ESPN MLB League Leaders
espn_mlb_leaders(season = most_recent_mlb_season(), season_type = 2, ...)espn_mlb_leaders(season = most_recent_mlb_season(), season_type = 2, ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
season_type |
Integer season type: 1 = preseason, 2 = regular (default), 3 = postseason. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A single baseballr_data tibble with one row per category-athlete
pair.
| col_name | types | description |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| season_type | integer | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN). |
| category | character | Category label. |
| abbreviation | character | Short abbreviation. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| team_id | character | Unique team identifier. |
| team_abbrev | character | |
| value | numeric | Numeric or string value field. |
| rank | integer | Rank. |
| display_value | character | Human-readable display value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_leaders(season = 2024, season_type = 2)espn_mlb_leaders(season = 2024, season_type = 2)
Get ESPN MLB News
Get ESPN MLB News
espn_mlb_news(limit = 50)espn_mlb_news(limit = 50)
limit |
integer. Maximum number of articles to return. Default |
Retrieve ESPN MLB news. Uses getOption("baseballr.proxy") or
http_proxy/https_proxy environment variables for proxy configuration
(per-call proxy override is not supported for ESPN wrappers).
Returns a tibble of news articles.
| col_name | types | description |
| id | character | Id. |
| type | character | Record type / category. |
| headline | character | News headline. |
| description | character | Long-form description text. |
| published | character | Publication timestamp (ISO 8601). |
| premium | logical | |
| byline | character | News article byline / author. |
| link_web | character | Web link / URL. |
| league_id | character | ESPN league identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_news(limit = 5)espn_mlb_news(limit = 5)
Get ESPN MLB PBP data
espn_mlb_pbp(game_id)espn_mlb_pbp(game_id)
game_id |
Game ID |
A play-by-play data frame.
| col_name | types | description |
| id | character | Play / record identifier. |
| sequence_number | character | Play sequence number within the game. |
| text | character | Text description of the play. |
| away_score | integer | Away team run total after the play. |
| home_score | integer | Home team run total after the play. |
| scoring_play | logical | TRUE if the play scored a run. |
| score_value | integer | Runs scored on the play. |
| wallclock | character | Wall-clock timestamp of the play (ISO 8601). |
| at_bat_id | character | Identifier of the at-bat the play belongs to. |
| summary_type | character | Play summary type. |
| outs | integer | Outs in the inning after the play. |
| type | character | Type. |
| bat_order | integer | Spot in the batting order (1-9; NA if not applicable). |
| at_bat_pitch_number | integer | Pitch number within the at-bat. |
| pitch_velocity | integer | Pitch velocity (mph). |
| trajectory | character | Batted-ball trajectory. |
| alternative_play | character | Alternative play. |
| type_id | integer | Type id. |
| type_text | character | Type text. |
| type_type | character | Type type. |
| type_alternative_text | character | Type alternative text. |
| type_abbreviation | character | Type abbreviation. |
| period_type | character | Period type ('inning'). |
| period_number | integer | Inning number. |
| period_display_value | character | Inning display value (e.g. 'Top 1st'). |
| team_id | integer | Unique ESPN team identifier. |
| pitch_count_balls | integer | Balls in the count when the pitch was thrown. |
| pitch_count_strikes | integer | Strikes in the count when the pitch was thrown. |
| result_count_balls | integer | Balls in the count after the pitch. |
| result_count_strikes | integer | Strikes in the count after the pitch. |
| bats_type | character | Bats type. |
| bats_abbreviation | character | Bats abbreviation. |
| bats_display_value | character | Bats display value. |
| pitch_coordinate_x | integer | Pitch location x-coordinate. |
| pitch_coordinate_y | integer | Pitch location y-coordinate. |
| pitch_type_id | character | Pitch type identifier. |
| pitch_type_text | character | Pitch type description (e.g. 'Four-seam FB'). |
| pitch_type_abbreviation | character | Pitch type abbreviation. |
| hit_coordinate_x | integer | Batted-ball location x-coordinate. |
| hit_coordinate_y | integer | Batted-ball location y-coordinate. |
| alternative_type_id | character | Alternative type id. |
| alternative_type_text | character | Alternative type text. |
| alternative_type_abbreviation | character | Alternative type abbreviation. |
| alternative_type_alternative_text | character | Alternative type alternative text. |
| alternative_type_type | character | Alternative type type. |
| on_first_athlete_id | character | Athlete id of the runner on first base. |
| on_second_athlete_id | character | Athlete id of the runner on second base. |
| play_id | character | Play id. |
| athlete_id_1 | integer | Primary participating athlete id (batter). |
| athlete_id_2 | integer | Second participating athlete id (pitcher). |
| athlete_id_3 | integer | Third participating athlete id (fielder). |
| home_team_id | integer | Home team id. |
| home_team_mascot | character | Home team mascot. |
| home_team_name | character | Home team name. |
| home_team_abbrev | character | Home team abbrev. |
| home_team_logo | character | Home team logo. |
| home_team_logo_dark | character | Home team logo dark. |
| home_team_full_name | character | Home team full name. |
| home_team_color | character | Home team color. |
| home_team_alternate_color | character | Home team alternate color. |
| home_team_score | integer | Home team score. |
| home_team_winner | logical | Home team winner. |
| home_team_record | character | Home team record. |
| away_team_id | integer | Away team id. |
| away_team_mascot | character | Away team mascot. |
| away_team_name | character | Away team name. |
| away_team_abbrev | character | Away team abbrev. |
| away_team_logo | character | Away team logo. |
| away_team_logo_dark | character | Away team logo dark. |
| away_team_full_name | character | Away team full name. |
| away_team_color | character | Away team color. |
| away_team_alternate_color | character | Away team alternate color. |
| away_team_score | integer | Away team score. |
| away_team_winner | logical | Away team winner. |
| away_team_record | character | Away team record. |
| game_id | integer | Unique ESPN game/event identifier. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=postseason, 4=off-season). |
| game_date | Date | Game date (YYYY-MM-DD). |
| game_date_time | POSIXct | Game start date/time (US/Eastern). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_pbp(game_id = 401071880))try(espn_mlb_pbp(game_id = 401071880))
Get ESPN MLB Athlete Awards
Get ESPN MLB Athlete Awards
espn_mlb_player_awards(athlete_id, ...)espn_mlb_player_awards(athlete_id, ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A single tibble. This endpoint is sparse; many athletes have no award data, in which case an empty tibble with canonical columns is returned.
| col_name | types | description |
| season | character | Season identifier (4-digit year or 'YYYY-YY' string). |
| award_id | character | |
| name | character | Display name. |
| description | character | Long-form description text. |
| date | character | Date in YYYY-MM-DD format. |
| type | character | Record type / category. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_awards(athlete_id = "1966")espn_mlb_player_awards(athlete_id = "1966")
Get ESPN MLB player box scores
espn_mlb_player_box(game_id)espn_mlb_player_box(game_id)
game_id |
Game ID |
A player boxscore data frame
| col_name | types | description |
| game_id | integer | Unique ESPN game/event identifier. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=postseason, 4=off-season). |
| game_date | Date | Game date (YYYY-MM-DD). |
| game_date_time | POSIXct | Game start date/time (US/Eastern). |
| stat_group | character | Statistic side this row reports: 'batting' or 'pitching'. |
| team_id | integer | Unique ESPN team identifier. |
| team_name | character | Team nickname (e.g. 'Yankees'). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name (e.g. 'New York Yankees'). |
| athlete_id | integer | Unique ESPN athlete identifier. |
| athlete_display_name | character | Athlete display name (full). |
| athlete_short_name | character | Athlete short display name. |
| athlete_position_name | character | Athlete fielding position (e.g. 'Shortstop', 'Pitcher'). |
| athlete_position_abbreviation | character | Position abbreviation (e.g. 'SS', 'P'). |
| starter | logical | TRUE if the player started the game. |
| bat_order | integer | Spot in the batting order (1-9; NA if not applicable). |
| active | logical | TRUE if the row represents an active record. |
| h_ab | character | Hits-for-At-bats line (e.g. '2-4'). |
| ab | character | At-bats. |
| r | character | Runs scored. |
| h | character | Hits. |
| rbi | character | Runs batted in. |
| hr | character | Home runs. |
| bb | character | Bases on balls (walks). |
| k | character | Strikeouts. |
| number_p | character | Pitches seen / thrown. |
| avg | character | Batting average. |
| obp | character | On-base percentage. |
| slg | character | Slugging percentage. |
| ip | character | Innings pitched. |
| er | character | Earned runs. |
| pc_st | character | Pitch count - strikes (e.g. '95-58'). |
| era | character | Earned run average. |
| pc | character | Pitch count. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_player_box(game_id = 401071880))try(espn_mlb_player_box(game_id = 401071880))
Returns career stats for an MLB athlete in long format. Default
stat_type = 0L fetches the standard "All Splits" / regular-season
view. Pass a vector like c(0L, 1L, 2L) to attempt multiple types
and bind them via a stat_type_id column; variants that 404 for that
athlete are silently skipped. Stat types: 0 = regular season (default
endpoint), 1 = postseason, 2 = career aggregate. Coverage of types 1
and 2 is sparse — many athletes only have type 0 populated.
espn_mlb_player_career_stats(athlete_id, stat_type = 0L, ...)espn_mlb_player_career_stats(athlete_id, stat_type = 0L, ...)
athlete_id |
ESPN athlete identifier. |
stat_type |
Integer or integer vector of stat-type codes.
Default |
... |
Additional arguments; currently unused. |
Get ESPN MLB Athlete Career Stats (Long Format)
A long tibble (one row per stat_type × split × category × stat).
| col_name | types | description |
| league | character | League slug. |
| athlete_id | character | ESPN athlete id. |
| stat_type_id | character | Stat-type code (0 = reg, 1 = post, 2 = career). |
| split_id | character | Split id. |
| split_name | character | Split name (typically "All Splits"). |
| split_type | character | Split type code. |
| category_name | character | Category key (e.g. "defensive"). |
| category_display | character | Category display name. |
| category_short | character | Category short display. |
| category_abbrev | character | Category abbreviation. |
| stat_name | character | Stat key. |
| stat_abbrev | character | Stat abbreviation. |
| stat_display | character | Stat display name. |
| stat_short | character | Stat short display. |
| description | character | Stat description. |
| value | numeric | Stat value. |
| display_value | character | Display-formatted value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# Aaron Judge — regular + postseason combined espn_mlb_player_career_stats(athlete_id = 33192) # Just career aggregate espn_mlb_player_career_stats(athlete_id = 33192, stat_type = 2L)# Aaron Judge — regular + postseason combined espn_mlb_player_career_stats(athlete_id = 33192) # Just career aggregate espn_mlb_player_career_stats(athlete_id = 33192, stat_type = 2L)
Returns the full contract record for one MLB athlete in one season,
including salary, cap-rule flags, option type, Bird status, and trade
protections. Backed by
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/contracts/{season}.
espn_mlb_player_contract(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_contract(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| athlete_id | character | ESPN athlete identifier. |
| season | integer | Contract season year. |
| bird_status | integer | Bird-rights tier (0 = Non, 1 = Early, 2 = Full). |
| salary | numeric | Total cap-counting salary for the season ($). |
| salary_remaining | numeric | Remaining salary owed. |
| years_remaining | integer | Years left on the contract. |
| incoming_trade_value | numeric | Trade value if receiving this contract ($). |
| outgoing_trade_value | numeric | Trade value if sending out this contract ($). |
| option_type | integer | Option type code (e.g. team / player option). |
| minimum_salary_exception | logical | Signed under the minimum-salary exception. |
| trade_restriction | logical | Whether a trade restriction is active. |
| unsigned_foreign_pick | logical | Unsigned-foreign-pick flag. |
| active | logical | Whether the contract is currently active. |
| base_year_compensation_active | logical | Base-year-compensation rule active. |
| poison_pill_provision_active | logical | Poison-pill provision active. |
| trade_kicker_active | logical | Trade kicker active. |
| trade_kicker_percentage | numeric | Trade kicker percentage of salary. |
| trade_kicker_value | numeric | Trade kicker dollar value. |
| trade_kicker_trade_value | numeric | Trade kicker post-trade dollar value. |
| season_ref | character | $ref to the season resource. |
| team_ref | character | $ref to the team-in-season resource. |
| team_id | character | ESPN team id parsed from team_ref. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# Aaron Judge 2025 contract espn_mlb_player_contract(athlete_id = 33192, season = 2025)# Aaron Judge 2025 contract espn_mlb_player_contract(athlete_id = 33192, season = 2025)
Returns the index of contract seasons recorded for an MLB athlete from
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/contracts.
Each row is one contract year — pass the season to
espn_mlb_player_contract() for the full contract record.
espn_mlb_player_contracts(athlete_id, ...)espn_mlb_player_contracts(athlete_id, ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A tibble with one row per contract year.
| col_name | types | description |
| athlete_id | character | ESPN athlete identifier. |
| season | integer | Contract season year. |
| ref | character | Full $ref URL for the contract detail. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# Aaron Judge — athlete id 1966 espn_mlb_player_contracts(athlete_id = 33192)# Aaron Judge — athlete id 1966 espn_mlb_player_contracts(athlete_id = 33192)
espn_mlb_athletes_index(): Paginated index of MLB athletes.
espn_mlb_player_info(): Athlete bio / identity.
espn_mlb_player_overview(): Athlete overview (stats, next game, news).
espn_mlb_player_gamelog(): Game-by-game log for a season.
espn_mlb_player_splits(): Statistical splits.
espn_mlb_player_stats(), espn_mlb_player_stats_v3(): Season statistics.
espn_mlb_player_career_stats(), espn_mlb_player_seasons(): Career / season history.
espn_mlb_player_eventlog(), espn_mlb_player_eventlog_v2(), espn_mlb_player_statisticslog(): Event / statistics logs.
espn_mlb_player_contract(), espn_mlb_player_contracts(): Contract data.
espn_mlb_player_awards(): Athlete awards.
espn_mlb_draft_athletes(), espn_mlb_draft_athlete_detail(): Draft prospects.
Athlete-level ESPN endpoints across sports.core.api.espn.com and
site.web.api.espn.com: identity, overviews, game logs, splits, season /
career statistics, contracts, and awards.
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
Get ESPN MLB Athlete Eventlog
Get ESPN MLB Athlete Eventlog
espn_mlb_player_eventlog(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_eventlog(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single tibble. Per-event statistics.$ref URLs from the ESPN
core-v2 API are returned as the character column statistics_ref and
are NOT resolved. Similarly, event_ref, competition_ref, and
team_ref are returned as character columns.
| col_name | types | description |
| event_ref | character | Reference link to the originating event. |
| competition_ref | character | |
| team_ref | character | |
| statistics_ref | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_eventlog(athlete_id = "1966", season = 2024)espn_mlb_player_eventlog(athlete_id = "1966", season = 2024)
Returns one row per (event x team) for an MLB athlete's appearances
in a given season. Distinct from espn_mlb_player_eventlog() which
wraps the web-common-v3 gamelog endpoint returning stats per game;
this core-v2 variant returns refs + played flag and is era-correct.
espn_mlb_player_eventlog_v2(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_eventlog_v2(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier. |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
A tibble with one row per event appearance. See package source for column schema.
| col_name | types | description |
| league | character | League. |
| athlete_id | character | Unique ESPN athlete identifier. |
| season | integer | Season (4-digit year). |
| event_id | character | Unique ESPN event/game identifier. |
| team_id | character | Unique ESPN team identifier. |
| played | logical | Played. |
| event_ref | character | Event ref. |
| competition_ref | character | Competition ref. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_eventlog_v2(athlete_id = 33192, season = 2025)espn_mlb_player_eventlog_v2(athlete_id = 33192, season = 2025)
Get ESPN MLB Athlete Gamelog
Get ESPN MLB Athlete Gamelog
espn_mlb_player_gamelog(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_gamelog(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single tibble with one row per game. Column names reflect the stat labels returned by ESPN and will vary by season and player.
| col_name | types | description |
| id | character | Identifier. |
| at_vs | character | At vs. |
| game_date | character | Game date (YYYY-MM-DD). |
| score | character | Score. |
| home_team_id | character | Unique ESPN team identifier. |
| away_team_id | character | Unique ESPN team identifier. |
| home_team_score | character | Home team score. |
| away_team_score | character | Away team score. |
| game_result | character | Game result (W/L). |
| league_name | character | League name. |
| league_abbreviation | character | League abbreviation. |
| league_short_name | character | League short name. |
| event_note | character | Event note. |
| team_id | character | Unique ESPN team identifier. |
| team_uid | character | ESPN universal team identifier (UID). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_logo | character | Team logo. |
| team_is_all_star | character | Team is all star. |
| opponent_id | character | Opponent team identifier. |
| opponent_uid | character | ESPN UID. |
| opponent_display_name | character | Display name. |
| opponent_abbreviation | character | Opponent abbreviation. |
| opponent_logo | character | Opponent logo. |
| event_id | character | Unique ESPN event/game identifier. |
| week | character | Week. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_gamelog(athlete_id = "1966", season = 2024)espn_mlb_player_gamelog(athlete_id = "1966", season = 2024)
Get ESPN MLB Athlete Info
Get ESPN MLB Athlete Info
espn_mlb_player_info(athlete_id, ...)espn_mlb_player_info(athlete_id, ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A named list of data frames: Bio, Team, Position,
Status, College, Draft.
Bio
| col_name | types | description |
| id | character | Id. |
| full_name | character | Player's full name. |
| display_name | character | Display name. |
| jersey | character | Jersey number worn by the player. |
| age | character | Player age (in years). |
| date_of_birth | character | Date of birth (YYYY-MM-DD). |
| headshot_href | character | Headshot image URL. |
Team
| col_name | types | description |
| id | character | Id. |
| abbreviation | character | Short abbreviation. |
| display_name | character | Display name. |
Position
| col_name | types | description |
| id | character | Id. |
| name | character | Display name. |
| abbreviation | character | Short abbreviation. |
Status
| col_name | types | description |
| id | character | Id. |
| name | character | Display name. |
| type | character | Record type / category. |
College
| col_name | types | description |
| id | character | Id. |
| name | character | Display name. |
| mascot | character | Team mascot. |
Draft
| col_name | types | description |
| year | character | 4-digit year. |
| round | character | Tournament / playoff round. |
| selection | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_info(athlete_id = "1966")espn_mlb_player_info(athlete_id = "1966")
Get ESPN MLB Athlete Overview
Get ESPN MLB Athlete Overview
espn_mlb_player_overview(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_overview(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A named list of data frames: Statistics, NextGame,
Last5Games, Headlines, FantasyOutlook.
Statistics
| col_name | types | description |
| (varies) | character |
NextGame
| col_name | types | description |
| id | character | Id. |
| date | character | Date in YYYY-MM-DD format. |
| name | character | Display name. |
| short_name | character | Short display name. |
Last5Games
| col_name | types | description |
| (varies) | character |
Headlines
| col_name | types | description |
| headline | character | News headline. |
| description | character | Long-form description text. |
| published | character | Publication timestamp (ISO 8601). |
FantasyOutlook
| col_name | types | description |
| (varies) | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_overview(athlete_id = "1966", season = 2024)espn_mlb_player_overview(athlete_id = "1966", season = 2024)
Returns the list of seasons an MLB athlete appeared in. Useful for bounding follow-up calls to per-season endpoints.
espn_mlb_player_seasons(athlete_id, ...)espn_mlb_player_seasons(athlete_id, ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A tibble with one row per career season.
| col_name | types | description |
| league | character | League slug. |
| athlete_id | character | ESPN athlete id. |
| season | integer | Season year. |
| ref | character | $ref URL to the season detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# Aaron Judge (33192): 23 career seasons espn_mlb_player_seasons(athlete_id = 33192)# Aaron Judge (33192): 23 career seasons espn_mlb_player_seasons(athlete_id = 33192)
Get ESPN MLB Athlete Splits
Get ESPN MLB Athlete Splits
espn_mlb_player_splits(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_splits(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single long-format tibble. When data are present, columns include
at minimum category and split_name, plus per-stat columns driven by
ESPN labels.
| col_name | types | description |
| name | character | Name. |
| display_name | character | Display name. |
| splits | list | Splits. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_splits(athlete_id = "1966", season = 2024)espn_mlb_player_splits(athlete_id = "1966", season = 2024)
Get ESPN MLB Athlete Statisticslog
Get ESPN MLB Athlete Statisticslog
espn_mlb_player_statisticslog( athlete_id, season = most_recent_mlb_season(), ... )espn_mlb_player_statisticslog( athlete_id, season = most_recent_mlb_season(), ... )
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single tibble. When resolved, each row corresponds to one
statistical entry in the core-v2 statistics log, with event_ref and
statistics_ref character columns pointing to resolvable ESPN endpoints.
| col_name | types | description |
| event_ref | character | Reference link to the originating event. |
| statistics_ref | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_statisticslog(athlete_id = "1966", season = 2024)espn_mlb_player_statisticslog(athlete_id = "1966", season = 2024)
Get ESPN MLB player stats data
espn_mlb_player_stats(athlete_id, year, season_type = "regular", total = FALSE)espn_mlb_player_stats(athlete_id, year, season_type = "regular", total = FALSE)
athlete_id |
Athlete ID |
year |
Year |
season_type |
(character, default: regular): Season type - regular or postseason |
total |
(boolean, default: FALSE): Totals |
Returns a tibble with the player stats data
| col_name | types | description |
| athlete_id | integer | Unique ESPN athlete identifier. |
| athlete_uid | character | Athlete uid. |
| athlete_guid | character | Athlete guid. |
| athlete_type | character | Athlete type. |
| sdr | integer | Sdr. |
| first_name | character | First name. |
| last_name | character | Last name. |
| full_name | character | Full name. |
| display_name | character | Display name. |
| nickname | character | Team nickname. |
| short_name | character | Short display name. |
| weight | numeric | Weight. |
| display_weight | character | Display weight. |
| height | numeric | Height. |
| display_height | character | Display height. |
| age | integer | Age. |
| date_of_birth | character | Date of birth. |
| debut_year | integer | Debut year. |
| slug | character | Slug. |
| headshot_href | character | Headshot href. |
| headshot_alt | character | Headshot alt. |
| jersey | character | Jersey. |
| position_id | integer | Position id. |
| position_name | character | Position name. |
| position_display_name | character | Position display name. |
| position_abbreviation | character | Position abbreviation. |
| position_leaf | logical | Position leaf. |
| positions_x_ref | character | Positions x ref. |
| positions_id | character | Positions id. |
| positions_name | character | Positions name. |
| positions_display_name | character | Positions display name. |
| positions_abbreviation | character | Positions abbreviation. |
| positions_leaf | logical | Positions leaf. |
| positions_x_ref_1 | character | Positions x ref 1. |
| positions_x_ref_2 | character | Positions x ref 2. |
| positions_x_ref_3 | character | Positions x ref 3. |
| positions_id_1 | character | Positions id 1. |
| positions_name_1 | character | Positions name 1. |
| positions_display_name_1 | character | Positions display name 1. |
| positions_abbreviation_1 | character | Positions abbreviation 1. |
| positions_leaf_1 | logical | Positions leaf 1. |
| positions_x_ref_4 | character | Positions x ref 4. |
| positions_x_ref_5 | character | Positions x ref 5. |
| positions_x_ref_6 | character | Positions x ref 6. |
| positions_id_2 | character | Positions id 2. |
| positions_name_2 | character | Positions name 2. |
| positions_display_name_2 | character | Positions display name 2. |
| positions_abbreviation_2 | character | Positions abbreviation 2. |
| positions_leaf_2 | logical | Positions leaf 2. |
| positions_x_ref_7 | character | Positions x ref 7. |
| positions_x_ref_8 | character | Positions x ref 8. |
| positions_x_ref_9 | character | Positions x ref 9. |
| positions_id_3 | character | Positions id 3. |
| positions_name_3 | character | Positions name 3. |
| positions_display_name_3 | character | Positions display name 3. |
| positions_abbreviation_3 | character | Positions abbreviation 3. |
| positions_leaf_3 | logical | Positions leaf 3. |
| positions_x_ref_10 | character | Positions x ref 10. |
| positions_x_ref_11 | character | Positions x ref 11. |
| linked | logical | Linked. |
| ...and 216 further ESPN stat columns (full batting / pitching / fielding stat set). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_player_stats(athlete_id = 33192, year = 2022))try(espn_mlb_player_stats(athlete_id = 33192, year = 2022))
Get ESPN MLB Athlete Stats
Get ESPN MLB Athlete Stats
espn_mlb_player_stats_v3(athlete_id, season = most_recent_mlb_season(), ...)espn_mlb_player_stats_v3(athlete_id, season = most_recent_mlb_season(), ...)
athlete_id |
ESPN athlete identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A named list of per-category tibbles. Default category names are
General, Offensive, Defensive, Rebounding, Shooting, Misc.
Actual names are driven by the ESPN response; additional categories may
appear. Each tibble has columns depending on the category returned by
ESPN.
Note: ESPN's web-v3 athlete-statistics feed is sparsely populated for
MLB and frequently returns an empty tibble; use espn_mlb_player_stats()
or espn_mlb_player_splits() for season statistics. When populated:
| col_name | types | description |
| athlete_id | character | Unique ESPN athlete identifier. |
| season | integer | Season (4-digit year). |
| category | character | Statistic category (e.g. 'batting', 'pitching'). |
| stat_name | character | Statistic name. |
| abbreviation | character | Statistic abbreviation. |
| value | numeric | Numeric statistic value. |
| display_value | character | Human-readable statistic value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_player_stats_v3(athlete_id = "1966", season = 2024)espn_mlb_player_stats_v3(athlete_id = "1966", season = 2024)
Returns metadata for a single MLB position. Useful for dereferencing
position $ref URLs embedded in athlete records, and for navigating
parent/leaf relationships in the position taxonomy.
espn_mlb_position(position_id, ...)espn_mlb_position(position_id, ...)
position_id |
ESPN position identifier (character or numeric). |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| position_id | character | Unique position identifier. |
| name | character | Name. |
| display_name | character | Display name. |
| abbreviation | character | Short abbreviation. |
| leaf | logical | TRUE if a leaf position. |
| parent_ref | character | Parent ref. |
| league | character | League. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_position(position_id = 1)espn_mlb_position(position_id = 1)
Returns the MLB position dictionary index. One row per position with
its id and the canonical $ref URL — pass an id to
espn_mlb_position() for full details (display name, abbreviation,
leaf flag, parent link).
espn_mlb_positions(...)espn_mlb_positions(...)
... |
Additional arguments; currently unused. |
A tibble with one row per position.
| col_name | types | description |
| position_id | character | Unique position identifier. |
| ref | character | Ref. |
| league | character | League. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_positions()espn_mlb_positions()
Returns ESPN's power-index and related per-team metrics for one MLB
season, in long format: one row per (team x stat). Auto-paginates through
all teams. Backed by
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{season}/powerindex.
Note: ESPN's power-index feed is sparsely populated for MLB and frequently
returns zero items.
espn_mlb_powerindex( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )espn_mlb_powerindex( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )
season |
Season year (numeric). Defaults to the most recent MLB season. |
season_type |
Integer (1=preseason, 2=regular (default), 3=postseason). |
... |
Additional arguments; currently unused. |
A long tibble with one row per (team x stat).
| col_name | types | description |
| league | character | League slug ("mlb"). |
| season | integer | Season year. |
| season_type | integer | 1=preseason, 2=regular, 3=postseason. |
| team_id | character | ESPN team id (parsed from team_ref). |
| stat_name | character | Internal ESPN stat key. |
| abbreviation | character | Short stat abbreviation. |
| display_name | character | Human-readable stat name. |
| description | character | Stat description. |
| value | numeric | Stat value. |
| display_value | character | Display-formatted value. |
| last_updated | character | Last-updated timestamp. |
| team_ref | character | $ref to the team-in-season resource.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_powerindex(season = 2025)espn_mlb_powerindex(season = 2025)
Get ESPN MLB schedule for a specific year
espn_mlb_scoreboard(season)espn_mlb_scoreboard(season)
season |
Either numeric or character (YYYYMMDD) |
Returns a tibble with scoreboard data
| col_name | types | description |
| matchup | character | Full game matchup name. |
| matchup_short | character | Short matchup name. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=postseason, 4=off-season). |
| season_slug | character | Season slug. |
| game_id | integer | Unique ESPN game/event identifier. |
| game_uid | character | ESPN game UID. |
| game_date | Date | Game date (YYYY-MM-DD). |
| attendance | integer | Game attendance. |
| play_by_play_available | logical | TRUE if play-by-play is available. |
| was_suspended | logical | Was suspended. |
| notes | logical | Notes. |
| status_name | character | Game status (e.g. 'STATUS_FINAL'). |
| broadcast_market | character | Broadcast market ('national'/'home'/'away'). |
| broadcast_name | character | Broadcast network name. |
| batting_leader_value | numeric | Team batting: batting leader value. |
| batting_leader_stat | character | Team batting: batting leader stat. |
| batting_leader_name | character | Team batting: batting leader name. |
| batting_leader_shortname | character | Team batting: batting leader shortname. |
| batting_leader_headshot | character | Team batting: batting leader headshot. |
| batting_leader_team_id | character | Team batting: batting leader team id. |
| batting_leader_pos | character | Team batting: batting leader pos. |
| home_run_leader_value | logical | Home run leader value. |
| home_run_leader_stat | logical | Home run leader stat. |
| home_run_leader_name | logical | Home run leader name. |
| home_run_leader_shortname | logical | Home run leader shortname. |
| home_run_leader_headshot | logical | Home run leader headshot. |
| home_run_leader_team_id | logical | Home run leader team id. |
| home_run_leader_pos | logical | Home run leader pos. |
| rbi_leader_value | logical | Rbi leader value. |
| rbi_leader_stat | logical | Rbi leader stat. |
| rbi_leader_name | logical | Rbi leader name. |
| rbi_leader_shortname | logical | Rbi leader shortname. |
| rbi_leader_headshot | logical | Rbi leader headshot. |
| rbi_leader_team_id | logical | Rbi leader team id. |
| rbi_leader_pos | logical | Rbi leader pos. |
| start_date | character | Start date. |
| broadcast | character | Broadcast network. |
| highlights | logical | Highlights. |
| game_date_time | POSIXct | Game start date/time (US/Eastern). |
| home_team_name | character | Home team name. |
| home_team_logo | character | Home team logo. |
| home_team_abb | character | Home team abb. |
| home_team_id | integer | Home team id. |
| home_team_location | character | Home team location. |
| home_team_full_name | character | Home team full name. |
| home_team_color | character | Home team color. |
| home_score | integer | Home team run total after the play. |
| home_win | integer | Home win. |
| home_record | character | Home record. |
| away_team_name | character | Away team name. |
| away_team_logo | character | Away team logo. |
| away_team_abb | character | Away team abb. |
| away_team_id | integer | Away team id. |
| away_team_location | character | Away team location. |
| away_team_full_name | character | Away team full name. |
| away_team_color | character | Away team color. |
| away_score | integer | Away team run total after the play. |
| away_win | integer | Away win. |
| away_record | character | Away record. |
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
# Get schedule from date 2022-11-17 (returns 1000 results, max allowable.) try(espn_mlb_scoreboard(season = 20230423))# Get schedule from date 2022-11-17 (returns 1000 results, max allowable.) try(espn_mlb_scoreboard(season = 20230423))
Returns the list of award IDs given out in an MLB season from
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{season}/awards.
The index only contains IDs and $ref URLs — pass an ID to
espn_mlb_award() for the award name, description, and winners.
espn_mlb_season_awards(season = most_recent_mlb_season(), ...)espn_mlb_season_awards(season = most_recent_mlb_season(), ...)
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A tibble with one row per award.
| col_name | types | description |
| season | integer | Season year. |
| award_id | character | ESPN award identifier. |
| ref | character | Full $ref URL for the award detail. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_awards(season = 2024)espn_mlb_season_awards(season = 2024)
Returns a single-row tibble with top-level draft-year metadata: year,
number of rounds, display name, plus $refs for the deeper sub-resources
(status, athletes, rounds) already wrapped by espn_mlb_draft_status(),
espn_mlb_draft_athletes(), and espn_mlb_draft_rounds().
espn_mlb_season_draft(season = most_recent_mlb_season(), ...)espn_mlb_season_draft(season = most_recent_mlb_season(), ...)
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single-row tibble.
Note: ESPN does not currently populate the MLB draft feed, so this typically returns an empty/metadata-only tibble. When populated:
| col_name | types | description |
| season | integer | Draft season (4-digit year). |
| display_name | character | Draft display name. |
| status | character | Draft status (e.g. 'pre', 'complete'). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_draft(season = 2024)espn_mlb_season_draft(season = 2024)
Returns metadata for one group (conference or division) in one
(MLB season x season-type), plus $ref URLs to its parent group,
children groups, member teams, and standings.
espn_mlb_season_group( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_season_group( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )
group_id |
ESPN group identifier. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Group Detail
A single-row tibble.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| group_id | character | ESPN group id. |
| uid | character | ESPN UID string. |
| name | character | Full name (e.g. "Eastern Conference"). |
| abbreviation | character | Short code (e.g. "EAST"). |
| short_name | character | Short name. |
| midsize_name | character | Mid-size display name. |
| is_conference | logical | Whether this group is a conference. |
| slug | character | URL slug. |
| parent_ref | character | $ref to parent group (if any). |
| children_ref | character | $ref to child-groups endpoint. |
| teams_ref | character | $ref to teams-in-group endpoint. |
| standings_ref | character | $ref to standings endpoint.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_group(group_id = 5, season = 2025)espn_mlb_season_group(group_id = 5, season = 2025)
Returns the list of child groups (e.g. divisions within a conference) for one (MLB season x season-type x parent-group).
espn_mlb_season_group_children( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_season_group_children( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )
group_id |
Parent group identifier. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Group Children Index
A tibble with one row per child group.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| parent_group_id | character | Parent group id (queried). |
| child_group_id | character | Child group id. |
| ref | character | $ref to child group detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_group_children(group_id = 5, season = 2025)espn_mlb_season_group_children(group_id = 5, season = 2025)
Returns the list of team IDs that belong to one group (conference or division) for one (MLB season x season-type).
espn_mlb_season_group_teams( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_season_group_teams( group_id, season = most_recent_mlb_season(), season_type = 2L, ... )
group_id |
ESPN group identifier. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Group Teams Index
A tibble with one row per team in the group.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| group_id | character | ESPN group id. |
| team_id | character | ESPN team id. |
| ref | character | $ref URL to the team-in-season entry.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_group_teams(group_id = 5, season = 2025)espn_mlb_season_group_teams(group_id = 5, season = 2025)
Returns the list of group IDs (conferences / divisions) for one
(MLB season x season-type) via core-v2
/seasons/{season}/types/{season_type}/groups.
espn_mlb_season_groups( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )espn_mlb_season_groups( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
A tibble with one row per group.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| group_id | character | ESPN group id. |
| ref | character | $ref URL for the group detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_groups(season = 2025)espn_mlb_season_groups(season = 2025)
Get ESPN MLB Season Info
Get ESPN MLB Season Info
espn_mlb_season_info(season = most_recent_mlb_season(), ...)espn_mlb_season_info(season = most_recent_mlb_season(), ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A named list of baseballr_data tibbles:
Info, Types, Athletes, Coaches, Teams, Awards.
$ref URL components are returned as character columns and are NOT
auto-resolved – use targeted endpoint functions for details.
Info
| col_name | types | description |
| year | integer | 4-digit year. |
| start_date | character | Start date (YYYY-MM-DD). |
| end_date | character | End date (YYYY-MM-DD). |
| display_name | character | Display name. |
| type_id | character | Type identifier (numeric). |
| type_name | character |
Types / Athletes / Coaches / Teams / Awards
| col_name | types | description |
| count | integer | Count of count. |
| ref | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_info(season = 2025)espn_mlb_season_info(season = 2025)
Returns the per-category leaderboard for one (MLB season x season-type), in long format. Each row is one (category x rank) entry, e.g. "Points Per Game x rank 1 x Aaron Judge".
espn_mlb_season_leaders( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )espn_mlb_season_leaders( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default), 3 = postseason). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Leaders (Long Format)
A long tibble with one row per (category x leader).
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| category_name | character | Internal category key (e.g. "pointsPerGame"). |
| category_display | character | Human-readable category name. |
| category_short | character | Short display name. |
| category_abbrev | character | Stat abbreviation (e.g. "PTS"). |
| rank | integer | Rank within the category (1 = best). |
| athlete_id | character | ESPN athlete id. |
| team_id | character | ESPN team id. |
| display_value | character | Display-formatted value. |
| value | numeric | Numeric leader value. |
| rel | character | Comma-joined rel tags from ESPN. |
| athlete_ref | character | $ref URL to the leader's athlete. |
| team_ref | character | $ref URL to the leader's team.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_leaders(season = 2025)espn_mlb_season_leaders(season = 2025)
Returns the per-week snapshot index for one ranking source (e.g. AP
Top 25). Each row is one weekly snapshot; the ref URL resolves to
the actual ranked teams for that (season-type x week) and will be
wrapped by a forthcoming espn_mlb_week_ranking().
espn_mlb_season_ranking(ranking_id, season = most_recent_mlb_season(), ...)espn_mlb_season_ranking(ranking_id, season = most_recent_mlb_season(), ...)
ranking_id |
ESPN ranking identifier (character or numeric). |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Ranking Detail
A tibble with one row per weekly snapshot.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| ranking_id | character | ESPN ranking id. |
| name | character | Ranking name (e.g. "AP Top 25"). |
| short_name | character | Short name (e.g. "AP Poll"). |
| type | character | Ranking type code (e.g. "ap"). |
| season_type | integer | Season-type id of this snapshot. |
| week | integer | Week number of this snapshot. |
| ref | character | $ref URL for the per-week ranking detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_ranking(ranking_id = 1, season = 2025)espn_mlb_season_ranking(ranking_id = 1, season = 2025)
Returns the index of season-level rankings recorded for one MLB season. MLB typically returns zero rankings (ranking polls are a college concept); the wrapper is provided for completeness. (College-basketball / football ranking equivalents live in the hoopR / wehoop / cfbfastR packages.)
espn_mlb_season_rankings(season = most_recent_mlb_season(), ...)espn_mlb_season_rankings(season = most_recent_mlb_season(), ...)
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season Rankings Index
A tibble with one row per ranking source.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| ranking_id | character | ESPN ranking id. |
| ref | character | $ref URL for the ranking detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_rankings(season = 2025)espn_mlb_season_rankings(season = 2025)
Returns metadata for one season-type within an MLB season: name, abbreviation, start / end dates, and whether it carries groups, standings, or playoff legs.
espn_mlb_season_type(season_type = 2L, season = most_recent_mlb_season(), ...)espn_mlb_season_type(season_type = 2L, season = most_recent_mlb_season(), ...)
season_type |
Season-type id (1 = preseason, 2 = regular (default), 3 = postseason, 4 = off-season). |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season-Type Detail
A single-row tibble.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| type | integer | Numeric type code. |
| name | character | Display name (e.g. "Regular Season"). |
| abbreviation | character | Short code (e.g. "reg"). |
| year | integer | Year stamp. |
| start_date | character | ISO 8601 start date. |
| end_date | character | ISO 8601 end date. |
| has_groups | logical | Whether groups exist for this type. |
| has_standings | logical | Whether standings exist. |
| has_legs | logical | Whether playoff legs exist. |
| slug | character | URL slug. |
| groups_ref | character | $ref to the groups endpoint. |
| weeks_ref | character | $ref to the weeks endpoint. |
| leaders_ref | character | $ref to the leaders endpoint.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_type(season_type = 2, season = 2025)espn_mlb_season_type(season_type = 2, season = 2025)
Returns the index of season-type IDs that exist for one MLB season
(typically 1 = preseason, 2 = regular, 3 = postseason, 4 = off-season).
Pass an ID to espn_mlb_season_type() for the start/end dates and
whether that type carries groups, standings, or legs.
espn_mlb_season_types(season = most_recent_mlb_season(), ...)espn_mlb_season_types(season = most_recent_mlb_season(), ...)
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A tibble with one row per season type.
| col_name | types | description |
| league | character | League slug ("mlb"). |
| season | integer | Season year. |
| season_type | integer | Season-type id (1/2/3/4). |
| ref | character | $ref URL for the type detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_types(season = 2025)espn_mlb_season_types(season = 2025)
Returns metadata for one week (number, start / end dates, text label,
and $ref to the per-week rankings endpoint).
espn_mlb_season_week( week, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_season_week( week, season = most_recent_mlb_season(), season_type = 2L, ... )
week |
Week number. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Season-Week Detail
A single-row tibble.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| week | integer | Week number. |
| text | character | Display label (e.g. "Week 5"). |
| start_date | character | ISO 8601 week start. |
| end_date | character | ISO 8601 week end. |
| rankings_ref | character | $ref to the per-week rankings endpoint.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_week(week = 5, season = 2025)espn_mlb_season_week(week = 5, season = 2025)
Returns the list of week IDs for one (MLB season x season-type). MLB uses a week structure inherited from ESPN's schema, but week-level rankings are populated only for college sports, not MLB.
espn_mlb_season_weeks( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )espn_mlb_season_weeks( season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default), 3 = postseason). |
... |
Additional arguments; currently unused. |
A tibble with one row per week.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| week | integer | Week number (1-based). |
| ref | character | $ref URL for the week detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_season_weeks(season = 2025)espn_mlb_season_weeks(season = 2025)
Get ESPN MLB Seasons
Get ESPN MLB Seasons
espn_mlb_seasons(...)espn_mlb_seasons(...)
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A single baseballr_data tibble with one row per season.
| col_name | types | description |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| start_date | character | Start date (YYYY-MM-DD). |
| end_date | character | End date (YYYY-MM-DD). |
| display_name | character | Display name. |
| season_type_count | integer |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_seasons()espn_mlb_seasons()
Get ESPN MLB's Standings
espn_mlb_standings(year)espn_mlb_standings(year)
year |
Either numeric or character (YYYY) |
A standings data frame
| col_name | types | description |
| team_id | integer | Unique ESPN team identifier. |
| team | character | Team. |
| otlosses | character | Otlosses. |
| otwins | character | Otwins. |
| avgpointsagainst | numeric | Avgpointsagainst. |
| avgpointsfor | numeric | Avgpointsfor. |
| clincher | numeric | Clincher. |
| differential | numeric | Differential. |
| divisionwinpercent | numeric | Divisionwinpercent. |
| gamesbehind | numeric | Gamesbehind. |
| gamesplayed | character | Gamesplayed. |
| leaguewinpercent | numeric | Leaguewinpercent. |
| losses | numeric | Losses. |
| playoffseed | numeric | Playoffseed. |
| pointdifferential | character | Pointdifferential. |
| points | character | Points. |
| pointsagainst | character | Pointsagainst. |
| pointsfor | character | Pointsfor. |
| streak | numeric | Streak. |
| ties | character | Ties. |
| winpercent | numeric | Winpercent. |
| wins | numeric | Wins. |
| divisiongamesbehind | character | Divisiongamesbehind. |
| divisionpercent | character | Divisionpercent. |
| divisiontied | character | Divisiontied. |
| homelosses | character | Homelosses. |
| hometies | character | Hometies. |
| homewins | character | Homewins. |
| magicnumberdivision | character | Magicnumberdivision. |
| magicnumberwildcard | character | Magicnumberwildcard. |
| playoffpercent | character | Playoffpercent. |
| roadlosses | character | Roadlosses. |
| roadties | character | Roadties. |
| roadwins | character | Roadwins. |
| wildcardpercent | character | Wildcardpercent. |
| total | character | Total. |
| home | character | Home. |
| road | character | Road. |
| intradivision | character | Intradivision. |
| intraleague | character | Intraleague. |
| lasttengames | character | Lasttengames. |
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_standings(year = 2021))try(espn_mlb_standings(year = 2021))
Get ESPN MLB Team Detail
Get ESPN MLB Team Detail
espn_mlb_team(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier (character or numeric). |
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A named list of data frames: Info, Record, NextEvent,
StandingSummary, Coaches.
Info
| col_name | types | description |
| id | character | Id. |
| uid | character | ESPN UID string (universal identifier). |
| slug | character | URL-safe identifier. |
| abbreviation | character | Short abbreviation. |
| display_name | character | Display name. |
| short_display_name | character | Short display name. |
| name | character | Display name. |
| nickname | character | Team or athlete nickname. |
| location | character | Location. |
| color | character | Primary color (hex without leading '#'). |
| alternate_color | character | Alternate color (hex without leading '#'). |
| logo | character | Team or league logo URL. |
Record
| col_name | types | description |
| type | character | Record type / category. |
| summary | character | |
| stats | list |
NextEvent
| col_name | types | description |
| id | character | Id. |
| date | character | Date in YYYY-MM-DD format. |
| name | character | Display name. |
| short_name | character | Short display name. |
StandingSummary
| col_name | types | description |
| standing_summary | character |
Coaches
| col_name | types | description |
| id | character | Id. |
| first_name | character | Player's first name. |
| last_name | character | Player's last name. |
| experience | integer | Years of professional experience. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team(team_id = "13", season = 2025)espn_mlb_team(team_id = "13", season = 2025)
Get ESPN MLB team box scores
espn_mlb_team_box(game_id)espn_mlb_team_box(game_id)
game_id |
Game ID |
A team boxscore data frame
| col_name | types | description |
| game_id | integer | Unique ESPN game/event identifier. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=postseason, 4=off-season). |
| game_date | Date | Game date (YYYY-MM-DD). |
| game_date_time | POSIXct | Game start date/time (US/Eastern). |
| team_id | integer | Unique ESPN team identifier. |
| team_uid | character | ESPN universal team identifier (UID). |
| team_slug | character | URL-safe team identifier. |
| team_location | character | Team city / location. |
| team_name | character | Team nickname (e.g. 'Yankees'). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name (e.g. 'New York Yankees'). |
| team_short_display_name | character | Short team display name. |
| team_color | character | Team primary color (hex, no leading '#'). |
| team_alternate_color | character | Team alternate color (hex). |
| team_logo | character | Team logo image URL. |
| batting_games_played | character | Team batting: batting games played. |
| batting_team_games_played | character | Team batting: batting team games played. |
| batting_hit_by_pitch | character | Team batting: batting hit by pitch. |
| batting_ground_balls | character | Team batting: batting ground balls. |
| batting_strikeouts | character | Team batting: batting strikeouts. |
| batting_rb_is | character | Team batting: batting rb is. |
| batting_sac_hits | character | Team batting: batting sac hits. |
| batting_hits | character | Team batting: batting hits. |
| batting_stolen_bases | character | Team batting: batting stolen bases. |
| batting_walks | character | Team batting: batting walks. |
| batting_catcher_interference | character | Team batting: batting catcher interference. |
| batting_runs | character | Team batting: batting runs. |
| batting_gid_ps | character | Team batting: batting gid ps. |
| batting_sac_flies | character | Team batting: batting sac flies. |
| batting_at_bats | character | Team batting: batting at bats. |
| batting_home_runs | character | Team batting: batting home runs. |
| batting_grand_slam_home_runs | character | Team batting: batting grand slam home runs. |
| batting_runners_left_on_base | character | Team batting: batting runners left on base. |
| batting_triples | character | Team batting: batting triples. |
| batting_game_winning_rb_is | character | Team batting: batting game winning rb is. |
| batting_intentional_walks | character | Team batting: batting intentional walks. |
| batting_doubles | character | Team batting: batting doubles. |
| batting_fly_balls | character | Team batting: batting fly balls. |
| batting_caught_stealing | character | Team batting: batting caught stealing. |
| batting_pitches | character | Team batting: batting pitches. |
| batting_games_started | character | Team batting: batting games started. |
| batting_pinch_at_bats | character | Team batting: batting pinch at bats. |
| batting_pinch_hits | character | Team batting: batting pinch hits. |
| batting_player_rating | character | Team batting: batting player rating. |
| batting_is_qualified | character | Team batting: batting is qualified. |
| batting_is_qualified_steals | character | Team batting: batting is qualified steals. |
| batting_total_bases | character | Team batting: batting total bases. |
| batting_plate_appearances | character | Team batting: batting plate appearances. |
| batting_projected_home_runs | character | Team batting: batting projected home runs. |
| batting_extra_base_hits | character | Team batting: batting extra base hits. |
| batting_runs_created | character | Team batting: batting runs created. |
| batting_avg | character | Team batting: batting average. |
| batting_pinch_avg | character | Team batting: batting pinch avg. |
| batting_slug_avg | character | Team batting: batting slug avg. |
| batting_secondary_avg | character | Team batting: batting secondary avg. |
| batting_on_base_pct | character | Team batting: batting on base pct. |
| batting_ops | character | Team batting: batting ops. |
| batting_ground_to_fly_ratio | character | Team batting: batting ground to fly ratio. |
| batting_runs_created_per27outs | character | Team batting: batting runs created per27outs. |
| batting_batter_rating | character | Team batting: batting batter rating. |
| batting_at_bats_per_home_run | character | Team batting: batting at bats per home run. |
| batting_stolen_base_pct | character | Team batting: batting stolen base pct. |
| batting_pitches_per_plate_appearance | character | Team batting: batting pitches per plate appearance. |
| batting_isolated_power | character | Team batting: batting isolated power. |
| batting_walk_to_strikeout_ratio | character | Team batting: batting walk to strikeout ratio. |
| batting_walks_per_plate_appearance | character | Team batting: batting walks per plate appearance. |
| batting_secondary_avg_minus_ba | character | Team batting: batting secondary avg minus ba. |
| batting_runs_produced | character | Team batting: batting runs produced. |
| batting_runs_ratio | character | Team batting: batting runs ratio. |
| ...and 128 further ESPN stat columns (full batting / pitching / fielding stat set). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_team_box(game_id = 401071880))try(espn_mlb_team_box(game_id = 401071880))
Get ESPN MLB current team roster
espn_mlb_team_current_roster(team_id)espn_mlb_team_current_roster(team_id)
team_id |
Either numeric or character (YYYY) |
A teams data frame
| col_name | types | description |
| team_id | integer | Unique ESPN team identifier. |
| team_uid | character | ESPN universal team identifier (UID). |
| team_slug | character | URL-safe team identifier. |
| team_location | character | Team city / location. |
| team_name | character | Team nickname (e.g. 'Yankees'). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name (e.g. 'New York Yankees'). |
| team_short_name | character | Team short name. |
| team_color | character | Team primary color (hex, no leading '#'). |
| team_alternate_color | character | Team alternate color (hex). |
| team_is_active | logical | Team is active. |
| franchise..ref | character | Franchise..ref. |
| franchise.id | character | Franchise.id. |
| franchise.uid | character | Franchise.uid. |
| franchise.slug | character | Franchise.slug. |
| franchise.location | character | Franchise.location. |
| franchise.name | character | Franchise.name. |
| franchise.abbreviation | character | Franchise.abbreviation. |
| franchise.displayName | character | Franchise.displayName. |
| franchise.shortDisplayName | character | Franchise.shortDisplayName. |
| franchise.color | character | Franchise.color. |
| franchise.isActive | logical | Franchise.isActive. |
| franchise.venue..ref | character | Franchise.venue..ref. |
| franchise.venue.id | character | Franchise.venue.id. |
| franchise.venue.fullName | character | Franchise.venue.fullName. |
| franchise.venue.shortName | character | Franchise.venue.shortName. |
| franchise.venue.address.city | character | Franchise.venue.address.city. |
| franchise.venue.address.state | character | Franchise.venue.address.state. |
| franchise.venue.address.zipCode | character | Franchise.venue.address.zipCode. |
| franchise.venue.grass | logical | Franchise.venue.grass. |
| franchise.venue.indoor | logical | Franchise.venue.indoor. |
| franchise.venue.images.href | character | Franchise.venue.images.href. |
| franchise.venue.images.width | integer | Franchise.venue.images.width. |
| franchise.venue.images.height | integer | Franchise.venue.images.height. |
| franchise.venue.images.alt | character | Franchise.venue.images.alt. |
| franchise.venue.images.rel | list | Franchise.venue.images.rel. |
| franchise..ref.1 | character | Franchise..ref.1. |
| franchise..ref.2 | character | Franchise..ref.2. |
| standingSummary | character | StandingSummary. |
| logo | character | Logo image URL. |
| logo_dark | character | Dark-mode logo image URL. |
| group_id | integer | Group id. |
| parent_group_id | integer | Parent group id. |
| group_is_conference | logical | Group is conference. |
| conference_id | integer | Conference id. |
| athlete_id | integer | Unique ESPN athlete identifier. |
| athlete_uid | character | Athlete uid. |
| athlete_guid | character | Athlete guid. |
| athlete_type | character | Athlete type. |
| athlete_first_name | character | Athlete first name. |
| athlete_last_name | character | Athlete last name. |
| athlete_full_name | character | Athlete full name. |
| athlete_display_name | character | Athlete display name (full). |
| athlete_short_name | character | Athlete short display name. |
| athlete_weight | integer | Athlete weight. |
| athlete_display_weight | character | Athlete display weight. |
| athlete_height | integer | Athlete height. |
| athlete_display_height | character | Athlete display height. |
| athlete_age | integer | Athlete age. |
| athlete_date_of_birth | character | Athlete date of birth. |
| athlete_slug | character | Athlete slug. |
| athlete_jersey | character | Athlete jersey. |
| athlete_linked | logical | Athlete linked. |
| athlete_active | logical | Athlete active. |
| athlete_positions | list | Athlete positions. |
| athlete_hot_zones | list | Athlete hot zones. |
| athlete_debut_year | integer | Athlete debut year. |
| athlete_nickname | character | Athlete nickname. |
| athlete_middle_name | character | Athlete middle name. |
| athlete_citizenship | character | Athlete citizenship. |
| athlete_alternate_ids_sdr | character | Athlete alternate ids sdr. |
| athlete_birth_place_city | character | Athlete birth place city. |
| athlete_birth_place_state | character | Athlete birth place state. |
| athlete_birth_place_country | character | Athlete birth place country. |
| athlete_position_id | character | Athlete position id. |
| athlete_position_name | character | Athlete fielding position (e.g. 'Shortstop', 'Pitcher'). |
| athlete_position_display_name | character | Athlete position display name. |
| athlete_position_abbreviation | character | Position abbreviation (e.g. 'SS', 'P'). |
| athlete_position_leaf | logical | Athlete position leaf. |
| athlete_experience_years | integer | Athlete experience years. |
| athlete_debut_year_2 | integer | Athlete debut year 2. |
| athlete_status_id | character | Athlete status id. |
| athlete_status_name | character | Athlete status name. |
| athlete_status_type | character | Athlete status type. |
| athlete_status_abbreviation | character | Athlete status abbreviation. |
| athlete_bats_type | character | Athlete bats type. |
| athlete_bats_abbreviation | character | Athlete bats abbreviation. |
| athlete_bats_display_value | character | Athlete bats display value. |
| athlete_throws_type | character | Athlete throws type. |
| athlete_throws_abbreviation | character | Athlete throws abbreviation. |
| athlete_throws_display_value | character | Athlete throws display value. |
| athlete_headshot_href | character | Athlete headshot href. |
| athlete_draft_display_text | character | Athlete draft display text. |
| athlete_draft_round | integer | Athlete draft round. |
| athlete_draft_year | integer | Athlete draft year. |
| athlete_draft_selection | integer | Athlete draft selection. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_team_current_roster(team_id = 13))try(espn_mlb_team_current_roster(team_id = 13))
Returns the team's depth chart in long format, one row per (position × rank × athlete). MLB-only at ESPN's core-v2.
espn_mlb_team_depthchart(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team_depthchart(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier. |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Team Depth Chart (Long Format)
A long tibble with one row per athlete depth entry.
| col_name | types | description |
| league | character | League slug. |
| team_id | character | ESPN team id. |
| season | integer | Season year. |
| depthchart_id | character | Depth chart id (typically "1"). |
| depthchart_name | character | Depth chart name. |
| position | character | Position code (pg/sg/sf/pf/c). |
| rank | integer | Depth rank (1 = starter). |
| athlete_id | character | ESPN athlete id. |
| athlete_ref | character | $ref URL to athlete-in-season. |
| position_ref | character | $ref URL to position resource.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_depthchart(team_id = 13, season = 2025)espn_mlb_team_depthchart(team_id = 13, season = 2025)
espn_mlb_teams(), espn_mlb_team(): Team list and single-team detail.
espn_mlb_team_roster(), espn_mlb_team_current_roster(): Team rosters.
espn_mlb_team_schedule(): Team schedule.
espn_mlb_team_stats(), espn_mlb_team_season_statistics(): Team statistics.
espn_mlb_team_record(), espn_mlb_team_record_detail(): Team records.
espn_mlb_team_leaders(): Team statistical leaders.
espn_mlb_team_injuries(), espn_mlb_team_news(): Team injuries and news.
espn_mlb_team_depthchart(): Team depth chart.
espn_mlb_standings(): League standings.
espn_mlb_leaders(): League-wide statistical leaders.
Team- and league-level ESPN endpoints: team lists and detail, rosters, schedules, statistics, records, leaders, injuries, news, and standings.
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
Get ESPN MLB Team Injuries
Get ESPN MLB Team Injuries
espn_mlb_team_injuries(team_id, ...)espn_mlb_team_injuries(team_id, ...)
team_id |
ESPN team identifier (character or numeric; passed as-is).
Use |
... |
Currently unused; reserved for future argument threading. |
Returns a tibble of injury records for the specified MLB team. Returns an empty tibble (zero rows) when the team has no reported injuries.
Injuries
| col_name | types | description |
| team_id | character | Unique team identifier. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| position | character | Listed roster position (G, F, C, etc.). |
| status | character | Status label. |
| date | character | Date in YYYY-MM-DD format. |
| type | character | Record type / category. |
| side | character | Side label (e.g. 'home', 'away', or 'overUnder'). |
| returns_at | character | |
| short_comment | character | |
| long_comment | character | Long-form play / event comment. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_injuries(team_id = "13")espn_mlb_team_injuries(team_id = "13")
Get ESPN MLB Team Leaders
Get ESPN MLB Team Leaders
espn_mlb_team_leaders(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team_leaders(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single long-format tibble (one row per category-rank-athlete).
| col_name | types | description |
| team_id | character | Unique team identifier. |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| category | character | Category label. |
| display_name | character | Display name. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| value | numeric | Numeric or string value field. |
| rank | integer | Rank. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_leaders(team_id = "13", season = 2025)espn_mlb_team_leaders(team_id = "13", season = 2025)
Get ESPN MLB Team News
Get ESPN MLB Team News
espn_mlb_team_news(team_id, limit = 25)espn_mlb_team_news(team_id, limit = 25)
team_id |
character or integer. ESPN team ID (e.g. |
limit |
integer. Maximum number of articles to return. Default |
Retrieve ESPN MLB news for a specific team. Uses
getOption("baseballr.proxy") or http_proxy/https_proxy environment
variables for proxy configuration (per-call proxy override is not
supported for ESPN wrappers).
Returns a tibble of team news articles.
| col_name | types | description |
| id | character | Id. |
| type | character | Record type / category. |
| headline | character | News headline. |
| description | character | Long-form description text. |
| published | character | Publication timestamp (ISO 8601). |
| premium | logical | |
| byline | character | News article byline / author. |
| link_web | character | Web link / URL. |
| league_id | character | ESPN league identifier. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_news(team_id = "13", limit = 5)espn_mlb_team_news(team_id = "13", limit = 5)
Returns the long-format odds-records breakdown for a team in one season. Each row is one (category × stat) — typical categories include Money Line Overall, Money Line Home, Money Line Road, Against The Spread Overall, Over/Under, etc. ESPN's coverage of this endpoint is sparse; many (team × season-type) combinations return 404, in which case the wrapper returns an empty tibble.
espn_mlb_team_odds_records( team_id, season = most_recent_mlb_season(), season_type = 0L, ... )espn_mlb_team_odds_records( team_id, season = most_recent_mlb_season(), season_type = 0L, ... )
team_id |
ESPN team identifier. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id. ESPN populates odds-records mostly
under |
... |
Additional arguments; currently unused. |
A long tibble with one row per (category × stat).
| col_name | types | description |
| league | character | League slug. |
| team_id | character | ESPN team identifier. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| category_type | character | Category type code (e.g. "moneyLineOverall"). |
| category_abbrev | character | Category abbreviation (e.g. "ML"). |
| category_short | character | Short display. |
| category_display | character | Full category name. |
| stat_type | character | Stat type code (e.g. "win", "loss"). |
| stat_abbrev | character | Stat abbreviation (e.g. "W", "L"). |
| stat_display | character | Stat display name. |
| value | numeric | Numeric stat value. |
| display_value | character | Display-formatted value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_odds_records(team_id = 13, season = 2026)espn_mlb_team_odds_records(team_id = 13, season = 2026)
Returns the long-format record breakdown for an MLB team in one season
and season-type. Each row is one record type (Overall, Home, Road,
vs Conference, vs Division, etc.). Backed by
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{season}/types/{season_type}/teams/{team_id}/record.
espn_mlb_team_record( team_id, season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )espn_mlb_team_record( team_id, season = most_recent_mlb_season(), season_type = c(2L, 3L), ... )
team_id |
ESPN team identifier. |
season |
Season year (numeric). Defaults to most recent MLB season. |
season_type |
Integer (2 = regular season default; 3 = postseason). |
... |
Additional arguments; currently unused. |
A tibble with one row per record category.
| col_name | types | description |
| league | character | League slug ("mlb"). |
| team_id | character | ESPN team identifier. |
| season | integer | Season year. |
| season_type | integer | Season type (1/2/3). |
| record_id | character | Record sub-id. |
| name | character | Internal record name (e.g. "overall"). |
| abbreviation | character | Abbreviation (e.g. "Total"). |
| display_name | character | Display name (e.g. "Overall"). |
| short_display_name | character | Short display (e.g. "OVER"). |
| description | character | Description (e.g. "Overall Record"). |
| type | character | Record type code (total, home, ...). |
| summary | character | W-L summary (e.g. "50-32"). |
| display_value | character | Same as summary in most cases. |
| value | numeric | Win percentage (0-1). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_record(team_id = 13, season = 2025)espn_mlb_team_record(team_id = 13, season = 2025)
Returns one team's record detail in long format: one row per stat in
the record's stats[] array. Use espn_mlb_team_record() to enumerate
available record_id values per team-season (overall / home / away /
conference + per-opponent breakdowns).
espn_mlb_team_record_detail(team_id, season, record_id, season_type = 2L, ...)espn_mlb_team_record_detail(team_id, season, record_id, season_type = 2L, ...)
team_id |
ESPN team identifier. |
season |
Season year (numeric). |
record_id |
Record identifier (from |
season_type |
Integer season type: 1 = preseason, 2 = regular (default), 3 = postseason. |
... |
Additional arguments; currently unused. |
A long tibble.
| col_name | types | description |
| league | character | League. |
| team_id | character | Unique ESPN team identifier. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=post). |
| record_id | character | Record id. |
| record_name | character | Record name. |
| record_abbrev | character | Record abbrev. |
| record_display | character | Record display. |
| record_type | character | Record type id. |
| record_summary | character | Record summary. |
| stat_name | character | Statistic name. |
| stat_abbrev | character | Stat abbrev. |
| stat_display | character | Stat display. |
| value | numeric | Numeric value. |
| stat_display_value | character | Statistic display value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_record_detail(team_id = 13, season = 2024, record_id = 0)espn_mlb_team_record_detail(team_id = 13, season = 2024, record_id = 0)
Get ESPN MLB Team Roster
Get ESPN MLB Team Roster
espn_mlb_team_roster(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team_roster(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single tibble with one row per athlete.
| col_name | types | description |
| athlete_id | character | Unique athlete identifier (ESPN). |
| full_name | character | Player's full name. |
| jersey | character | Jersey number worn by the player. |
| position_abbrev | character | |
| position_name | character | Listed roster position (e.g. 'Pitcher', 'Shortstop', 'Catcher'). |
| height | character | Player height (string e.g. '6-2' or inches). |
| weight | character | Player weight in pounds. |
| age | character | Player age (in years). |
| birth_date | character | Date of birth (YYYY-MM-DD). |
| birth_place | character | Place of birth. |
| headshot | character | Headshot image URL. |
| link_web | character | Web link / URL. |
| status | character | Status label. |
| team_id | character | Unique team identifier. |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_roster(team_id = "13", season = 2025)espn_mlb_team_roster(team_id = "13", season = 2025)
Get ESPN MLB Team Schedule
Get ESPN MLB Team Schedule
espn_mlb_team_schedule( team_id, season = most_recent_mlb_season(), season_type = 2, ... )espn_mlb_team_schedule( team_id, season = most_recent_mlb_season(), season_type = 2, ... )
team_id |
ESPN team identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
season_type |
Integer season type: 1 = preseason, 2 = regular (default), 3 = postseason. |
... |
Additional arguments; currently unused. |
A single tibble with one row per event.
| col_name | types | description |
| event_id | character | Unique event / game identifier (ESPN). |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| season_type | integer | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN). |
| week | integer | Week number within the season. |
| date | character | Date in YYYY-MM-DD format. |
| name | character | Display name. |
| short_name | character | Short display name. |
| opponent_id | character | Unique identifier for opponent. |
| opponent_abbrev | character | Abbreviation for opponent. |
| home_away | character | Game venue label ('home' or 'away'). |
| neutral_site | logical | Neutral site. |
| conference_competition | logical | Conference competition. |
| venue_id | character | Unique venue identifier. |
| venue_name | character | Venue name. |
| venue_city | character | Venue city. |
| venue_state | character | Venue state / region. |
| broadcast | character | Broadcast information string. |
| result | character | Result. |
| team_score | character | Team's score / final score. |
| opponent_score | character | Opponent score. |
| winner | logical | Winner. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_schedule(team_id = "13", season = 2025)espn_mlb_team_schedule(team_id = "13", season = 2025)
Era-correct team identity for an MLB franchise in a specific season,
plus the available $ref URLs for deeper resources (record, statistics,
leaders, coaches, etc.). Backed by the core-v2 endpoint
sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/{season}/teams/{team_id}.
Historical depth goes back to 1947 (MLB founding). Older seasons
return fewer $ref keys; missing refs become NA.
espn_mlb_team_season_profile(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team_season_profile(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier (character or numeric). |
season |
Season year (numeric). Defaults to the most recent MLB season. |
... |
Additional arguments; currently unused. |
A single-row tibble with team identity scalars and _ref URL
columns. Selected columns:
| col_name | types | description |
| id | character | ESPN team identifier. |
| guid | character | Stable cross-league team GUID. |
| uid | character | ESPN UID string. |
| slug | character | URL-safe identifier. |
| location | character | Team city/region (e.g. "Los Angeles"). |
| name | character | Team name (e.g. "Yankees"). |
| abbreviation | character | Short abbreviation (e.g. "LAL"). |
| display_name | character | Full display name. |
| short_display_name | character | Short display name. |
| color | character | Primary color (hex, no leading '#'). |
| alternate_color | character | Alternate color (hex, no leading '#'). |
| is_active | logical | Whether the team was active in this season. |
| season | integer | Season year. |
| logo | character | Primary logo URL. |
| logo_dark | character | Dark-mode logo URL. |
| record_ref | character | $ref to team record resource (if present). |
| statistics_ref | character | $ref to team statistics resource (if present). |
| leaders_ref | character | $ref to team leaders resource (if present). |
| coaches_ref | character | $ref to team coaches resource (if present). |
| depth_charts_ref | character | $ref to depth chart resource (MLB-only). |
| events_ref | character | $ref to team events resource (if present). |
| transactions_ref | character | $ref to team transactions resource (if present). |
| franchise_ref | character | $ref to franchise resource.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_season_profile(team_id = "13", season = 2025)espn_mlb_team_season_profile(team_id = "13", season = 2025)
Returns the per-season team roster as a tibble of athlete IDs from
seasons/{y}/teams/{id}/athletes. Distinct from espn_mlb_team_roster()
which targets a site-v2 endpoint optimized for the current season; this
core-v2 variant is era-correct and available back to ESPN's earliest
season for each league.
espn_mlb_team_season_roster(team_id, season = most_recent_mlb_season(), ...)espn_mlb_team_season_roster(team_id, season = most_recent_mlb_season(), ...)
team_id |
ESPN team identifier. |
season |
Season year. Defaults to most recent MLB season. |
... |
Additional arguments; currently unused. |
Get ESPN MLB Team Roster (Per-Season, core-v2)
A tibble with one row per athlete on the season roster.
| col_name | types | description |
| league | character | League slug. |
| team_id | character | ESPN team id. |
| season | integer | Season year. |
| athlete_id | character | ESPN athlete id. |
| ref | character | $ref URL to athlete-in-season detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_season_roster(team_id = 13, season = 2025)espn_mlb_team_season_roster(team_id = 13, season = 2025)
Returns the full team-season-type statistics sheet for one MLB team in
long format: one row per (category x stat). Each row carries the team's
league rank for that stat where ESPN provides it (rank +
rank_display_value). Complements espn_mlb_team_record() (W-L only)
with the full stat package.
espn_mlb_team_season_statistics( team_id, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_team_season_statistics( team_id, season = most_recent_mlb_season(), season_type = 2L, ... )
team_id |
ESPN team identifier. |
season |
Season year (numeric). Defaults to the most recent MLB season. |
season_type |
Integer season type: 1 = preseason, 2 = regular (default), 3 = postseason. |
... |
Additional arguments; currently unused. |
A long tibble with one row per (category x stat).
| col_name | types | description |
| league | character | League. |
| season | integer | Season (4-digit year). |
| season_type | integer | ESPN season type (1=pre, 2=regular, 3=post). |
| team_id | character | Unique ESPN team identifier. |
| category_name | character | Statistic category name. |
| category_display | character | Category display. |
| stat_name | character | Statistic name. |
| stat_abbrev | character | Stat abbrev. |
| stat_display | character | Stat display. |
| value | numeric | Numeric value. |
| display_value | character | Human-readable value. |
| rank | integer | Rank within the result set. |
| rank_display_value | character | Rank display value. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_team_season_statistics(team_id = 13, season = 2024)espn_mlb_team_season_statistics(team_id = 13, season = 2024)
Get ESPN MLB team stats data
espn_mlb_team_stats(team_id, year, season_type = "regular", total = FALSE)espn_mlb_team_stats(team_id, year, season_type = "regular", total = FALSE)
team_id |
Team ID |
year |
Year |
season_type |
(character, default: regular): Season type - regular or postseason |
total |
(boolean, default: FALSE): Totals |
Returns a tibble with the team stats data
| col_name | types | description |
| team_id | integer | Unique ESPN team identifier. |
| team_guid | character | ESPN team GUID. |
| team_uid | character | ESPN universal team identifier (UID). |
| team_sdr | character | Team sdr. |
| team_slug | character | URL-safe team identifier. |
| team_location | character | Team city / location. |
| team_name | character | Team nickname (e.g. 'Yankees'). |
| team_abbreviation | character | Short team abbreviation (e.g. 'NYY'). |
| team_display_name | character | Full team display name (e.g. 'New York Yankees'). |
| team_short_display_name | character | Short team display name. |
| team_color | character | Team primary color (hex, no leading '#'). |
| team_alternate_color | character | Team alternate color (hex). |
| team_is_active | logical | Team is active. |
| is_all_star | logical | Is all star. |
| logo_href | character | Logo href. |
| logo_dark_href | character | Logo dark href. |
| logos_href_2 | character | Logos href 2. |
| logos_href_3 | character | Logos href 3. |
| logos_href_4 | character | Logos href 4. |
| logos_width_4 | integer | Logos width 4. |
| logos_height_4 | integer | Logos height 4. |
| logos_alt_4 | character | Logos alt 4. |
| logos_rel_full_4 | character | Logos rel full 4. |
| logos_rel_primary_logo_on_white_color | character | Logos rel primary logo on white color. |
| logos_last_updated_4 | character | Logos last updated 4. |
| logos_href_5 | character | Logos href 5. |
| logos_width_5 | integer | Logos width 5. |
| logos_height_5 | integer | Logos height 5. |
| logos_alt_5 | character | Logos alt 5. |
| logos_rel_full_5 | character | Logos rel full 5. |
| logos_rel_primary_logo_on_black_color | character | Logos rel primary logo on black color. |
| logos_last_updated_5 | character | Logos last updated 5. |
| logos_href_6 | character | Logos href 6. |
| logos_width_6 | integer | Logos width 6. |
| logos_height_6 | integer | Logos height 6. |
| logos_alt_6 | character | Logos alt 6. |
| logos_rel_full_6 | character | Logos rel full 6. |
| logos_rel_primary_logo_on_primary_color | character | Logos rel primary logo on primary color. |
| logos_last_updated_6 | character | Logos last updated 6. |
| logos_href_7 | character | Logos href 7. |
| logos_width_7 | integer | Logos width 7. |
| logos_height_7 | integer | Logos height 7. |
| logos_alt_7 | character | Logos alt 7. |
| logos_rel_full_7 | character | Logos rel full 7. |
| logos_rel_primary_logo_on_secondary_color | character | Logos rel primary logo on secondary color. |
| logos_last_updated_7 | character | Logos last updated 7. |
| logos_href_8 | character | Logos href 8. |
| logos_width_8 | integer | Logos width 8. |
| logos_height_8 | integer | Logos height 8. |
| logos_alt_8 | character | Logos alt 8. |
| logos_rel_full_8 | character | Logos rel full 8. |
| logos_rel_primary_logo_black | character | Logos rel primary logo black. |
| logos_last_updated_8 | character | Logos last updated 8. |
| logos_href_9 | character | Logos href 9. |
| logos_width_9 | integer | Logos width 9. |
| logos_height_9 | integer | Logos height 9. |
| logos_alt_9 | character | Logos alt 9. |
| logos_rel_full_9 | character | Logos rel full 9. |
| logos_rel_primary_logo_white | character | Logos rel primary logo white. |
| logos_last_updated_9 | character | Logos last updated 9. |
| ...and 212 further ESPN stat columns (full batting / pitching / fielding stat set). |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_team_stats(team_id = 13, year = 2020))try(espn_mlb_team_stats(team_id = 13, year = 2020))
Get ESPN MLB team names and IDs
espn_mlb_teams()espn_mlb_teams()
A teams data frame
| col_name | types | description |
| abbreviation | character | Short abbreviation. |
| alternate_color | character | Alternate color (hex). |
| color | character | Primary color (hex). |
| display_name | character | Display name. |
| team_id | integer | Unique ESPN team identifier. |
| team | character | Team. |
| logo | character | Logo image URL. |
| logo_dark | character | Dark-mode logo image URL. |
| logos_href_3 | character | Logos href 3. |
| logos_href_4 | character | Logos href 4. |
| logos_href_5 | character | Logos href 5. |
| logos_href_6 | character | Logos href 6. |
| logos_href_7 | character | Logos href 7. |
| logos_href_8 | character | Logos href 8. |
| logos_href_9 | character | Logos href 9. |
| logos_href_10 | character | Logos href 10. |
| logos_href_11 | character | Logos href 11. |
| logos_href_12 | character | Logos href 12. |
| logos_href_13 | character | Logos href 13. |
| logos_href_14 | character | Logos href 14. |
| logos_href_15 | character | Logos href 15. |
| logos_href_16 | character | Logos href 16. |
| mascot | character | Team mascot. |
| nickname | character | Team nickname. |
| short_name | character | Short display name. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
try(espn_mlb_teams())try(espn_mlb_teams())
Returns metadata for a single tournament plus the $ref URL for the
tournament's seasons list. Use espn_mlb_tournament_seasons() to
resolve the seasons.
espn_mlb_tournament(tournament_id, ...)espn_mlb_tournament(tournament_id, ...)
tournament_id |
ESPN tournament identifier. |
... |
Additional arguments; currently unused. |
A single-row tibble.
| col_name | types | description |
| tournament_id | character | ESPN tournament identifier. |
| display_name | character | Human-readable tournament name. |
| seasons_ref | character | $ref to the seasons-list endpoint. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_tournament(tournament_id = 1)espn_mlb_tournament(tournament_id = 1)
Returns single-row detail for one (tournament, season) pair: id,
display name, number of rounds, and $refs to the season + bracketology
resources. Use espn_mlb_tournament_seasons() to enumerate valid
(tournament_id, season) pairs.
espn_mlb_tournament_season(tournament_id, season, ...)espn_mlb_tournament_season(tournament_id, season, ...)
tournament_id |
ESPN tournament identifier. |
season |
Season year (numeric). |
... |
Additional arguments; currently unused. |
A single-row tibble.
Note: MLB has no tournament structure at ESPN, so this returns an empty tibble (the wrapper exists for cross-sport API symmetry). When populated (other sports), the columns are:
| col_name | types | description |
| tournament_id | character | Unique ESPN tournament identifier. |
| season | integer | Season (4-digit year). |
| name | character | Tournament name. |
| display_name | character | Tournament display name. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_tournament_season(tournament_id = 1, season = 2024)espn_mlb_tournament_season(tournament_id = 1, season = 2024)
Returns the seasons in which a given MLB tournament was held.
espn_mlb_tournament_seasons(tournament_id, ...)espn_mlb_tournament_seasons(tournament_id, ...)
tournament_id |
ESPN tournament identifier. |
... |
Additional arguments; currently unused. |
A tibble with one row per season.
| col_name | types | description |
| league | character | League slug ("mlb"). |
| tournament_id | character | ESPN tournament identifier. |
| season | integer | Season year. |
| ref | character | Full $ref URL for that season.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_tournament_seasons(tournament_id = 1)espn_mlb_tournament_seasons(tournament_id = 1)
Returns the index of MLB-branded tournaments tracked by ESPN
(e.g. the in-season tournament). Each row is one tournament with its
ID and the $ref URL.
espn_mlb_tournaments(...)espn_mlb_tournaments(...)
... |
Additional arguments; currently unused. |
A tibble with one row per tournament.
| col_name | types | description |
| tournament_id | character | ESPN tournament identifier. |
| ref | character | Full $ref URL for the detail. |
| league | character | League slug ("mlb").
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_tournaments()espn_mlb_tournaments()
Get ESPN MLB Transactions
Get ESPN MLB Transactions
espn_mlb_transactions(season = most_recent_mlb_season(), limit = 100, ...)espn_mlb_transactions(season = most_recent_mlb_season(), limit = 100, ...)
season |
Season year (numeric, e.g. 2025). Defaults to the most recent MLB season. |
limit |
Maximum number of transactions to return (integer). Default
|
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
Calls the ESPN site-v2 endpoint
https://site.api.espn.com/apis/site/v2/sports/baseball/mlb/transactions?season={year}&limit={limit}.
Releases have a NULL to_team_id; those are stored as NA. Returns an
empty tibble rather than erroring when no transactions are available.
A baseballr_data tibble with one row per transaction:
| col_name | types | description |
| transaction_id | character | |
| date | character | Date in YYYY-MM-DD format. |
| type | character | Record type / category. |
| description | character | Long-form description text. |
| team_id | character | Unique team identifier. |
| athlete_id | character | Unique athlete identifier (ESPN). |
| athlete_name | character | Athlete display name (ESPN). |
| from_team_id | character | |
| to_team_id | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_transactions(season = 2025, limit = 10)espn_mlb_transactions(season = 2025, limit = 10)
Get ESPN MLB Venues
Get ESPN MLB Venues
espn_mlb_venues(...)espn_mlb_venues(...)
... |
Additional arguments; currently unused but retained for
forward compatibility. Proxy configuration should use
|
A single baseballr_data tibble with one row per venue.
| col_name | types | description |
| venue_id | character | Unique venue identifier. |
| name | character | Display name. |
| full_name | character | Player's full name. |
| address_city | character | |
| address_state | character | |
| capacity | integer | |
| indoor | logical | |
| grass | logical | |
| images_url | character |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_venues()espn_mlb_venues()
Returns the long-format ranked teams for one (season x season-type x week x ranking-source). MLB typically returns an empty tibble.
espn_mlb_week_ranking( ranking_id, week, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_week_ranking( ranking_id, week, season = most_recent_mlb_season(), season_type = 2L, ... )
ranking_id |
Ranking source id (1 = AP, 2 = Coaches, etc.). |
week |
Week number. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Per-Week Ranking Detail
A tibble with one row per ranked team (typically 25).
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| week | integer | Week number. |
| ranking_id | character | ESPN ranking id. |
| name | character | Ranking name (e.g. "AP Top 25"). |
| short_name | character | Short name. |
| type | character | Ranking type code. |
| headline | character | Full headline. |
| date | character | Date of the ranking. |
| current | integer | Current rank. |
| previous | integer | Previous-week rank. |
| points | numeric | Voting points. |
| first_place_votes | integer | First-place vote count. |
| trend | character | Trend indicator (e.g. "+3", "-2", "-"). |
| record_summary | character | Team's record at time of poll (e.g. "20-2"). |
| team_id | character | ESPN team id. |
| team_ref | character | $ref to the team-in-season resource. |
| last_updated | character | Last-updated timestamp. |
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_rankings(),
espn_mlb_wp()
espn_mlb_week_ranking(ranking_id = 1, week = 5, season = 2025)espn_mlb_week_ranking(ranking_id = 1, week = 5, season = 2025)
Returns the index of ranking sources available for one (MLB season x season-type x week). MLB does not publish weekly rankings, so this typically returns an empty tibble; the wrapper is provided for completeness with the ESPN schema.
espn_mlb_week_rankings( week, season = most_recent_mlb_season(), season_type = 2L, ... )espn_mlb_week_rankings( week, season = most_recent_mlb_season(), season_type = 2L, ... )
week |
Week number. |
season |
Season year. Defaults to most recent MLB season. |
season_type |
Season-type id (2 = regular (default)). |
... |
Additional arguments; currently unused. |
Get ESPN MLB Per-Week Rankings Index
A tibble with one row per ranking source.
| col_name | types | description |
| league | character | League slug. |
| season | integer | Season year. |
| season_type | integer | Season-type id. |
| week | integer | Week number. |
| ranking_id | character | ESPN ranking id. |
| ref | character | $ref URL for the ranked-teams detail.
|
Saiem Gilani
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_wp()
espn_mlb_week_rankings(week = 5, season = 2025)espn_mlb_week_rankings(week = 5, season = 2025)
Get MLB win probability chart data from ESPN
espn_mlb_wp(game_id)espn_mlb_wp(game_id)
game_id |
(Integer required): Game ID filter for querying a single game |
espn_mlb_wp() - A baseballr_data tibble, one row per win-probability play:
| col_name | types | description |
| game_id | numeric | Unique ESPN game/event identifier. |
| play_id | character | Unique play identifier within the game. |
| home_win_percentage | numeric | Home team win probability (0-1 decimal). |
| away_win_percentage | numeric | Away team win probability (0-1 decimal). |
| tie_percentage | numeric | Tie probability (0-1 decimal; extra-innings tie state). |
| sequence_number | character | Sequence number of the play within the game. |
| text | character | Text description of the play. |
| away_score | integer | Away team run total after the play. |
| home_score | integer | Home team run total after the play. |
| scoring_play | logical | TRUE if the play scored a run. |
| score_value | integer | Runs scored on the play. |
| wallclock | character | Wall-clock timestamp of the play (ISO 8601). |
| at_bat_id | character | Identifier of the at-bat the play belongs to. |
| summary_type | character | Play summary type. |
| outs | integer | Outs in the inning after the play. |
| participants | list | List of athlete participants in the play. |
| type_id | character | Play type identifier. |
| type_text | character | Play type description. |
| type_type | character | Play type category. |
| period_type | character | Period type ('inning'). |
| period_number | integer | Inning number. |
| period_display_value | character | Inning display value (e.g. 'Top 1st'). |
| team_id | character | Batting team identifier. |
| pitch_count_balls | integer | Balls in the count when the pitch was thrown. |
| pitch_count_strikes | integer | Strikes in the count when the pitch was thrown. |
| result_count_balls | integer | Balls in the count after the pitch. |
| result_count_strikes | integer | Strikes in the count after the pitch. |
| bat_order | integer | Batting order spot of the batter. |
| type_alternative_text | character | Alternative play type text. |
| bats_type | character | Batter handedness type. |
| bats_abbreviation | character | Batter handedness (L/R/S). |
| bats_display_value | character | Batter handedness display value. |
| at_bat_pitch_number | integer | Pitch number within the at-bat. |
| pitch_velocity | integer | Pitch velocity (mph). |
| trajectory | character | Batted-ball trajectory. |
| type_abbreviation | character | Play type abbreviation. |
| pitch_coordinate_x | integer | Pitch location x-coordinate. |
| pitch_coordinate_y | integer | Pitch location y-coordinate. |
| pitch_type_id | character | Pitch type identifier. |
| pitch_type_text | character | Pitch type description. |
| pitch_type_abbreviation | character | Pitch type abbreviation. |
| hit_coordinate_x | integer | Batted-ball location x-coordinate. |
| hit_coordinate_y | integer | Batted-ball location y-coordinate. |
| alternative_play | character | Alternative play flag. |
| alternative_type_id | character | Alternative play type id. |
| alternative_type_text | character | Alternative play type text. |
| alternative_type_abbreviation | character | Alternative play type abbreviation. |
| alternative_type_alternative_text | character | Alternative play alternative text. |
| alternative_type_type | character | Alternative play type category. |
| on_first_athlete_id | character | Athlete id of the runner on first base. |
| on_second_athlete_id | character | Athlete id of the runner on second base. |
| on_third_athlete_id | character | Athlete id of the runner on third base. |
Other ESPN MLB Functions:
espn_mlb,
espn_mlb_athletes_index(),
espn_mlb_award(),
espn_mlb_betting(),
espn_mlb_calendar(),
espn_mlb_coach(),
espn_mlb_coach_record(),
espn_mlb_coach_season(),
espn_mlb_coaches(),
espn_mlb_conferences(),
espn_mlb_draft(),
espn_mlb_draft_athlete_detail(),
espn_mlb_draft_athletes(),
espn_mlb_draft_pick(),
espn_mlb_draft_rounds(),
espn_mlb_draft_status(),
espn_mlb_franchise(),
espn_mlb_franchises(),
espn_mlb_freeagents(),
espn_mlb_futures(),
espn_mlb_game_all(),
espn_mlb_game_broadcasts(),
espn_mlb_game_endpoints,
espn_mlb_game_info(),
espn_mlb_game_odds(),
espn_mlb_game_official_detail(),
espn_mlb_game_officials(),
espn_mlb_game_play(),
espn_mlb_game_play_personnel(),
espn_mlb_game_player_box(),
espn_mlb_game_powerindex(),
espn_mlb_game_predictor(),
espn_mlb_game_probabilities(),
espn_mlb_game_probables(),
espn_mlb_game_propbets(),
espn_mlb_game_rosters(),
espn_mlb_game_situation(),
espn_mlb_game_team_leaders(),
espn_mlb_game_team_linescores(),
espn_mlb_game_team_records(),
espn_mlb_game_team_roster(),
espn_mlb_game_team_roster_entry(),
espn_mlb_game_team_score(),
espn_mlb_game_team_statistics(),
espn_mlb_injuries(),
espn_mlb_leaders(),
espn_mlb_news(),
espn_mlb_pbp(),
espn_mlb_player_awards(),
espn_mlb_player_box(),
espn_mlb_player_career_stats(),
espn_mlb_player_contract(),
espn_mlb_player_contracts(),
espn_mlb_player_endpoints,
espn_mlb_player_eventlog(),
espn_mlb_player_eventlog_v2(),
espn_mlb_player_gamelog(),
espn_mlb_player_info(),
espn_mlb_player_overview(),
espn_mlb_player_seasons(),
espn_mlb_player_splits(),
espn_mlb_player_statisticslog(),
espn_mlb_player_stats(),
espn_mlb_player_stats_v3(),
espn_mlb_position(),
espn_mlb_positions(),
espn_mlb_powerindex(),
espn_mlb_scoreboard(),
espn_mlb_season_awards(),
espn_mlb_season_draft(),
espn_mlb_season_group(),
espn_mlb_season_group_children(),
espn_mlb_season_group_teams(),
espn_mlb_season_groups(),
espn_mlb_season_info(),
espn_mlb_season_leaders(),
espn_mlb_season_ranking(),
espn_mlb_season_rankings(),
espn_mlb_season_type(),
espn_mlb_season_types(),
espn_mlb_season_week(),
espn_mlb_season_weeks(),
espn_mlb_seasons(),
espn_mlb_standings(),
espn_mlb_team(),
espn_mlb_team_box(),
espn_mlb_team_current_roster(),
espn_mlb_team_depthchart(),
espn_mlb_team_endpoints,
espn_mlb_team_injuries(),
espn_mlb_team_leaders(),
espn_mlb_team_news(),
espn_mlb_team_odds_records(),
espn_mlb_team_record(),
espn_mlb_team_record_detail(),
espn_mlb_team_roster(),
espn_mlb_team_schedule(),
espn_mlb_team_season_profile(),
espn_mlb_team_season_roster(),
espn_mlb_team_season_statistics(),
espn_mlb_team_stats(),
espn_mlb_teams(),
espn_mlb_tournament(),
espn_mlb_tournament_season(),
espn_mlb_tournament_seasons(),
espn_mlb_tournaments(),
espn_mlb_transactions(),
espn_mlb_venues(),
espn_mlb_week_ranking(),
espn_mlb_week_rankings()
espn_mlb_wp(game_id = 401283399)espn_mlb_wp(game_id = 401283399)
fg_pitcher_game_logs(): Scrape Pitcher Game Logs from FanGraphs.
fg_batter_game_logs(): Scrape Batter Game Logs from FanGraphs.
fg_milb_pitcher_game_logs(): Scrape MiLB game logs for pitchers from Fangraphs, combining 'standard' and 'advanced' tabs.
fg_milb_batter_game_logs(): Scrape MiLB game logs for batters from Fangraphs, combining 'standard' and 'advanced' tabs.
fg_batter_leaders(): Scrape Batter Leaderboards from FanGraphs.
fg_pitcher_leaders(): Scrape Pitcher Leaderboards from FanGraphs.
fg_fielder_leaders(): Scrape Fielder Leaderboards from FanGraphs.
fg_team_batter(): Scrape Team Batter Leaderboards from FanGraphs.
fg_team_pitcher(): Scrape Team Pitcher Leaderboards from FanGraphs.
fg_team_fielder(): Scrape Team Fielder Leaderboards from FanGraphs.
fg_guts(): Scrape FanGraphs.com Guts!.
fg_park(): Scrape Park Factors from FanGraphs.com.
fg_park_hand(): Scrape Park Factors by handedness from FanGraphs.com.
fg_pitcher_game_logs(playerid = 104, year = 2006)
fg_batter_game_logs(playerid = 6184, year = 2017)
fg_milb_pitcher_game_logs(playerid = "sa3004210", year=2017)
fg_milb_batter_game_logs(playerid = "sa917940", year=2018)
fg_batter_leaders(startseason = 2015, endseason = 2015, qual = 400)
fg_pitcher_leaders(startseason = 2015, endseason = 2015, qual = 150)
fg_fielder_leaders(startseason = 2015, endseason = 2015, qual = 150)
fg_team_batter(startseason = 2015, endseason = 2015, qual = 400)
fg_team_pitcher(startseason = 2015, endseason = 2015, qual = 150)
fg_team_fielder(startseason = 2015, endseason = 2015, qual = 150)
fg_guts()
fg_park(2013)
fg_park_hand(2013)
(legacy) Scrape Batter Leaderboards from FanGraphs
(legacy) Scrape Batter Leaderboards from FanGraphs
fg_bat_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" ) fg_bat_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_bat_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" ) fg_bat_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of batter data.
A data frame of batter data.
This function allows you to scrape game logs by year for a batter from FanGraphs.com.
fg_batter_game_logs(playerid, year)fg_batter_game_logs(playerid, year)
playerid |
This is the playerid used by FanGraphs for a given player |
year |
The season for which game logs should be returned (use the YYYY format) |
A data frame of batter game logs, one row per game, with the following columns:
| col_name | types | description |
| PlayerName | character | Player name. |
| playerid | integer | FanGraphs player ID. |
| Date | character | Calendar date of the game (YYYY-MM-DD). |
| Team | character | Team the player appeared for. |
| Opp | character | Opponent team; leading @ indicates a road game. |
| season | integer | Season year. |
| Age | integer | Player age during the season. |
| BatOrder | character | Spot in the batting order. |
| Pos | character | Fielding position played. |
| G | numeric | Games (1 per row). |
| AB | numeric | At-bats. |
| PA | numeric | Plate appearances. |
| H | numeric | Hits. |
| 1B | numeric | Singles. |
| 2B | numeric | Doubles. |
| 3B | numeric | Triples. |
| HR | numeric | Home runs. |
| R | numeric | Runs scored. |
| RBI | numeric | Runs batted in. |
| BB | numeric | Walks (bases on balls). |
| IBB | numeric | Intentional walks. |
| SO | numeric | Strikeouts. |
| HBP | numeric | Times hit by pitch. |
| SF | numeric | Sacrifice flies. |
| SH | numeric | Sacrifice hits (bunts). |
| GDP | numeric | Grounded into double plays. |
| SB | numeric | Stolen bases. |
| CS | numeric | Times caught stealing. |
| AVG | numeric | Batting average. |
| GB | numeric | Ground balls. |
| FB | numeric | Fly balls. |
| LD | numeric | Line drives. |
| IFFB | numeric | Infield fly balls. |
| Pitches | numeric | Pitches seen. |
| Balls | numeric | Balls. |
| Strikes | numeric | Strikes. |
| IFH | numeric | Infield hits. |
| BU | numeric | Bunts. |
| BUH | numeric | Bunt hits. |
| BB% | numeric | Walk rate. |
| K% | numeric | Strikeout rate. |
| BB/K | numeric | Walk-to-strikeout ratio. |
| OBP | numeric | On-base percentage. |
| SLG | numeric | Slugging percentage. |
| OPS | numeric | On-base plus slugging. |
| ISO | numeric | Isolated power. |
| BABIP | numeric | Batting average on balls in play. |
| GB/FB | numeric | Ground-ball to fly-ball ratio. |
| LD% | numeric | Line-drive rate. |
| GB% | numeric | Ground-ball rate. |
| FB% | numeric | Fly-ball rate. |
| IFFB% | numeric | Infield-fly-ball rate. |
| HR/FB | numeric | Home-run-per-fly-ball rate. |
| IFH% | numeric | Infield-hit rate. |
| BUH% | numeric | Bunt-hit rate. |
| wOBA | numeric | Weighted on-base average. |
| wRAA | numeric | Weighted runs above average. |
| wRC | numeric | Weighted runs created. |
| Spd | numeric | Bill James Speed Score. |
| wRC+ | numeric | Weighted runs created plus (100 = average). |
| wBSR | numeric | Weighted base running runs. |
| WPA | numeric | Win probability added. |
| -WPA | numeric | Negative win probability added. |
| +WPA | numeric | Positive win probability added. |
| RE24 | numeric | Run expectancy based on 24 base-out states. |
| REW | numeric | Run expectancy wins. |
| pLI | numeric | Average leverage index. |
| PH | numeric | Pinch-hit appearances. |
| WPA/LI | numeric | Context-neutral win probability added. |
| Clutch | numeric | Clutch performance score. |
| FB%1 | numeric | Fastball usage rate. |
| FBv | numeric | Average four-seam fastball velocity (mph). |
| SL% | numeric | slider usage rate. |
| SLv | numeric | Average slider velocity (mph). |
| CT% | numeric | cutter usage rate. |
| CTv | numeric | Average cutter velocity (mph). |
| CB% | numeric | curveball usage rate. |
| CBv | numeric | Average curveball velocity (mph). |
| CH% | numeric | changeup usage rate. |
| CHv | numeric | Average changeup velocity (mph). |
| SF% | numeric | split-finger fastball usage rate. |
| SFv | numeric | Average split-finger fastball velocity (mph). |
| XX% | numeric | unknown/other pitch usage rate. |
| wFB | numeric | Total runs above average on the fastball. |
| wSL | numeric | Total runs above average on the slider. |
| wCT | numeric | Total runs above average on the cutter. |
| wCB | numeric | Total runs above average on the curveball. |
| wCH | numeric | Total runs above average on the changeup. |
| wSF | numeric | Total runs above average on the split-finger fastball. |
| wFB/C | numeric | Runs above average per 100 fastballs. |
| wSL/C | numeric | Runs above average per 100 sliders. |
| wCT/C | numeric | Runs above average per 100 cutters. |
| wCB/C | numeric | Runs above average per 100 curveballs. |
| wCH/C | numeric | Runs above average per 100 changeups. |
| wSF/C | numeric | Runs above average per 100 split-finger fastballs. |
| O-Swing% | numeric | Swing rate on pitches outside the zone. |
| Z-Swing% | numeric | Swing rate on pitches in the zone. |
| Swing% | numeric | Overall swing rate. |
| O-Contact% | numeric | Contact rate on pitches outside the zone. |
| Z-Contact% | numeric | Contact rate on pitches in the zone. |
| Contact% | numeric | Overall contact rate. |
| Zone% | numeric | Rate of pitches in the strike zone. |
| F-Strike% | numeric | First-pitch strike rate. |
| SwStr% | numeric | Swinging-strike rate. |
| Pull | numeric | Pulled batted balls. |
| Cent | numeric | Batted balls hit up the middle. |
| Oppo | numeric | Opposite-field batted balls. |
| Soft | numeric | Soft-hit batted balls. |
| Med | numeric | Medium-hit batted balls. |
| Hard | numeric | Hard-hit batted balls. |
| bipCount | numeric | Balls in play. |
| Pull% | numeric | Pulled batted-ball rate. |
| Cent% | numeric | Up-the-middle batted-ball rate. |
| Oppo% | numeric | Opposite-field batted-ball rate. |
| Soft% | numeric | Soft-contact rate. |
| Med% | numeric | Medium-contact rate. |
| Hard% | numeric | Hard-contact rate. |
| xwOBA | numeric | Expected weighted on-base average. |
| xAVG | numeric | Expected batting average. |
| xSLG | numeric | Expected slugging percentage. |
| pfxFA% | numeric | PITCHf/x four-seam fastball usage rate. |
| pfxFC% | numeric | PITCHf/x cutter usage rate. |
| pfxFS% | numeric | PITCHf/x splitter usage rate. |
| pfxFO% | numeric | PITCHf/x forkball usage rate. |
| pfxSI% | numeric | PITCHf/x sinker usage rate. |
| pfxSL% | numeric | PITCHf/x slider usage rate. |
| pfxCU% | numeric | PITCHf/x curveball usage rate. |
| pfxKC% | numeric | PITCHf/x knuckle curve usage rate. |
| pfxCH% | numeric | PITCHf/x changeup usage rate. |
| pfxSLO% | numeric | PITCHf/x slurve usage rate. |
| pfxST% | numeric | PITCHf/x sweeper usage rate. |
| pfxCUO% | numeric | PITCHf/x other curve usage rate. |
| pfxCV% | numeric | PITCHf/x curve usage rate. |
| pfxvFA | numeric | PITCHf/x average four-seam fastball velocity (mph). |
| pfxvFC | numeric | PITCHf/x average cutter velocity (mph). |
| pfxvFS | numeric | PITCHf/x average splitter velocity (mph). |
| pfxvFO | numeric | PITCHf/x average forkball velocity (mph). |
| pfxvSI | numeric | PITCHf/x average sinker velocity (mph). |
| pfxvSL | numeric | PITCHf/x average slider velocity (mph). |
| pfxvCU | numeric | PITCHf/x average curveball velocity (mph). |
| pfxvKC | numeric | PITCHf/x average knuckle curve velocity (mph). |
| pfxvCH | numeric | PITCHf/x average changeup velocity (mph). |
| pfxvSLO | numeric | PITCHf/x average slurve velocity (mph). |
| pfxvST | numeric | PITCHf/x average sweeper velocity (mph). |
| pfxvCUO | numeric | PITCHf/x average other curve velocity (mph). |
| pfxvCV | numeric | PITCHf/x average curve velocity (mph). |
| pfxFA-X | numeric | PITCHf/x horizontal movement of the four-seam fastball (inches). |
| pfxFC-X | numeric | PITCHf/x horizontal movement of the cutter (inches). |
| pfxFS-X | numeric | PITCHf/x horizontal movement of the splitter (inches). |
| pfxFO-X | numeric | PITCHf/x horizontal movement of the forkball (inches). |
| pfxSI-X | numeric | PITCHf/x horizontal movement of the sinker (inches). |
| pfxSL-X | numeric | PITCHf/x horizontal movement of the slider (inches). |
| pfxCU-X | numeric | PITCHf/x horizontal movement of the curveball (inches). |
| pfxKC-X | numeric | PITCHf/x horizontal movement of the knuckle curve (inches). |
| pfxCH-X | numeric | PITCHf/x horizontal movement of the changeup (inches). |
| pfxSLO-X | numeric | PITCHf/x horizontal movement of the slurve (inches). |
| pfxST-X | numeric | PITCHf/x horizontal movement of the sweeper (inches). |
| pfxCUO-X | numeric | PITCHf/x horizontal movement of the other curve (inches). |
| pfxCV-X | numeric | PITCHf/x horizontal movement of the curve (inches). |
| pfxFA-Z | numeric | PITCHf/x vertical movement of the four-seam fastball (inches). |
| pfxFC-Z | numeric | PITCHf/x vertical movement of the cutter (inches). |
| pfxFS-Z | numeric | PITCHf/x vertical movement of the splitter (inches). |
| pfxFO-Z | numeric | PITCHf/x vertical movement of the forkball (inches). |
| pfxSI-Z | numeric | PITCHf/x vertical movement of the sinker (inches). |
| pfxSL-Z | numeric | PITCHf/x vertical movement of the slider (inches). |
| pfxCU-Z | numeric | PITCHf/x vertical movement of the curveball (inches). |
| pfxKC-Z | numeric | PITCHf/x vertical movement of the knuckle curve (inches). |
| pfxCH-Z | numeric | PITCHf/x vertical movement of the changeup (inches). |
| pfxSLO-Z | numeric | PITCHf/x vertical movement of the slurve (inches). |
| pfxST-Z | numeric | PITCHf/x vertical movement of the sweeper (inches). |
| pfxCUO-Z | numeric | PITCHf/x vertical movement of the other curve (inches). |
| pfxCV-Z | numeric | PITCHf/x vertical movement of the curve (inches). |
| pfxwFA | numeric | PITCHf/x total runs above average on the four-seam fastball. |
| pfxwFC | numeric | PITCHf/x total runs above average on the cutter. |
| pfxwFS | numeric | PITCHf/x total runs above average on the splitter. |
| pfxwFO | numeric | PITCHf/x total runs above average on the forkball. |
| pfxwSI | numeric | PITCHf/x total runs above average on the sinker. |
| pfxwSL | numeric | PITCHf/x total runs above average on the slider. |
| pfxwCU | numeric | PITCHf/x total runs above average on the curveball. |
| pfxwKC | numeric | PITCHf/x total runs above average on the knuckle curve. |
| pfxwCH | numeric | PITCHf/x total runs above average on the changeup. |
| pfxwSLO | numeric | PITCHf/x total runs above average on the slurve. |
| pfxwST | numeric | PITCHf/x total runs above average on the sweeper. |
| pfxwCUO | numeric | PITCHf/x total runs above average on the other curve. |
| pfxwCV | numeric | PITCHf/x total runs above average on the curve. |
| pfxwFA/C | numeric | PITCHf/x runs above average per 100 four-seam fastballs. |
| pfxwFC/C | numeric | PITCHf/x runs above average per 100 cutters. |
| pfxwFS/C | numeric | PITCHf/x runs above average per 100 splitters. |
| pfxwFO/C | numeric | PITCHf/x runs above average per 100 forkballs. |
| pfxwSI/C | numeric | PITCHf/x runs above average per 100 sinkers. |
| pfxwSL/C | numeric | PITCHf/x runs above average per 100 sliders. |
| pfxwCU/C | numeric | PITCHf/x runs above average per 100 curveballs. |
| pfxwKC/C | numeric | PITCHf/x runs above average per 100 knuckle curves. |
| pfxwCH/C | numeric | PITCHf/x runs above average per 100 changeups. |
| pfxwSLO/C | numeric | PITCHf/x runs above average per 100 slurves. |
| pfxwST/C | numeric | PITCHf/x runs above average per 100 sweepers. |
| pfxwCUO/C | numeric | PITCHf/x runs above average per 100 other curves. |
| pfxwCV/C | numeric | PITCHf/x runs above average per 100 curves. |
| pfxaaFA | numeric | PITCHf/x average spin/active component on the four-seam fastball. |
| pfxaaFC | numeric | PITCHf/x average spin/active component on the cutter. |
| pfxaaFS | numeric | PITCHf/x average spin/active component on the splitter. |
| pfxaaFO | numeric | PITCHf/x average spin/active component on the forkball. |
| pfxaaSI | numeric | PITCHf/x average spin/active component on the sinker. |
| pfxaaSL | numeric | PITCHf/x average spin/active component on the slider. |
| pfxaaCU | numeric | PITCHf/x average spin/active component on the curveball. |
| pfxaaKC | numeric | PITCHf/x average spin/active component on the knuckle curve. |
| pfxaaCH | numeric | PITCHf/x average spin/active component on the changeup. |
| pfxaaSLO | numeric | PITCHf/x average spin/active component on the slurve. |
| pfxaaST | numeric | PITCHf/x average spin/active component on the sweeper. |
| pfxaaCUO | numeric | PITCHf/x average spin/active component on the other curve. |
| pfxaaCV | numeric | PITCHf/x average spin/active component on the curve. |
| pfxspFA | numeric | PITCHf/x average spin rate on the four-seam fastball (rpm). |
| pfxspFC | numeric | PITCHf/x average spin rate on the cutter (rpm). |
| pfxspFS | numeric | PITCHf/x average spin rate on the splitter (rpm). |
| pfxspFO | numeric | PITCHf/x average spin rate on the forkball (rpm). |
| pfxspSI | numeric | PITCHf/x average spin rate on the sinker (rpm). |
| pfxspSL | numeric | PITCHf/x average spin rate on the slider (rpm). |
| pfxspCU | numeric | PITCHf/x average spin rate on the curveball (rpm). |
| pfxspKC | numeric | PITCHf/x average spin rate on the knuckle curve (rpm). |
| pfxspCH | numeric | PITCHf/x average spin rate on the changeup (rpm). |
| pfxspSLO | numeric | PITCHf/x average spin rate on the slurve (rpm). |
| pfxspST | numeric | PITCHf/x average spin rate on the sweeper (rpm). |
| pfxspCUO | numeric | PITCHf/x average spin rate on the other curve (rpm). |
| pfxspCV | numeric | PITCHf/x average spin rate on the curve (rpm). |
| pfxO-Swing% | numeric | PITCHf/x Swing rate on pitches outside the zone. |
| pfxZ-Swing% | numeric | PITCHf/x Swing rate on pitches in the zone. |
| pfxSwing% | numeric | PITCHf/x Overall swing rate. |
| pfxO-Contact% | numeric | PITCHf/x Contact rate on pitches outside the zone. |
| pfxZ-Contact% | numeric | PITCHf/x Contact rate on pitches in the zone. |
| pfxContact% | numeric | PITCHf/x Overall contact rate. |
| pfxZone% | numeric | PITCHf/x Rate of pitches in the strike zone. |
| pfxPace | numeric | PITCHf/x Average seconds between pitches. |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing% | numeric | Rate of fast swings. |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact% | numeric | Squared-up rate per contact. |
| SquaredUpSwing% | numeric | Squared-up rate per swing. |
| BlastContact% | numeric | Blast rate per contact. |
| BlastSwing% | numeric | Blast rate per swing. |
| Swords | numeric | Swords (especially ugly swinging strikeouts). |
| CompetitiveSwings | numeric | Competitive swings. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle% | numeric | Rate of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average depth in the batter's box (inches). |
| DistanceOffPlate | numeric | Average distance off the plate (inches). |
| scH-Swing% | numeric | Statcast heart-zone swing rate. |
| scH-Contact% | numeric | Statcast heart-zone contact rate. |
| scH-Zone% | numeric | Statcast heart-zone zone rate. |
| scS-Swing% | numeric | Statcast shadow-zone swing rate. |
| scS-Contact% | numeric | Statcast shadow-zone contact rate. |
| scS-Zone% | numeric | Statcast shadow-zone zone rate. |
| scC-Swing% | numeric | Statcast chase-zone swing rate. |
| scC-Contact% | numeric | Statcast chase-zone contact rate. |
| scC-Zone% | numeric | Statcast chase-zone zone rate. |
| scW-Swing% | numeric | Statcast waste-zone swing rate. |
| scW-Contact% | numeric | Statcast waste-zone contact rate. |
| scW-Zone% | numeric | Statcast waste-zone zone rate. |
| scSI-Swing% | numeric | Statcast in-zone strike-zone swing rate. |
| scSI-Contact% | numeric | Statcast in-zone strike-zone contact rate. |
| scSI-Zone% | numeric | Statcast in-zone strike-zone zone rate. |
| scSO-Swing% | numeric | Statcast out-of-zone strike-zone swing rate. |
| scSO-Contact% | numeric | Statcast out-of-zone strike-zone contact rate. |
| scSO-Zone% | numeric | Statcast out-of-zone strike-zone zone rate. |
| scO-Swing% | numeric | Statcast out-of-zone-zone swing rate. |
| scO-Contact% | numeric | Statcast out-of-zone-zone contact rate. |
| scO-Zone% | numeric | Statcast out-of-zone-zone zone rate. |
| scZ-Swing% | numeric | Statcast in-zone-zone swing rate. |
| scZ-Contact% | numeric | Statcast in-zone-zone contact rate. |
| scZ-Zone% | numeric | Statcast in-zone-zone zone rate. |
| piCH% | numeric | PITCHInfo changeup usage rate. |
| piCS% | numeric | PITCHInfo slow curve usage rate. |
| piCU% | numeric | PITCHInfo curveball usage rate. |
| piFA% | numeric | PITCHInfo four-seam fastball usage rate. |
| piFC% | numeric | PITCHInfo cutter usage rate. |
| piFS% | numeric | PITCHInfo splitter usage rate. |
| piSI% | numeric | PITCHInfo sinker usage rate. |
| piSL% | numeric | PITCHInfo slider usage rate. |
| piXX% | numeric | PITCHInfo unknown/other pitch usage rate. |
| pivCH | numeric | PITCHInfo average changeup velocity (mph). |
| pivCS | numeric | PITCHInfo average slow curve velocity (mph). |
| pivCU | numeric | PITCHInfo average curveball velocity (mph). |
| pivFA | numeric | PITCHInfo average four-seam fastball velocity (mph). |
| pivFC | numeric | PITCHInfo average cutter velocity (mph). |
| pivFS | numeric | PITCHInfo average splitter velocity (mph). |
| pivSI | numeric | PITCHInfo average sinker velocity (mph). |
| pivSL | numeric | PITCHInfo average slider velocity (mph). |
| pivXX | numeric | PITCHInfo average unknown/other pitch velocity (mph). |
| piCH-X | numeric | PITCHInfo horizontal movement of the changeup (inches). |
| piCS-X | numeric | PITCHInfo horizontal movement of the slow curve (inches). |
| piCU-X | numeric | PITCHInfo horizontal movement of the curveball (inches). |
| piFA-X | numeric | PITCHInfo horizontal movement of the four-seam fastball (inches). |
| piFC-X | numeric | PITCHInfo horizontal movement of the cutter (inches). |
| piFS-X | numeric | PITCHInfo horizontal movement of the splitter (inches). |
| piSI-X | numeric | PITCHInfo horizontal movement of the sinker (inches). |
| piSL-X | numeric | PITCHInfo horizontal movement of the slider (inches). |
| piXX-X | numeric | PITCHInfo horizontal movement of the unknown/other pitch (inches). |
| piCH-Z | numeric | PITCHInfo vertical movement of the changeup (inches). |
| piCS-Z | numeric | PITCHInfo vertical movement of the slow curve (inches). |
| piCU-Z | numeric | PITCHInfo vertical movement of the curveball (inches). |
| piFA-Z | numeric | PITCHInfo vertical movement of the four-seam fastball (inches). |
| piFC-Z | numeric | PITCHInfo vertical movement of the cutter (inches). |
| piFS-Z | numeric | PITCHInfo vertical movement of the splitter (inches). |
| piSI-Z | numeric | PITCHInfo vertical movement of the sinker (inches). |
| piSL-Z | numeric | PITCHInfo vertical movement of the slider (inches). |
| piXX-Z | numeric | PITCHInfo vertical movement of the unknown/other pitch (inches). |
| piwCH | numeric | PITCHInfo total runs above average on the changeup. |
| piwCS | numeric | PITCHInfo total runs above average on the slow curve. |
| piwCU | numeric | PITCHInfo total runs above average on the curveball. |
| piwFA | numeric | PITCHInfo total runs above average on the four-seam fastball. |
| piwFC | numeric | PITCHInfo total runs above average on the cutter. |
| piwFS | numeric | PITCHInfo total runs above average on the splitter. |
| piwSI | numeric | PITCHInfo total runs above average on the sinker. |
| piwSL | numeric | PITCHInfo total runs above average on the slider. |
| piwXX | numeric | PITCHInfo total runs above average on the unknown/other pitch. |
| piwCH/C | numeric | PITCHInfo runs above average per 100 changeups. |
| piwCS/C | numeric | PITCHInfo runs above average per 100 slow curves. |
| piwCU/C | numeric | PITCHInfo runs above average per 100 curveballs. |
| piwFA/C | numeric | PITCHInfo runs above average per 100 four-seam fastballs. |
| piwFC/C | numeric | PITCHInfo runs above average per 100 cutters. |
| piwFS/C | numeric | PITCHInfo runs above average per 100 splitters. |
| piwSI/C | numeric | PITCHInfo runs above average per 100 sinkers. |
| piwSL/C | numeric | PITCHInfo runs above average per 100 sliders. |
| piwXX/C | numeric | PITCHInfo runs above average per 100 unknown/other pitchs. |
| piO-Swing% | numeric | PITCHInfo Swing rate on pitches outside the zone. |
| piZ-Swing% | numeric | PITCHInfo Swing rate on pitches in the zone. |
| piSwing% | numeric | PITCHInfo Overall swing rate. |
| piO-Contact% | numeric | PITCHInfo Contact rate on pitches outside the zone. |
| piZ-Contact% | numeric | PITCHInfo Contact rate on pitches in the zone. |
| piContact% | numeric | PITCHInfo Overall contact rate. |
| piZone% | numeric | PITCHInfo Rate of pitches in the strike zone. |
| Events | numeric | Batted-ball events with Statcast data. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | numeric | Barreled batted balls. |
| Barrel% | numeric | Barrel rate (per batted-ball event). |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | numeric | Hard-hit batted balls (95+ mph). |
| HardHit% | numeric | Hard-hit rate (95+ mph). |
| gamedate | character | Game date as parsed from the source feed. |
| dh | integer | Doubleheader game indicator (0 = single game). |
try(fg_batter_game_logs(playerid = 19755, year = 2023))try(fg_batter_game_logs(playerid = 19755, year = 2023))
This function allows you to scrape all leaderboard statistics (basic and advanced) from FanGraphs.com.
fg_batter_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_batter_leaders( age = "", pos = "all", stats = "bat", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of batter data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| Bats | character | Batting handedness (L/R/S). |
| xMLBAMID | integer | MLBAM player ID. |
| PlayerNameRoute | character | Player name URL slug used by FanGraphs. |
| PlayerName | character | Player name. |
| playerid | integer | FanGraphs player ID. |
| Age | integer | Player age. |
| AgeRng | character | Player age range across the span. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| G | integer | Games played. |
| AB | integer | At-bats. |
| PA | integer | Plate appearances. |
| H | integer | Hits. |
| 1B | integer | Singles. |
| 2B | integer | Doubles. |
| 3B | integer | Triples. |
| HR | integer | Home runs. |
| R | integer | Runs scored. |
| RBI | integer | Runs batted in. |
| BB | integer | Walks (bases on balls). |
| IBB | integer | Intentional walks. |
| SO | integer | Strikeouts. |
| HBP | integer | Hit by pitch. |
| SF | integer | Sacrifice flies. |
| SH | integer | Sacrifice hits (bunts). |
| GDP | integer | Grounded into double plays. |
| SB | integer | Stolen bases. |
| CS | integer | Caught stealing. |
| AVG | numeric | Batting average (or opponent average for pitchers). |
| GB | integer | Ground balls. |
| FB | integer | Fly balls. |
| LD | integer | Line drives. |
| IFFB | integer | Infield fly balls. |
| Pitches | integer | Total pitches seen or thrown. |
| Balls | integer | Total balls. |
| Strikes | integer | Total strikes. |
| IFH | integer | Infield hits. |
| BU | integer | Bunts. |
| BUH | integer | Bunt hits. |
| BB_pct | numeric | Walk rate. |
| K_pct | numeric | Strikeout rate. |
| BB_K | numeric | Walk-to-strikeout ratio. |
| OBP | numeric | On-base percentage. |
| SLG | numeric | Slugging percentage. |
| OPS | numeric | On-base plus slugging. |
| ISO | numeric | Isolated power. |
| BABIP | numeric | Batting average on balls in play. |
| GB_FB | numeric | Ground-ball to fly-ball ratio. |
| LD_pct | numeric | Line-drive percentage. |
| GB_pct | numeric | Ground-ball percentage. |
| FB_pct | numeric | Fly-ball percentage. |
| IFFB_pct | numeric | Infield-fly-ball percentage. |
| HR_FB | numeric | Home-run-per-fly-ball rate. |
| IFH_pct | numeric | Infield-hit percentage. |
| BUH_pct | numeric | Bunt-hit percentage. |
| TTO_pct | numeric | Three-true-outcomes percentage (BB, K, HR). |
| wOBA | numeric | Weighted On-Base Average. |
| wRAA | numeric | Weighted Runs Above Average. |
| wRC | numeric | Weighted Runs Created. |
| Batting | numeric | Batting runs above average. |
| Fielding | numeric | Fielding runs above average. |
| Replacement | numeric | Replacement-level runs. |
| Positional | numeric | Positional adjustment runs. |
| wLeague | numeric | League adjustment runs. |
| Defense | numeric | Total defensive value (runs above average). |
| Offense | numeric | Total offensive value (runs above average). |
| RAR | numeric | Runs Above Replacement. |
| WAR | numeric | Wins Above Replacement. |
| WAROld | numeric | Wins Above Replacement (legacy formulation). |
| Dollars | numeric | Estimated market value of production. |
| BaseRunning | numeric | Base-running runs above average. |
| Spd | numeric | Speed Score. |
| wRC_plus | numeric | Weighted Runs Created Plus (park/league-adjusted, 100 = average). |
| wBsR | numeric | Weighted Base Running runs. |
| WPA | numeric | Win Probability Added. |
| WPA_minus | numeric | Negative Win Probability Added. |
| WPA_plus | numeric | Positive Win Probability Added. |
| RE24 | numeric | Run Expectancy based on the 24 base-out states. |
| REW | numeric | Run Expectancy Wins. |
| pLI | numeric | Average Leverage Index. |
| PH | integer | Pinch-hit appearances. |
| WPA_LI | numeric | Situational Win Probability Added (WPA divided by Leverage Index). |
| Clutch | numeric | Clutch performance relative to context-neutral performance. |
| FB_pct1 | numeric | Overall fastball percentage (pitch usage). |
| FBv | numeric | Average fastball velocity. |
| SL_pct | numeric | Slider percentage (pitch usage). |
| SLv | numeric | Average slider velocity. |
| CT_pct | numeric | Cutter percentage (pitch usage). |
| CTv | numeric | Average cutter velocity. |
| CB_pct | numeric | Curveball percentage (pitch usage). |
| CBv | numeric | Average curveball velocity. |
| CH_pct | numeric | Changeup percentage (pitch usage). |
| CHv | numeric | Average changeup velocity. |
| SF_pct | numeric | Splitter percentage (pitch usage). |
| SFv | numeric | Average splitter velocity. |
| XX_pct | numeric | Unidentified-pitch percentage (pitch usage). |
| wFB | numeric | Fastball pitch-type linear weight runs. |
| wSL | numeric | Slider pitch-type linear weight runs. |
| wCT | numeric | Cutter pitch-type linear weight runs. |
| wCB | numeric | Curveball pitch-type linear weight runs. |
| wCH | numeric | Changeup pitch-type linear weight runs. |
| wSF | numeric | Splitter pitch-type linear weight runs. |
| wFB_C | numeric | Fastball linear weight runs per 100 pitches. |
| wSL_C | numeric | Slider linear weight runs per 100 pitches. |
| wCT_C | numeric | Cutter linear weight runs per 100 pitches. |
| wCB_C | numeric | Curveball linear weight runs per 100 pitches. |
| wCH_C | numeric | Changeup linear weight runs per 100 pitches. |
| wSF_C | numeric | Splitter linear weight runs per 100 pitches. |
| O-Swing_pct | numeric | Swing percentage on pitches outside the zone (chase rate). |
| Z-Swing_pct | numeric | Swing percentage on pitches inside the zone. |
| Swing_pct | numeric | Overall swing percentage. |
| O-Contact_pct | numeric | Contact percentage on pitches outside the zone. |
| Z-Contact_pct | numeric | Contact percentage on pitches inside the zone. |
| Contact_pct | numeric | Overall contact percentage. |
| Zone_pct | numeric | Percentage of pitches in the strike zone. |
| F-Strike_pct | numeric | First-pitch strike percentage. |
| SwStr_pct | numeric | Swinging-strike percentage. |
| CStr_pct | numeric | Called-strike percentage. |
| C+SwStr_pct | numeric | Combined called- plus swinging-strike percentage. |
| Pull | integer | Balls in play hit to the pull field. |
| Cent | integer | Balls in play hit up the middle. |
| Oppo | integer | Balls in play hit to the opposite field. |
| Soft | integer | Soft-contact balls in play. |
| Med | integer | Medium-contact balls in play. |
| Hard | integer | Hard-contact balls in play. |
| bipCount | integer | Count of balls in play with contact-quality data. |
| Pull_pct | numeric | Pull-field percentage. |
| Cent_pct | numeric | Up-the-middle percentage. |
| Oppo_pct | numeric | Opposite-field percentage. |
| Soft_pct | numeric | Soft-contact percentage. |
| Med_pct | numeric | Medium-contact percentage. |
| Hard_pct | numeric | Hard-contact percentage. |
| UBR | numeric | Ultimate Base Running runs. |
| GDPRuns | numeric | Runs from grounded-into-double-play avoidance. |
| AVG+ | numeric | Park/league-adjusted batting average (100 = average). |
| BB_pct+ | numeric | Park/league-adjusted walk rate (100 = average). |
| K_pct+ | numeric | Park/league-adjusted strikeout rate (100 = average). |
| OBP+ | numeric | Park/league-adjusted on-base percentage (100 = average). |
| SLG+ | numeric | Park/league-adjusted slugging percentage (100 = average). |
| ISO+ | numeric | Park/league-adjusted isolated power (100 = average). |
| BABIP+ | numeric | Park/league-adjusted BABIP (100 = average). |
| LD_pct+ | numeric | Park/league-adjusted line-drive rate (100 = average). |
| GB_pct+ | numeric | Park/league-adjusted ground-ball rate (100 = average). |
| FB_pct+ | numeric | Park/league-adjusted fly-ball rate (100 = average). |
| HRFB_pct+ | numeric | Park/league-adjusted home-run-per-fly-ball rate (100 = average). |
| Pull_pct+ | numeric | Park/league-adjusted pull rate (100 = average). |
| Cent_pct+ | numeric | Park/league-adjusted up-the-middle rate (100 = average). |
| Oppo_pct+ | numeric | Park/league-adjusted opposite-field rate (100 = average). |
| Soft_pct+ | numeric | Park/league-adjusted soft-contact rate (100 = average). |
| Med_pct+ | numeric | Park/league-adjusted medium-contact rate (100 = average). |
| Hard_pct+ | numeric | Park/league-adjusted hard-contact rate (100 = average). |
| xwOBA | numeric | Expected Weighted On-Base Average (Statcast). |
| xAVG | numeric | Expected batting average (Statcast). |
| xSLG | numeric | Expected slugging percentage (Statcast). |
| XBR | numeric | Extra bases taken on the bases, runs above average. |
| PPTV | integer | Pitch-type pitch values (raw component). |
| CPTV | integer | Catcher pitch-type value (raw component). |
| BPTV | integer | Batter pitch-type value (raw component). |
| DSV | integer | Defensive stuff value (raw component). |
| DGV | integer | Defensive game value (raw component). |
| BTV | integer | Base-state team value (raw component). |
| rPPTV | numeric | Regressed pitch-type pitch values. |
| rBPTV | numeric | Regressed batter pitch-type value. |
| EBV | integer | Earned-base value (raw component). |
| ESV | integer | Earned-strike value (raw component). |
| rFTeamV | numeric | Regressed fielding team value. |
| rBTeamV | numeric | Regressed base-running team value. |
| rTV | numeric | Regressed total team value. |
| pfx_FA_pct | numeric | PITCHf/x four-seam fastballs usage percentage. |
| pfx_FC_pct | numeric | PITCHf/x cutters usage percentage. |
| pfx_FS_pct | numeric | PITCHf/x splitters usage percentage. |
| pfx_FO_pct | numeric | PITCHf/x forkballs/pitch-outs usage percentage. |
| pfx_SI_pct | numeric | PITCHf/x sinkers usage percentage. |
| pfx_SL_pct | numeric | PITCHf/x sliders usage percentage. |
| pfx_CU_pct | numeric | PITCHf/x curveballs usage percentage. |
| pfx_KC_pct | numeric | PITCHf/x knuckle-curves usage percentage. |
| pfx_EP_pct | numeric | PITCHf/x eephus pitches usage percentage. |
| pfx_CH_pct | numeric | PITCHf/x changeups usage percentage. |
| pfx_SC_pct | numeric | PITCHf/x screwballs usage percentage. |
| pfx_SLO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_ST_pct | numeric | PITCHf/x sweepers usage percentage. |
| pfx_CUO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_CV_pct | numeric | PITCHf/x slow curves usage percentage. |
| pfx_vFA | numeric | PITCHf/x average four-seam fastballs velocity. |
| pfx_vFC | numeric | PITCHf/x average cutters velocity. |
| pfx_vFS | numeric | PITCHf/x average splitters velocity. |
| pfx_vFO | numeric | PITCHf/x average forkballs/pitch-outs velocity. |
| pfx_vSI | numeric | PITCHf/x average sinkers velocity. |
| pfx_vSL | numeric | PITCHf/x average sliders velocity. |
| pfx_vCU | numeric | PITCHf/x average curveballs velocity. |
| pfx_vKC | numeric | PITCHf/x average knuckle-curves velocity. |
| pfx_vEP | numeric | PITCHf/x average eephus pitches velocity. |
| pfx_vCH | numeric | PITCHf/x average changeups velocity. |
| pfx_vSC | numeric | PITCHf/x average screwballs velocity. |
| pfx_vSLO | numeric | PITCHf/x average slurves velocity. |
| pfx_vST | numeric | PITCHf/x average sweepers velocity. |
| pfx_vCUO | numeric | PITCHf/x average slurves velocity. |
| pfx_vCV | numeric | PITCHf/x average slow curves velocity. |
| pfx_FA-X | numeric | PITCHf/x average horizontal movement on four-seam fastballs. |
| pfx_FC-X | numeric | PITCHf/x average horizontal movement on cutters. |
| pfx_FS-X | numeric | PITCHf/x average horizontal movement on splitters. |
| pfx_FO-X | numeric | PITCHf/x average horizontal movement on forkballs/pitch-outs. |
| pfx_SI-X | numeric | PITCHf/x average horizontal movement on sinkers. |
| pfx_SL-X | numeric | PITCHf/x average horizontal movement on sliders. |
| pfx_CU-X | numeric | PITCHf/x average horizontal movement on curveballs. |
| pfx_KC-X | numeric | PITCHf/x average horizontal movement on knuckle-curves. |
| pfx_EP-X | numeric | PITCHf/x average horizontal movement on eephus pitches. |
| pfx_CH-X | numeric | PITCHf/x average horizontal movement on changeups. |
| pfx_SC-X | numeric | PITCHf/x average horizontal movement on screwballs. |
| pfx_SLO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_ST-X | numeric | PITCHf/x average horizontal movement on sweepers. |
| pfx_CUO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_CV-X | numeric | PITCHf/x average horizontal movement on slow curves. |
| pfx_FA-Z | numeric | PITCHf/x average vertical movement on four-seam fastballs. |
| pfx_FC-Z | numeric | PITCHf/x average vertical movement on cutters. |
| pfx_FS-Z | numeric | PITCHf/x average vertical movement on splitters. |
| pfx_FO-Z | numeric | PITCHf/x average vertical movement on forkballs/pitch-outs. |
| pfx_SI-Z | numeric | PITCHf/x average vertical movement on sinkers. |
| pfx_SL-Z | numeric | PITCHf/x average vertical movement on sliders. |
| pfx_CU-Z | numeric | PITCHf/x average vertical movement on curveballs. |
| pfx_KC-Z | numeric | PITCHf/x average vertical movement on knuckle-curves. |
| pfx_EP-Z | numeric | PITCHf/x average vertical movement on eephus pitches. |
| pfx_CH-Z | numeric | PITCHf/x average vertical movement on changeups. |
| pfx_SC-Z | numeric | PITCHf/x average vertical movement on screwballs. |
| pfx_SLO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_ST-Z | numeric | PITCHf/x average vertical movement on sweepers. |
| pfx_CUO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_CV-Z | numeric | PITCHf/x average vertical movement on slow curves. |
| pfx_wFA | numeric | PITCHf/x four-seam fastballs linear weight runs. |
| pfx_wFC | numeric | PITCHf/x cutters linear weight runs. |
| pfx_wFS | numeric | PITCHf/x splitters linear weight runs. |
| pfx_wFO | numeric | PITCHf/x forkballs/pitch-outs linear weight runs. |
| pfx_wSI | numeric | PITCHf/x sinkers linear weight runs. |
| pfx_wSL | numeric | PITCHf/x sliders linear weight runs. |
| pfx_wCU | numeric | PITCHf/x curveballs linear weight runs. |
| pfx_wKC | numeric | PITCHf/x knuckle-curves linear weight runs. |
| pfx_wEP | numeric | PITCHf/x eephus pitches linear weight runs. |
| pfx_wCH | numeric | PITCHf/x changeups linear weight runs. |
| pfx_wSC | numeric | PITCHf/x screwballs linear weight runs. |
| pfx_wSLO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wST | numeric | PITCHf/x sweepers linear weight runs. |
| pfx_wCUO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wCV | numeric | PITCHf/x slow curves linear weight runs. |
| pfx_wFA_C | numeric | PITCHf/x four-seam fastballs linear weight runs per 100 pitches. |
| pfx_wFC_C | numeric | PITCHf/x cutters linear weight runs per 100 pitches. |
| pfx_wFS_C | numeric | PITCHf/x splitters linear weight runs per 100 pitches. |
| pfx_wFO_C | numeric | PITCHf/x forkballs/pitch-outs linear weight runs per 100 pitches. |
| pfx_wSI_C | numeric | PITCHf/x sinkers linear weight runs per 100 pitches. |
| pfx_wSL_C | numeric | PITCHf/x sliders linear weight runs per 100 pitches. |
| pfx_wCU_C | numeric | PITCHf/x curveballs linear weight runs per 100 pitches. |
| pfx_wKC_C | numeric | PITCHf/x knuckle-curves linear weight runs per 100 pitches. |
| pfx_wEP_C | numeric | PITCHf/x eephus pitches linear weight runs per 100 pitches. |
| pfx_wCH_C | numeric | PITCHf/x changeups linear weight runs per 100 pitches. |
| pfx_wSC_C | numeric | PITCHf/x screwballs linear weight runs per 100 pitches. |
| pfx_wSLO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_wST_C | numeric | PITCHf/x sweepers linear weight runs per 100 pitches. |
| pfx_wCUO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_wCV_C | numeric | PITCHf/x slow curves linear weight runs per 100 pitches. |
| pfx_aaFA | numeric | PITCHf/x average arsenal value on four-seam fastballs. |
| pfx_aaFC | numeric | PITCHf/x average arsenal value on cutters. |
| pfx_aaFS | numeric | PITCHf/x average arsenal value on splitters. |
| pfx_aaFO | numeric | PITCHf/x average arsenal value on forkballs/pitch-outs. |
| pfx_aaSI | numeric | PITCHf/x average arsenal value on sinkers. |
| pfx_aaSL | numeric | PITCHf/x average arsenal value on sliders. |
| pfx_aaCU | numeric | PITCHf/x average arsenal value on curveballs. |
| pfx_aaKC | numeric | PITCHf/x average arsenal value on knuckle-curves. |
| pfx_aaEP | numeric | PITCHf/x average arsenal value on eephus pitches. |
| pfx_aaCH | numeric | PITCHf/x average arsenal value on changeups. |
| pfx_aaSC | numeric | PITCHf/x average arsenal value on screwballs. |
| pfx_aaSLO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_aaST | numeric | PITCHf/x average arsenal value on sweepers. |
| pfx_aaCUO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_aaCV | numeric | PITCHf/x average arsenal value on slow curves. |
| pfx_spFA | numeric | PITCHf/x Stuff+ value on four-seam fastballs. |
| pfx_spFC | numeric | PITCHf/x Stuff+ value on cutters. |
| pfx_spFS | numeric | PITCHf/x Stuff+ value on splitters. |
| pfx_spFO | numeric | PITCHf/x Stuff+ value on forkballs/pitch-outs. |
| pfx_spSI | numeric | PITCHf/x Stuff+ value on sinkers. |
| pfx_spSL | numeric | PITCHf/x Stuff+ value on sliders. |
| pfx_spCU | numeric | PITCHf/x Stuff+ value on curveballs. |
| pfx_spKC | numeric | PITCHf/x Stuff+ value on knuckle-curves. |
| pfx_spEP | numeric | PITCHf/x Stuff+ value on eephus pitches. |
| pfx_spCH | numeric | PITCHf/x Stuff+ value on changeups. |
| pfx_spSC | numeric | PITCHf/x Stuff+ value on screwballs. |
| pfx_spSLO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_spST | numeric | PITCHf/x Stuff+ value on sweepers. |
| pfx_spCUO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_spCV | numeric | PITCHf/x Stuff+ value on slow curves. |
| pfx_O-Swing_pct | numeric | PITCHf/x swing percentage on pitches outside the zone. |
| pfx_Z-Swing_pct | numeric | PITCHf/x swing percentage on pitches inside the zone. |
| pfx_Swing_pct | numeric | PITCHf/x swing percentage. |
| pfx_O-Contact_pct | numeric | PITCHf/x contact percentage on pitches outside the zone. |
| pfx_Z-Contact_pct | numeric | PITCHf/x contact percentage on pitches inside the zone. |
| pfx_Contact_pct | numeric | PITCHf/x contact percentage. |
| pfx_Zone_pct | numeric | PITCHf/x percentage of pitches in the strike zone. |
| pfx_Pace | numeric | PITCHf/x pace (seconds between pitches). |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing_pct | numeric | Fast-swing percentage (75+ mph bat speed). |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact_pct | numeric | Squared-up percentage per batted-ball contact. |
| SquaredUpSwing_pct | numeric | Squared-up percentage per swing. |
| BlastContact_pct | numeric | Blast percentage per batted-ball contact. |
| BlastSwing_pct | numeric | Blast percentage per swing. |
| Swords | integer | Swords (awkward, defensive swinging strikes induced). |
| CompetitiveSwings | integer | Competitive swings tracked. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle_pct | numeric | Percentage of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average batter depth in the box (inches). |
| DistanceOffPlate | numeric | Average batter distance off the plate (inches). |
| scH-Swing_pct | numeric | Statcast swing percentage on hard-hit pitches. |
| scH-Contact_pct | numeric | Statcast contact percentage on hard-hit pitches. |
| scH-Zone_pct | numeric | Statcast in-zone percentage on hard-hit pitches. |
| scS-Swing_pct | numeric | Statcast swing percentage on slider pitches. |
| scS-Contact_pct | numeric | Statcast contact percentage on slider pitches. |
| scS-Zone_pct | numeric | Statcast in-zone percentage on slider pitches. |
| scC-Swing_pct | numeric | Statcast swing percentage on curveball pitches. |
| scC-Contact_pct | numeric | Statcast contact percentage on curveball pitches. |
| scC-Zone_pct | numeric | Statcast in-zone percentage on curveball pitches. |
| scW-Swing_pct | numeric | Statcast swing percentage on offspeed pitches. |
| scW-Contact_pct | numeric | Statcast contact percentage on offspeed pitches. |
| scW-Zone_pct | numeric | Statcast in-zone percentage on offspeed pitches. |
| scSI-Swing_pct | numeric | Statcast swing percentage on sinker pitches. |
| scSI-Contact_pct | numeric | Statcast contact percentage on sinker pitches. |
| scSI-Zone_pct | numeric | Statcast in-zone percentage on sinker pitches. |
| scSO-Swing_pct | numeric | Statcast swing percentage on softly-hit pitches. |
| scSO-Contact_pct | numeric | Statcast contact percentage on softly-hit pitches. |
| scSO-Zone_pct | numeric | Statcast in-zone percentage on softly-hit pitches. |
| scO-Swing_pct | numeric | Statcast swing percentage on out-of-zone pitches. |
| scO-Contact_pct | numeric | Statcast contact percentage on out-of-zone pitches. |
| scO-Zone_pct | numeric | Statcast in-zone percentage on out-of-zone pitches. |
| scZ-Swing_pct | numeric | Statcast swing percentage on in-zone pitches. |
| scZ-Contact_pct | numeric | Statcast contact percentage on in-zone pitches. |
| scZ-Zone_pct | numeric | Statcast in-zone percentage on in-zone pitches. |
| pi_CH_pct | numeric | PITCHInfo changeups usage percentage. |
| pi_CU_pct | numeric | PITCHInfo curveballs usage percentage. |
| pi_FA_pct | numeric | PITCHInfo four-seam fastballs usage percentage. |
| pi_FC_pct | numeric | PITCHInfo cutters usage percentage. |
| pi_FS_pct | numeric | PITCHInfo splitters usage percentage. |
| pi_SB_pct | numeric | PITCHInfo slow-balls usage percentage. |
| pi_SI_pct | numeric | PITCHInfo sinkers usage percentage. |
| pi_SL_pct | numeric | PITCHInfo sliders usage percentage. |
| pi_vCH | numeric | PITCHInfo average changeups velocity. |
| pi_vCU | numeric | PITCHInfo average curveballs velocity. |
| pi_vFA | numeric | PITCHInfo average four-seam fastballs velocity. |
| pi_vFC | numeric | PITCHInfo average cutters velocity. |
| pi_vFS | numeric | PITCHInfo average splitters velocity. |
| pi_vSB | numeric | PITCHInfo average slow-balls velocity. |
| pi_vSI | numeric | PITCHInfo average sinkers velocity. |
| pi_vSL | numeric | PITCHInfo average sliders velocity. |
| pi_CH-X | numeric | PITCHInfo average horizontal movement on changeups. |
| pi_CU-X | numeric | PITCHInfo average horizontal movement on curveballs. |
| pi_FA-X | numeric | PITCHInfo average horizontal movement on four-seam fastballs. |
| pi_FC-X | numeric | PITCHInfo average horizontal movement on cutters. |
| pi_FS-X | numeric | PITCHInfo average horizontal movement on splitters. |
| pi_SB-X | numeric | PITCHInfo average horizontal movement on slow-balls. |
| pi_SI-X | numeric | PITCHInfo average horizontal movement on sinkers. |
| pi_SL-X | numeric | PITCHInfo average horizontal movement on sliders. |
| pi_CH-Z | numeric | PITCHInfo average vertical movement on changeups. |
| pi_CU-Z | numeric | PITCHInfo average vertical movement on curveballs. |
| pi_FA-Z | numeric | PITCHInfo average vertical movement on four-seam fastballs. |
| pi_FC-Z | numeric | PITCHInfo average vertical movement on cutters. |
| pi_FS-Z | numeric | PITCHInfo average vertical movement on splitters. |
| pi_SB-Z | numeric | PITCHInfo average vertical movement on slow-balls. |
| pi_SI-Z | numeric | PITCHInfo average vertical movement on sinkers. |
| pi_SL-Z | numeric | PITCHInfo average vertical movement on sliders. |
| pi_wCH | numeric | PITCHInfo changeups linear weight runs. |
| pi_wCU | numeric | PITCHInfo curveballs linear weight runs. |
| pi_wFA | numeric | PITCHInfo four-seam fastballs linear weight runs. |
| pi_wFC | numeric | PITCHInfo cutters linear weight runs. |
| pi_wFS | numeric | PITCHInfo splitters linear weight runs. |
| pi_wSB | numeric | PITCHInfo slow-balls linear weight runs. |
| pi_wSI | numeric | PITCHInfo sinkers linear weight runs. |
| pi_wSL | numeric | PITCHInfo sliders linear weight runs. |
| pi_wCH_C | numeric | PITCHInfo changeups linear weight runs per 100 pitches. |
| pi_wCU_C | numeric | PITCHInfo curveballs linear weight runs per 100 pitches. |
| pi_wFA_C | numeric | PITCHInfo four-seam fastballs linear weight runs per 100 pitches. |
| pi_wFC_C | numeric | PITCHInfo cutters linear weight runs per 100 pitches. |
| pi_wFS_C | numeric | PITCHInfo splitters linear weight runs per 100 pitches. |
| pi_wSB_C | numeric | PITCHInfo slow-balls linear weight runs per 100 pitches. |
| pi_wSI_C | numeric | PITCHInfo sinkers linear weight runs per 100 pitches. |
| pi_wSL_C | numeric | PITCHInfo sliders linear weight runs per 100 pitches. |
| pi_O-Swing_pct | numeric | PITCHInfo swing percentage on pitches outside the zone. |
| pi_Z-Swing_pct | numeric | PITCHInfo swing percentage on pitches inside the zone. |
| pi_Swing_pct | numeric | PITCHInfo swing percentage. |
| pi_O-Contact_pct | numeric | PITCHInfo contact percentage on pitches outside the zone. |
| pi_Z-Contact_pct | numeric | PITCHInfo contact percentage on pitches inside the zone. |
| pi_Contact_pct | numeric | PITCHInfo contact percentage. |
| pi_Zone_pct | numeric | PITCHInfo percentage of pitches in the strike zone. |
| pi_Pace | numeric | PITCHInfo pace (seconds between pitches). |
| Events | integer | Batted-ball events with Statcast measurement. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | integer | Barreled batted balls. |
| Barrel_pct | numeric | Barrel percentage. |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | integer | Hard-hit batted balls (95+ mph). |
| HardHit_pct | numeric | Hard-hit percentage (95+ mph). |
| Q | numeric | Quality of contact / quality score. |
| TG | integer | Total games in the span. |
| TPA | integer | Total plate appearances in the span. |
| positionDB | character | Position code from the database. |
| position | character | Position played. |
| team_name_abb | character | Team name abbreviation. |
| teamid | integer | FanGraphs team ID. |
| playerTeamId | integer | FanGraphs player-team ID. |
| Pos | numeric | Primary position. |
| EV90 | numeric | 90th-percentile exit velocity (mph). |
| pi_XX_pct | numeric | PITCHInfo unidentified pitches usage percentage. |
| pi_vXX | numeric | PITCHInfo average unidentified pitches velocity. |
| pi_XX-X | numeric | PITCHInfo average horizontal movement on unidentified pitches. |
| pi_XX-Z | numeric | PITCHInfo average vertical movement on unidentified pitches. |
| pi_wXX | numeric | PITCHInfo unidentified pitches linear weight runs. |
| pi_wXX_C | numeric | PITCHInfo unidentified pitches linear weight runs per 100 pitches. |
| phLI | numeric | Average Leverage Index in pinch-hit appearances. |
| pi_CS_pct | numeric | PITCHInfo slow curves usage percentage. |
| pi_vCS | numeric | PITCHInfo average slow curves velocity. |
| pi_CS-X | numeric | PITCHInfo average horizontal movement on slow curves. |
| pi_CS-Z | numeric | PITCHInfo average vertical movement on slow curves. |
| pi_wCS | numeric | PITCHInfo slow curves linear weight runs. |
| pi_wCS_C | numeric | PITCHInfo slow curves linear weight runs per 100 pitches. |
| rBTV | numeric | Regressed base-state team value. |
| KN_pct | numeric | Knuckleball percentage (pitch usage). |
| KNv | numeric | Average knuckleball velocity. |
| wKN | numeric | Knuckleball pitch-type linear weight runs. |
| wKN_C | numeric | Knuckleball linear weight runs per 100 pitches. |
| pfx_KN_pct | numeric | PITCHf/x knuckleballs usage percentage. |
| pfx_vKN | numeric | PITCHf/x average knuckleballs velocity. |
| pfx_KN-X | numeric | PITCHf/x average horizontal movement on knuckleballs. |
| pfx_KN-Z | numeric | PITCHf/x average vertical movement on knuckleballs. |
| pfx_wKN | numeric | PITCHf/x knuckleballs linear weight runs. |
| pfx_wKN_C | numeric | PITCHf/x knuckleballs linear weight runs per 100 pitches. |
| pfx_aaKN | numeric | PITCHf/x average arsenal value on knuckleballs. |
| pfx_spKN | numeric | PITCHf/x Stuff+ value on knuckleballs. |
| pi_KN_pct | numeric | PITCHInfo knuckleballs usage percentage. |
| pi_vKN | numeric | PITCHInfo average knuckleballs velocity. |
| pi_KN-X | numeric | PITCHInfo average horizontal movement on knuckleballs. |
| pi_KN-Z | numeric | PITCHInfo average vertical movement on knuckleballs. |
| pi_wKN | numeric | PITCHInfo knuckleballs linear weight runs. |
| pi_wKN_C | numeric | PITCHInfo knuckleballs linear weight runs per 100 pitches. |
| rCPTV | numeric | Regressed catcher pitch-type value. |
| CFraming | numeric | Catcher framing runs. |
| rDGV | numeric | Regressed defensive game value. |
| rDSV | numeric | Regressed defensive stuff value. |
try(fg_batter_leaders(startseason = 2023, endseason = 2023))try(fg_batter_leaders(startseason = 2023, endseason = 2023))
This function allows you to scrape all leaderboard statistics (basic and advanced) from FanGraphs.com.
fg_fielder_leaders( age = "", pos = "all", stats = "fld", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "1", postseason = "", sortdir = "default", sortstat = "Defense" )fg_fielder_leaders( age = "", pos = "all", stats = "fld", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "1", postseason = "", sortdir = "default", sortstat = "Defense" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "Defense". |
A data frame of fielder data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| xMLBAMID | integer | MLBAM player ID. |
| PlayerNameRoute | character | Player name URL slug used by FanGraphs. |
| PlayerName | character | Player name. |
| playerid | integer | FanGraphs player ID. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| Pos | character | Primary position. |
| Position | character | Position played. |
| G | integer | Games played. |
| GS | integer | Games started. |
| Inn | numeric | Innings played in the field. |
| PO | integer | Putouts. |
| A | integer | Assists. |
| E | integer | Errors. |
| FE | integer | Fielding errors. |
| TE | integer | Throwing errors. |
| DP | integer | Double plays. |
| DPS | integer | Double plays started. |
| DPT | integer | Double plays turned. |
| DPF | integer | Double plays finished. |
| SB | integer | Stolen bases. |
| CS | integer | Caught stealing. |
| PB | integer | Passed balls. |
| WP | integer | Wild pitches. |
| FP | numeric | Fielding percentage. |
| rSB | integer | Stolen-base runs (catcher arm). |
| rGFP | integer | Good-fielding-play runs. |
| rSZ | numeric | Strike-zone (framing) runs. |
| rCERA | integer | Catcher-ERA runs. |
| DRS | integer | Defensive Runs Saved. |
| Defense | numeric | Total defensive value (runs above average). |
| CStrikes | numeric | Catcher framing called strikes above average. |
| CFraming | numeric | Catcher framing runs. |
| dFRP | integer | Double-play component of Fielding Run Prevention. |
| bFRP | integer | Bunt component of Fielding Run Prevention. |
| tFRP | integer | Throwing component of Fielding Run Prevention. |
| fFRP | integer | Framing component of Fielding Run Prevention. |
| FRP | integer | Total Fielding Run Prevention. |
| Q | numeric | Quality of contact / quality score. |
| TInn | numeric | Total innings played in the field. |
| positionDB | character | Position code from the database. |
| teamid | integer | FanGraphs team ID. |
| team_name_abb | character | Team name abbreviation. |
| playerTeamId | integer | FanGraphs player-team ID. |
| rGDP | integer | Double-play runs. |
| rPM | integer | Plus/minus range runs. |
| BIZ | integer | Balls hit in defensive zone. |
| Plays | integer | Plays made in zone. |
| RZR | numeric | Revised Zone Rating. |
| OOZ | integer | Plays made out of zone. |
| DPR | numeric | Double-play runs (UZR component). |
| RngR | numeric | Range runs (UZR component). |
| ErrR | numeric | Error runs (UZR component). |
| UZR | numeric | Ultimate Zone Rating. |
| UZR_150 | numeric | Ultimate Zone Rating per 150 defensive games. |
| OAA | integer | Outs Above Average (Statcast). |
| rFRP | integer | Range component of Fielding Run Prevention. |
| aFRP | integer | Arm component of Fielding Run Prevention. |
| rARM | integer | Outfield-arm runs. |
| ARM | numeric | Outfield-arm runs (UZR component). |
| Scp | integer | Scoops (first-base picks). |
try(fg_fielder_leaders(startseason = 2023, endseason = 2023))try(fg_fielder_leaders(startseason = 2023, endseason = 2023))
Scrape historical FanGraphs Guts! table, wOBA, FIP coefficients and constants
fg_guts()fg_guts()
Returns a tibble of seasonal constants from FanGraphs
| col_name | types | description |
| season | integer | Season (YYYY). |
| lg_woba | numeric | League-average wOBA for the season. |
| woba_scale | numeric | wOBA scale factor (converts wOBA to runs). |
| wBB | numeric | Linear weight (runs) for an unintentional walk. |
| wHBP | numeric | Linear weight (runs) for a hit-by-pitch. |
| w1B | numeric | Linear weight (runs) for a single. |
| w2B | numeric | Linear weight (runs) for a double. |
| w3B | numeric | Linear weight (runs) for a triple. |
| wHR | numeric | Linear weight (runs) for a home run. |
| runSB | numeric | Run value of a stolen base. |
| runCS | numeric | Run value of a caught stealing. |
| lg_r_pa | numeric | League runs per plate appearance. |
| lg_r_w | numeric | League runs per win. |
| cFIP | numeric | FIP constant for the season. |
try(fg_guts())try(fg_guts())
This function allows you to scrape MiLB game logs for individual batters from FanGraphs.
fg_milb_batter_game_logs(playerid, year)fg_milb_batter_game_logs(playerid, year)
playerid |
The batter's minor league ID from FanGraphs. |
year |
The season for which game logs should be returned. |
Returns a tibble of Minor League batter game logs, one row per game, with the following columns:
| col_name | types | description |
| Date | character | Calendar date of the game (YYYY-MM-DD). |
| Team | character | Minor league team the batter played for. |
| Level | character | Minor league classification level (e.g. (AA), (AAA)). |
| Opp | character | Opponent team; leading @ indicates a road game. |
| G | numeric | Games played (1 per row). |
| AB | numeric | At-bats. |
| PA | numeric | Plate appearances. |
| H | numeric | Hits. |
| 1B | numeric | Singles. |
| 2B | numeric | Doubles. |
| 3B | numeric | Triples. |
| HR | numeric | Home runs. |
| R | numeric | Runs scored. |
| RBI | numeric | Runs batted in. |
| BB | numeric | Walks (bases on balls). |
| IBB | numeric | Intentional walks. |
| SO | numeric | Strikeouts. |
| HBP | numeric | Times hit by pitch. |
| SF | numeric | Sacrifice flies. |
| SH | numeric | Sacrifice hits (bunts). |
| GDP | numeric | Grounded into double plays. |
| SB | numeric | Stolen bases. |
| CS | numeric | Times caught stealing. |
| AVG | numeric | Batting average (H/AB). |
| BB% | numeric | Walk rate (BB per plate appearance). |
| K% | numeric | Strikeout rate (SO per plate appearance). |
| BB/K | numeric | Walk-to-strikeout ratio. |
| OBP | numeric | On-base percentage. |
| SLG | numeric | Slugging percentage. |
| OPS | numeric | On-base plus slugging. |
| ISO | numeric | Isolated power (SLG minus AVG). |
| Spd | numeric | Bill James Speed Score. |
| BABIP | numeric | Batting average on balls in play. |
| wRC | numeric | Weighted runs created. |
| wRAA | numeric | Weighted runs above average. |
| wOBA | numeric | Weighted on-base average. |
| wRC+ | numeric | Weighted runs created plus (league/park adjusted, 100=avg). |
| wBsR | numeric | Weighted base running runs. |
| gamedate | character | Game date as parsed from the source feed. |
| dh | integer | Doubleheader game indicator (0 = single game). |
try(fg_milb_batter_game_logs(playerid = "sa3019999", year=2023))try(fg_milb_batter_game_logs(playerid = "sa3019999", year=2023))
This function allows you to scrape MiLB game logs for individual batters from FanGraphs.com.
fg_milb_pitcher_game_logs(playerid, year)fg_milb_pitcher_game_logs(playerid, year)
playerid |
The pitcher's minor league ID from FanGraphs.com. |
year |
The season for which game logs should be returned. |
Returns a tibble of Minor League pitcher game logs, one row per game, with the following columns:
| col_name | types | description |
| Date | character | Calendar date of the game (YYYY-MM-DD). |
| Team | character | Minor league team the pitcher played for. |
| Level | character | Minor league classification level (e.g. (AA), (AAA)). |
| Opp | character | Opponent team; leading @ indicates a road game. |
| W | numeric | Wins. |
| L | numeric | Losses. |
| ERA | numeric | Earned run average (per 9 innings). |
| G | numeric | Games pitched (1 per row). |
| GS | numeric | Games started. |
| QS | numeric | Quality starts (6+ IP, 3 or fewer earned runs). |
| CG | numeric | Complete games. |
| ShO | numeric | Shutouts. |
| SV | numeric | Saves. |
| IP | numeric | Innings pitched. |
| TBF | numeric | Total batters faced. |
| H | numeric | Hits allowed. |
| R | numeric | Runs allowed. |
| ER | numeric | Earned runs allowed. |
| HR | numeric | Home runs allowed. |
| BB | numeric | Walks allowed. |
| IBB | numeric | Intentional walks allowed. |
| HBP | numeric | Batters hit by pitch. |
| WP | numeric | Wild pitches. |
| BK | numeric | Balks. |
| SO | numeric | Strikeouts. |
| K/9 | numeric | Strikeouts per 9 innings. |
| BB/9 | numeric | Walks per 9 innings. |
| K/BB | numeric | Strikeout-to-walk ratio. |
| HR/9 | numeric | Home runs allowed per 9 innings. |
| K% | numeric | Strikeout rate (per batter faced). |
| K-BB% | numeric | Strikeout rate minus walk rate. |
| BB% | numeric | Walk rate (per batter faced). |
| AVG | numeric | Opponent batting average allowed. |
| WHIP | numeric | Walks plus hits per inning pitched. |
| BABIP | numeric | Batting average on balls in play allowed. |
| LOB% | numeric | Left-on-base percentage (strand rate). |
| FIP | numeric | Fielding independent pitching. |
| ERA- | numeric | ERA scaled to league/park (100 = average, lower better). |
| FIP- | numeric | FIP scaled to league/park (100 = average, lower better). |
| xFIP- | numeric | Expected FIP scaled to league/park (100 = average). |
| gamedate | character | Game date as parsed from the source feed. |
| dh | integer | Doubleheader game indicator (0 = single game). |
try(fg_milb_pitcher_game_logs(playerid = "sa3020682", year=2023))try(fg_milb_pitcher_game_logs(playerid = "sa3020682", year=2023))
This function allows you to scrape park factors for a given season from FanGraphs.com.
This function allows you to scrape park factors by handedness from FanGraphs.com for a given single year.
fg_park(yr) fg_park_hand(yr)fg_park(yr) fg_park_hand(yr)
yr |
Season for which you want to scrape the park factors. |
Returns a tibble of park factors.
| col_name | types | description |
| season | integer | Season (YYYY). |
| home_team | character | Home team name. |
| basic_5yr | integer | Basic 5-year park factor (100 = neutral). |
| 3yr | integer | 3-year park factor (100 = neutral). |
| 1yr | integer | 1-year park factor (100 = neutral). |
| single | integer | Park factor for singles. |
| double | integer | Park factor for doubles. |
| triple | integer | Park factor for triples. |
| hr | integer | Park factor for home runs. |
| so | integer | Park factor for strikeouts. |
| UIBB | integer | Park factor for unintentional walks. |
| GB | integer | Park factor for ground balls. |
| FB | integer | Park factor for fly balls. |
| LD | integer | Park factor for line drives. |
| IFFB | integer | Park factor for infield fly balls. |
| FIP | integer | Park factor applied to FIP. |
Returns a tibble of park factors by handedness.
| col_name | types | description |
| season | integer | Season (YYYY). |
| home_team | character | Home team name. |
| single_as_LHH | integer | Singles park factor for left-handed hitters. |
| single_as_RHH | integer | Singles park factor for right-handed hitters. |
| double_as_LHH | integer | Doubles park factor for left-handed hitters. |
| double_as_RHH | integer | Doubles park factor for right-handed hitters. |
| triple_as_LHH | integer | Triples park factor for left-handed hitters. |
| triple_as_RHH | integer | Triples park factor for right-handed hitters. |
| hr_as_LHH | integer | Home run park factor for left-handed hitters. |
| hr_as_RHH | integer | Home run park factor for right-handed hitters. |
try(fg_park(2013)) try(fg_park_hand(2013))try(fg_park(2013)) try(fg_park_hand(2013))
(legacy) Scrape Pitcher Leaderboards from FanGraphs
fg_pitch_leaders( age = "", pos = "all", stats = "pit", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_pitch_leaders( age = "", pos = "all", stats = "pit", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of pitcher data.
This function allows you to scrape game logs by year for a pitcher from FanGraphs.com.
fg_pitcher_game_logs(playerid, year)fg_pitcher_game_logs(playerid, year)
playerid |
This is the playerid used by FanGraphs for a given player |
year |
The season for which game logs should be returned (use the YYYY format) |
A data frame of pitcher game logs, one row per game, with the following columns:
| col_name | types | description |
| PlayerName | character | Player name. |
| playerid | integer | FanGraphs player ID. |
| Date | character | Calendar date of the game (YYYY-MM-DD). |
| Opp | character | Opponent team; leading @ indicates a road game. |
| teamid | integer | FanGraphs team ID. |
| season | integer | Season year. |
| Team | character | Team the player appeared for. |
| HomeAway | character | Home/away indicator for the game. |
| Age | integer | Player age during the season. |
| W | numeric | Wins. |
| L | numeric | Losses. |
| ERA | numeric | Earned run average. |
| G | numeric | Games (1 per row). |
| GS | numeric | Games started. |
| QS | numeric | Quality starts. |
| CG | numeric | Complete games. |
| ShO | numeric | Shutouts. |
| SV | numeric | Saves. |
| HLD | numeric | Holds. |
| BS | numeric | Blown saves. |
| IP | numeric | Innings pitched. |
| TBF | numeric | Total batters faced. |
| H | numeric | Hits. |
| R | numeric | Runs scored. |
| ER | numeric | Earned runs allowed. |
| HR | numeric | Home runs. |
| BB | numeric | Walks (bases on balls). |
| IBB | numeric | Intentional walks. |
| HBP | numeric | Times hit by pitch. |
| WP | numeric | Wild pitches. |
| BK | numeric | Balks. |
| SO | numeric | Strikeouts. |
| K/9 | numeric | Strikeouts per 9 innings. |
| BB/9 | numeric | Walks per 9 innings. |
| H/9 | numeric | Hits per 9 innings. |
| K/BB | numeric | Strikeout-to-walk ratio. |
| IFH% | numeric | Infield-hit rate. |
| BUH% | numeric | Bunt-hit rate. |
| GB | numeric | Ground balls. |
| FB | numeric | Fly balls. |
| LD | numeric | Line drives. |
| IFFB | numeric | Infield fly balls. |
| IFH | numeric | Infield hits. |
| BU | numeric | Bunts. |
| BUH | numeric | Bunt hits. |
| K% | numeric | Strikeout rate. |
| BB% | numeric | Walk rate. |
| K-BB% | numeric | Strikeout rate minus walk rate. |
| SIERA | numeric | Skill-interactive ERA. |
| HR/9 | numeric | Home runs per 9 innings. |
| AVG | numeric | Batting average. |
| WHIP | numeric | Walks plus hits per inning pitched. |
| BABIP | numeric | Batting average on balls in play. |
| LOB% | numeric | Left-on-base percentage (strand rate). |
| FIP | numeric | Fielding independent pitching. |
| E-F | numeric | ERA minus FIP. |
| xFIP | numeric | Expected fielding independent pitching. |
| ERA- | numeric | ERA scaled to league/park (100 = average). |
| FIP- | numeric | FIP scaled to league/park (100 = average). |
| xFIP- | numeric | xFIP scaled to league/park (100 = average). |
| GB/FB | numeric | Ground-ball to fly-ball ratio. |
| LD% | numeric | Line-drive rate. |
| GB% | numeric | Ground-ball rate. |
| FB% | numeric | Fly-ball rate. |
| IFFB% | numeric | Infield-fly-ball rate. |
| HR/FB | numeric | Home-run-per-fly-ball rate. |
| RS | numeric | Run support. |
| RS/9 | numeric | Run support per 9 innings. |
| Balls | numeric | Balls. |
| Strikes | numeric | Strikes. |
| Pitches | numeric | Pitches seen. |
| WPA | numeric | Win probability added. |
| -WPA | numeric | Negative win probability added. |
| +WPA | numeric | Positive win probability added. |
| RE24 | numeric | Run expectancy based on 24 base-out states. |
| REW | numeric | Run expectancy wins. |
| pLI | numeric | Average leverage index. |
| inLI | numeric | Average leverage index entering games. |
| gmLI | numeric | Average leverage index at game entry. |
| exLI | numeric | Average leverage index exiting games. |
| Pulls | numeric | Times pulled from games. |
| Games | numeric | Games appeared in. |
| WPA/LI | numeric | Context-neutral win probability added. |
| Clutch | numeric | Clutch performance score. |
| SD | numeric | Shutdowns. |
| MD | numeric | Meltdowns. |
| FB%1 | numeric | Fastball usage rate. |
| FBv | numeric | Average four-seam fastball velocity (mph). |
| SL% | numeric | slider usage rate. |
| SLv | numeric | Average slider velocity (mph). |
| CT% | numeric | cutter usage rate. |
| CTv | numeric | Average cutter velocity (mph). |
| CB% | numeric | curveball usage rate. |
| CBv | numeric | Average curveball velocity (mph). |
| SF% | numeric | split-finger fastball usage rate. |
| SFv | numeric | Average split-finger fastball velocity (mph). |
| XX% | numeric | unknown/other pitch usage rate. |
| wFB | numeric | Total runs above average on the fastball. |
| wSL | numeric | Total runs above average on the slider. |
| wCT | numeric | Total runs above average on the cutter. |
| wCB | numeric | Total runs above average on the curveball. |
| wSF | numeric | Total runs above average on the split-finger fastball. |
| wFB/C | numeric | Runs above average per 100 fastballs. |
| wSL/C | numeric | Runs above average per 100 sliders. |
| wCT/C | numeric | Runs above average per 100 cutters. |
| wCB/C | numeric | Runs above average per 100 curveballs. |
| wSF/C | numeric | Runs above average per 100 split-finger fastballs. |
| O-Swing% | numeric | Swing rate on pitches outside the zone. |
| Z-Swing% | numeric | Swing rate on pitches in the zone. |
| Swing% | numeric | Overall swing rate. |
| O-Contact% | numeric | Contact rate on pitches outside the zone. |
| Z-Contact% | numeric | Contact rate on pitches in the zone. |
| Contact% | numeric | Overall contact rate. |
| Zone% | numeric | Rate of pitches in the strike zone. |
| F-Strike% | numeric | First-pitch strike rate. |
| SwStr% | numeric | Swinging-strike rate. |
| Pull | numeric | Pulled batted balls. |
| Cent | numeric | Batted balls hit up the middle. |
| Oppo | numeric | Opposite-field batted balls. |
| Soft | numeric | Soft-hit batted balls. |
| Med | numeric | Medium-hit batted balls. |
| Hard | numeric | Hard-hit batted balls. |
| bipCount | numeric | Balls in play. |
| Pull% | numeric | Pulled batted-ball rate. |
| Cent% | numeric | Up-the-middle batted-ball rate. |
| Oppo% | numeric | Opposite-field batted-ball rate. |
| Soft% | numeric | Soft-contact rate. |
| Med% | numeric | Medium-contact rate. |
| Hard% | numeric | Hard-contact rate. |
| tERA | numeric | True ERA (batted-ball based). |
| GSv2 | numeric | Game Score (version 2). |
| pb_o_CU | numeric | PitchingBot overall grade for the curveball. |
| pb_s_CU | numeric | PitchingBot stuff grade for the curveball. |
| pb_c_CU | numeric | PitchingBot command grade for the curveball. |
| pb_o_FF | numeric | PitchingBot overall grade for the four-seam fastball. |
| pb_s_FF | numeric | PitchingBot stuff grade for the four-seam fastball. |
| pb_c_FF | numeric | PitchingBot command grade for the four-seam fastball. |
| pb_o_SI | numeric | PitchingBot overall grade for the sinker. |
| pb_s_SI | numeric | PitchingBot stuff grade for the sinker. |
| pb_c_SI | numeric | PitchingBot command grade for the sinker. |
| pb_o_SL | numeric | PitchingBot overall grade for the slider. |
| pb_s_SL | numeric | PitchingBot stuff grade for the slider. |
| pb_c_SL | numeric | PitchingBot command grade for the slider. |
| pb_o_FC | numeric | PitchingBot overall grade for the cutter. |
| pb_s_FC | numeric | PitchingBot stuff grade for the cutter. |
| pb_c_FC | numeric | PitchingBot command grade for the cutter. |
| pb_o_FS | numeric | PitchingBot overall grade for the splitter. |
| pb_s_FS | numeric | PitchingBot stuff grade for the splitter. |
| pb_c_FS | numeric | PitchingBot command grade for the splitter. |
| pb_overall | numeric | PitchingBot overall grade. |
| pb_stuff | numeric | PitchingBot stuff grade. |
| pb_command | numeric | PitchingBot command grade. |
| pb_xRV100 | numeric | PitchingBot expected run value per 100 pitches. |
| pb_ERA | numeric | PitchingBot ERA estimate. |
| sp_s_CU | numeric | Stuff+ grade for the curveball (100 = average). |
| sp_l_CU | numeric | Location+ grade for the curveball (100 = average). |
| sp_p_CU | numeric | Pitching+ grade for the curveball (100 = average). |
| sp_s_FF | numeric | Stuff+ grade for the four-seam fastball (100 = average). |
| sp_l_FF | numeric | Location+ grade for the four-seam fastball (100 = average). |
| sp_p_FF | numeric | Pitching+ grade for the four-seam fastball (100 = average). |
| sp_s_SI | numeric | Stuff+ grade for the sinker (100 = average). |
| sp_l_SI | numeric | Location+ grade for the sinker (100 = average). |
| sp_p_SI | numeric | Pitching+ grade for the sinker (100 = average). |
| sp_s_SL | numeric | Stuff+ grade for the slider (100 = average). |
| sp_l_SL | numeric | Location+ grade for the slider (100 = average). |
| sp_p_SL | numeric | Pitching+ grade for the slider (100 = average). |
| sp_s_FC | numeric | Stuff+ grade for the cutter (100 = average). |
| sp_l_FC | numeric | Location+ grade for the cutter (100 = average). |
| sp_p_FC | numeric | Pitching+ grade for the cutter (100 = average). |
| sp_s_FS | numeric | Stuff+ grade for the splitter (100 = average). |
| sp_l_FS | numeric | Location+ grade for the splitter (100 = average). |
| sp_p_FS | numeric | Pitching+ grade for the splitter (100 = average). |
| sp_stuff | numeric | Overall Stuff+ grade (100 = average). |
| sp_location | numeric | Overall Location+ grade (100 = average). |
| sp_pitching | numeric | Overall Pitching+ grade (100 = average). |
| PPTV | numeric | Pitch-type and framing run value component. |
| CPTV | numeric | Pitch-type and framing run value component. |
| BPTV | numeric | Pitch-type and framing run value component. |
| DSV | numeric | Pitch-type and framing run value component. |
| DGV | numeric | Pitch-type and framing run value component. |
| BTV | numeric | Pitch-type and framing run value component. |
| rPPTV | numeric | Pitch-type and framing run value component. |
| rBPTV | numeric | Pitch-type and framing run value component. |
| EBV | numeric | Pitch-type and framing run value component. |
| ESV | numeric | Pitch-type and framing run value component. |
| rFTeamV | numeric | Pitch-type and framing run value component. |
| rBTeamV | numeric | Pitch-type and framing run value component. |
| rTV | numeric | Pitch-type and framing run value component. |
| xERA | numeric | Expected ERA. |
| pfxFA% | numeric | PITCHf/x four-seam fastball usage rate. |
| pfxFC% | numeric | PITCHf/x cutter usage rate. |
| pfxFS% | numeric | PITCHf/x splitter usage rate. |
| pfxSI% | numeric | PITCHf/x sinker usage rate. |
| pfxSL% | numeric | PITCHf/x slider usage rate. |
| pfxCU% | numeric | PITCHf/x curveball usage rate. |
| pfxSLO% | numeric | PITCHf/x slurve usage rate. |
| pfxST% | numeric | PITCHf/x sweeper usage rate. |
| pfxCUO% | numeric | PITCHf/x other curve usage rate. |
| pfxvFA | numeric | PITCHf/x average four-seam fastball velocity (mph). |
| pfxvFC | numeric | PITCHf/x average cutter velocity (mph). |
| pfxvFS | numeric | PITCHf/x average splitter velocity (mph). |
| pfxvSI | numeric | PITCHf/x average sinker velocity (mph). |
| pfxvSL | numeric | PITCHf/x average slider velocity (mph). |
| pfxvCU | numeric | PITCHf/x average curveball velocity (mph). |
| pfxvSLO | numeric | PITCHf/x average slurve velocity (mph). |
| pfxvST | numeric | PITCHf/x average sweeper velocity (mph). |
| pfxvCUO | numeric | PITCHf/x average other curve velocity (mph). |
| pfxFA-X | numeric | PITCHf/x horizontal movement of the four-seam fastball (inches). |
| pfxFC-X | numeric | PITCHf/x horizontal movement of the cutter (inches). |
| pfxFS-X | numeric | PITCHf/x horizontal movement of the splitter (inches). |
| pfxSI-X | numeric | PITCHf/x horizontal movement of the sinker (inches). |
| pfxSL-X | numeric | PITCHf/x horizontal movement of the slider (inches). |
| pfxCU-X | numeric | PITCHf/x horizontal movement of the curveball (inches). |
| pfxSLO-X | numeric | PITCHf/x horizontal movement of the slurve (inches). |
| pfxST-X | numeric | PITCHf/x horizontal movement of the sweeper (inches). |
| pfxCUO-X | numeric | PITCHf/x horizontal movement of the other curve (inches). |
| pfxFA-Z | numeric | PITCHf/x vertical movement of the four-seam fastball (inches). |
| pfxFC-Z | numeric | PITCHf/x vertical movement of the cutter (inches). |
| pfxFS-Z | numeric | PITCHf/x vertical movement of the splitter (inches). |
| pfxSI-Z | numeric | PITCHf/x vertical movement of the sinker (inches). |
| pfxSL-Z | numeric | PITCHf/x vertical movement of the slider (inches). |
| pfxCU-Z | numeric | PITCHf/x vertical movement of the curveball (inches). |
| pfxSLO-Z | numeric | PITCHf/x vertical movement of the slurve (inches). |
| pfxST-Z | numeric | PITCHf/x vertical movement of the sweeper (inches). |
| pfxCUO-Z | numeric | PITCHf/x vertical movement of the other curve (inches). |
| pfxwFA | numeric | PITCHf/x total runs above average on the four-seam fastball. |
| pfxwFC | numeric | PITCHf/x total runs above average on the cutter. |
| pfxwFS | numeric | PITCHf/x total runs above average on the splitter. |
| pfxwSI | numeric | PITCHf/x total runs above average on the sinker. |
| pfxwSL | numeric | PITCHf/x total runs above average on the slider. |
| pfxwCU | numeric | PITCHf/x total runs above average on the curveball. |
| pfxwSLO | numeric | PITCHf/x total runs above average on the slurve. |
| pfxwST | numeric | PITCHf/x total runs above average on the sweeper. |
| pfxwCUO | numeric | PITCHf/x total runs above average on the other curve. |
| pfxwFA/C | numeric | PITCHf/x runs above average per 100 four-seam fastballs. |
| pfxwFC/C | numeric | PITCHf/x runs above average per 100 cutters. |
| pfxwFS/C | numeric | PITCHf/x runs above average per 100 splitters. |
| pfxwSI/C | numeric | PITCHf/x runs above average per 100 sinkers. |
| pfxwSL/C | numeric | PITCHf/x runs above average per 100 sliders. |
| pfxwCU/C | numeric | PITCHf/x runs above average per 100 curveballs. |
| pfxwSLO/C | numeric | PITCHf/x runs above average per 100 slurves. |
| pfxwST/C | numeric | PITCHf/x runs above average per 100 sweepers. |
| pfxwCUO/C | numeric | PITCHf/x runs above average per 100 other curves. |
| pfxaaFA | numeric | PITCHf/x average spin/active component on the four-seam fastball. |
| pfxaaFC | numeric | PITCHf/x average spin/active component on the cutter. |
| pfxaaFS | numeric | PITCHf/x average spin/active component on the splitter. |
| pfxaaSI | numeric | PITCHf/x average spin/active component on the sinker. |
| pfxaaSL | numeric | PITCHf/x average spin/active component on the slider. |
| pfxaaCU | numeric | PITCHf/x average spin/active component on the curveball. |
| pfxaaSLO | numeric | PITCHf/x average spin/active component on the slurve. |
| pfxaaST | numeric | PITCHf/x average spin/active component on the sweeper. |
| pfxaaCUO | numeric | PITCHf/x average spin/active component on the other curve. |
| pfxspFA | numeric | PITCHf/x average spin rate on the four-seam fastball (rpm). |
| pfxspFC | numeric | PITCHf/x average spin rate on the cutter (rpm). |
| pfxspFS | numeric | PITCHf/x average spin rate on the splitter (rpm). |
| pfxspSI | numeric | PITCHf/x average spin rate on the sinker (rpm). |
| pfxspSL | numeric | PITCHf/x average spin rate on the slider (rpm). |
| pfxspCU | numeric | PITCHf/x average spin rate on the curveball (rpm). |
| pfxspSLO | numeric | PITCHf/x average spin rate on the slurve (rpm). |
| pfxspST | numeric | PITCHf/x average spin rate on the sweeper (rpm). |
| pfxspCUO | numeric | PITCHf/x average spin rate on the other curve (rpm). |
| pfxO-Swing% | numeric | PITCHf/x Swing rate on pitches outside the zone. |
| pfxZ-Swing% | numeric | PITCHf/x Swing rate on pitches in the zone. |
| pfxSwing% | numeric | PITCHf/x Overall swing rate. |
| pfxO-Contact% | numeric | PITCHf/x Contact rate on pitches outside the zone. |
| pfxZ-Contact% | numeric | PITCHf/x Contact rate on pitches in the zone. |
| pfxContact% | numeric | PITCHf/x Overall contact rate. |
| pfxZone% | numeric | PITCHf/x Rate of pitches in the strike zone. |
| pfxPace | numeric | PITCHf/x Average seconds between pitches. |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing% | numeric | Rate of fast swings. |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact% | numeric | Squared-up rate per contact. |
| SquaredUpSwing% | numeric | Squared-up rate per swing. |
| BlastContact% | numeric | Blast rate per contact. |
| BlastSwing% | numeric | Blast rate per swing. |
| Swords | numeric | Swords (especially ugly swinging strikeouts). |
| CompetitiveSwings | numeric | Competitive swings. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle% | numeric | Rate of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average depth in the batter's box (inches). |
| DistanceOffPlate | numeric | Average distance off the plate (inches). |
| scH-Swing% | numeric | Statcast heart-zone swing rate. |
| scH-Contact% | numeric | Statcast heart-zone contact rate. |
| scH-Zone% | numeric | Statcast heart-zone zone rate. |
| scS-Swing% | numeric | Statcast shadow-zone swing rate. |
| scS-Contact% | numeric | Statcast shadow-zone contact rate. |
| scS-Zone% | numeric | Statcast shadow-zone zone rate. |
| scC-Swing% | numeric | Statcast chase-zone swing rate. |
| scC-Contact% | numeric | Statcast chase-zone contact rate. |
| scC-Zone% | numeric | Statcast chase-zone zone rate. |
| scW-Swing% | numeric | Statcast waste-zone swing rate. |
| scW-Contact% | numeric | Statcast waste-zone contact rate. |
| scW-Zone% | numeric | Statcast waste-zone zone rate. |
| scSI-Swing% | numeric | Statcast in-zone strike-zone swing rate. |
| scSI-Contact% | numeric | Statcast in-zone strike-zone contact rate. |
| scSI-Zone% | numeric | Statcast in-zone strike-zone zone rate. |
| scSO-Swing% | numeric | Statcast out-of-zone strike-zone swing rate. |
| scSO-Contact% | numeric | Statcast out-of-zone strike-zone contact rate. |
| scSO-Zone% | numeric | Statcast out-of-zone strike-zone zone rate. |
| scO-Swing% | numeric | Statcast out-of-zone-zone swing rate. |
| scO-Contact% | numeric | Statcast out-of-zone-zone contact rate. |
| scO-Zone% | numeric | Statcast out-of-zone-zone zone rate. |
| scZ-Swing% | numeric | Statcast in-zone-zone swing rate. |
| scZ-Contact% | numeric | Statcast in-zone-zone contact rate. |
| scZ-Zone% | numeric | Statcast in-zone-zone zone rate. |
| piCU% | numeric | PITCHInfo curveball usage rate. |
| piFA% | numeric | PITCHInfo four-seam fastball usage rate. |
| piFC% | numeric | PITCHInfo cutter usage rate. |
| piFS% | numeric | PITCHInfo splitter usage rate. |
| piSI% | numeric | PITCHInfo sinker usage rate. |
| piSL% | numeric | PITCHInfo slider usage rate. |
| piXX% | numeric | PITCHInfo unknown/other pitch usage rate. |
| pivCU | numeric | PITCHInfo average curveball velocity (mph). |
| pivFA | numeric | PITCHInfo average four-seam fastball velocity (mph). |
| pivFC | numeric | PITCHInfo average cutter velocity (mph). |
| pivFS | numeric | PITCHInfo average splitter velocity (mph). |
| pivSI | numeric | PITCHInfo average sinker velocity (mph). |
| pivSL | numeric | PITCHInfo average slider velocity (mph). |
| pivXX | numeric | PITCHInfo average unknown/other pitch velocity (mph). |
| piCU-X | numeric | PITCHInfo horizontal movement of the curveball (inches). |
| piFA-X | numeric | PITCHInfo horizontal movement of the four-seam fastball (inches). |
| piFC-X | numeric | PITCHInfo horizontal movement of the cutter (inches). |
| piFS-X | numeric | PITCHInfo horizontal movement of the splitter (inches). |
| piSI-X | numeric | PITCHInfo horizontal movement of the sinker (inches). |
| piSL-X | numeric | PITCHInfo horizontal movement of the slider (inches). |
| piXX-X | numeric | PITCHInfo horizontal movement of the unknown/other pitch (inches). |
| piCU-Z | numeric | PITCHInfo vertical movement of the curveball (inches). |
| piFA-Z | numeric | PITCHInfo vertical movement of the four-seam fastball (inches). |
| piFC-Z | numeric | PITCHInfo vertical movement of the cutter (inches). |
| piFS-Z | numeric | PITCHInfo vertical movement of the splitter (inches). |
| piSI-Z | numeric | PITCHInfo vertical movement of the sinker (inches). |
| piSL-Z | numeric | PITCHInfo vertical movement of the slider (inches). |
| piXX-Z | numeric | PITCHInfo vertical movement of the unknown/other pitch (inches). |
| piwCU | numeric | PITCHInfo total runs above average on the curveball. |
| piwFA | numeric | PITCHInfo total runs above average on the four-seam fastball. |
| piwFC | numeric | PITCHInfo total runs above average on the cutter. |
| piwFS | numeric | PITCHInfo total runs above average on the splitter. |
| piwSI | numeric | PITCHInfo total runs above average on the sinker. |
| piwSL | numeric | PITCHInfo total runs above average on the slider. |
| piwXX | numeric | PITCHInfo total runs above average on the unknown/other pitch. |
| piwCU/C | numeric | PITCHInfo runs above average per 100 curveballs. |
| piwFA/C | numeric | PITCHInfo runs above average per 100 four-seam fastballs. |
| piwFC/C | numeric | PITCHInfo runs above average per 100 cutters. |
| piwFS/C | numeric | PITCHInfo runs above average per 100 splitters. |
| piwSI/C | numeric | PITCHInfo runs above average per 100 sinkers. |
| piwSL/C | numeric | PITCHInfo runs above average per 100 sliders. |
| piwXX/C | numeric | PITCHInfo runs above average per 100 unknown/other pitchs. |
| piO-Swing% | numeric | PITCHInfo Swing rate on pitches outside the zone. |
| piZ-Swing% | numeric | PITCHInfo Swing rate on pitches in the zone. |
| piSwing% | numeric | PITCHInfo Overall swing rate. |
| piO-Contact% | numeric | PITCHInfo Contact rate on pitches outside the zone. |
| piZ-Contact% | numeric | PITCHInfo Contact rate on pitches in the zone. |
| piContact% | numeric | PITCHInfo Overall contact rate. |
| piZone% | numeric | PITCHInfo Rate of pitches in the strike zone. |
| Events | numeric | Batted-ball events with Statcast data. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | numeric | Barreled batted balls. |
| Barrel% | numeric | Barrel rate (per batted-ball event). |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | numeric | Hard-hit batted balls (95+ mph). |
| HardHit% | numeric | Hard-hit rate (95+ mph). |
| gamedate | character | Game date as parsed from the source feed. |
| dh | integer | Doubleheader game indicator (0 = single game). |
try(fg_pitcher_game_logs(playerid = "19755", year = 2023))try(fg_pitcher_game_logs(playerid = "19755", year = 2023))
Scrape Pitcher Leaderboards from FanGraphs
fg_pitcher_leaders( age = "", pos = "all", stats = "pit", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_pitcher_leaders( age = "", pos = "all", stats = "pit", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0", pageitems = "10000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of pitcher data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| Throws | character | Throwing handedness (L/R). |
| xMLBAMID | integer | MLBAM player ID. |
| PlayerNameRoute | character | Player name URL slug used by FanGraphs. |
| PlayerName | character | Player name. |
| playerid | integer | FanGraphs player ID. |
| Age | integer | Player age. |
| AgeRng | character | Player age range across the span. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| W | integer | Wins. |
| L | integer | Losses. |
| ERA | numeric | Earned run average. |
| G | integer | Games played. |
| GS | integer | Games started. |
| QS | integer | Quality starts. |
| CG | integer | Complete games. |
| ShO | integer | Shutouts. |
| SV | integer | Saves. |
| BS | integer | Blown saves. |
| IP | numeric | Innings pitched. |
| TBF | integer | Total batters faced. |
| H | integer | Hits. |
| R | integer | Runs scored. |
| ER | integer | Earned runs allowed. |
| HR | integer | Home runs. |
| BB | integer | Walks (bases on balls). |
| IBB | integer | Intentional walks. |
| HBP | integer | Hit by pitch. |
| WP | integer | Wild pitches. |
| BK | integer | Balks. |
| SO | integer | Strikeouts. |
| GB | integer | Ground balls. |
| FB | integer | Fly balls. |
| LD | integer | Line drives. |
| IFFB | integer | Infield fly balls. |
| Pitches | integer | Total pitches seen or thrown. |
| Balls | integer | Total balls. |
| Strikes | integer | Total strikes. |
| RS | integer | Run support. |
| IFH | integer | Infield hits. |
| BU | integer | Bunts. |
| BUH | integer | Bunt hits. |
| K_9 | numeric | Strikeouts per nine innings. |
| BB_9 | numeric | Walks per nine innings. |
| K_BB | numeric | Strikeout-to-walk ratio. |
| H_9 | numeric | Hits allowed per nine innings. |
| HR_9 | numeric | Home runs allowed per nine innings. |
| AVG | numeric | Batting average (or opponent average for pitchers). |
| WHIP | numeric | Walks plus hits per inning pitched. |
| BABIP | numeric | Batting average on balls in play. |
| LOB_pct | numeric | Left-on-base percentage (strand rate). |
| FIP | numeric | Fielding Independent Pitching. |
| GB_FB | numeric | Ground-ball to fly-ball ratio. |
| LD_pct | numeric | Line-drive percentage. |
| GB_pct | numeric | Ground-ball percentage. |
| FB_pct | numeric | Fly-ball percentage. |
| IFFB_pct | numeric | Infield-fly-ball percentage. |
| HR_FB | numeric | Home-run-per-fly-ball rate. |
| IFH_pct | numeric | Infield-hit percentage. |
| BUH_pct | numeric | Bunt-hit percentage. |
| TTO_pct | numeric | Three-true-outcomes percentage (BB, K, HR). |
| CFraming | numeric | Catcher framing runs. |
| Starting | numeric | Starting-pitcher value (runs). |
| Start_IP | numeric | Innings pitched as a starter. |
| RAR | numeric | Runs Above Replacement. |
| WAR | numeric | Wins Above Replacement. |
| Dollars | numeric | Estimated market value of production. |
| RA9-Wins | numeric | Wins based on runs allowed per nine. |
| LOB-Wins | numeric | Wins attributable to strand rate. |
| BIP-Wins | numeric | Wins attributable to balls in play. |
| BS-Wins | numeric | Wins attributable to sequencing. |
| tERA | numeric | True ERA (batted-ball-based ERA estimator). |
| xFIP | numeric | Expected Fielding Independent Pitching. |
| WPA | numeric | Win Probability Added. |
| WPA_minus | numeric | Negative Win Probability Added. |
| WPA_plus | numeric | Positive Win Probability Added. |
| RE24 | numeric | Run Expectancy based on the 24 base-out states. |
| REW | numeric | Run Expectancy Wins. |
| pLI | numeric | Average Leverage Index. |
| inLI | numeric | Average Leverage Index entering the game. |
| gmLI | numeric | Average Leverage Index at game entry. |
| exLI | numeric | Average Leverage Index when exiting the game. |
| Pulls | integer | Times pulled from the game. |
| Games | integer | Games (relief context). |
| WPA_LI | numeric | Situational Win Probability Added (WPA divided by Leverage Index). |
| Clutch | numeric | Clutch performance relative to context-neutral performance. |
| FB_pct1 | numeric | Overall fastball percentage (pitch usage). |
| FBv | numeric | Average fastball velocity. |
| SL_pct | numeric | Slider percentage (pitch usage). |
| SLv | numeric | Average slider velocity. |
| CT_pct | numeric | Cutter percentage (pitch usage). |
| CTv | numeric | Average cutter velocity. |
| CB_pct | numeric | Curveball percentage (pitch usage). |
| CBv | numeric | Average curveball velocity. |
| SF_pct | numeric | Splitter percentage (pitch usage). |
| SFv | numeric | Average splitter velocity. |
| XX_pct | numeric | Unidentified-pitch percentage (pitch usage). |
| wFB | numeric | Fastball pitch-type linear weight runs. |
| wSL | numeric | Slider pitch-type linear weight runs. |
| wCT | numeric | Cutter pitch-type linear weight runs. |
| wCB | numeric | Curveball pitch-type linear weight runs. |
| wSF | numeric | Splitter pitch-type linear weight runs. |
| wFB_C | numeric | Fastball linear weight runs per 100 pitches. |
| wSL_C | numeric | Slider linear weight runs per 100 pitches. |
| wCT_C | numeric | Cutter linear weight runs per 100 pitches. |
| wCB_C | numeric | Curveball linear weight runs per 100 pitches. |
| wSF_C | numeric | Splitter linear weight runs per 100 pitches. |
| O-Swing_pct | numeric | Swing percentage on pitches outside the zone (chase rate). |
| Z-Swing_pct | numeric | Swing percentage on pitches inside the zone. |
| Swing_pct | numeric | Overall swing percentage. |
| O-Contact_pct | numeric | Contact percentage on pitches outside the zone. |
| Z-Contact_pct | numeric | Contact percentage on pitches inside the zone. |
| Contact_pct | numeric | Overall contact percentage. |
| Zone_pct | numeric | Percentage of pitches in the strike zone. |
| F-Strike_pct | numeric | First-pitch strike percentage. |
| SwStr_pct | numeric | Swinging-strike percentage. |
| CStr_pct | numeric | Called-strike percentage. |
| C+SwStr_pct | numeric | Combined called- plus swinging-strike percentage. |
| HLD | integer | Holds. |
| SD | integer | Shutdowns (relief appearances that improved win probability). |
| MD | integer | Meltdowns (relief appearances that hurt win probability). |
| ERA- | numeric | Park/league-adjusted ERA (100 = average, lower is better). |
| FIP- | numeric | Park/league-adjusted FIP (100 = average, lower is better). |
| xFIP- | numeric | Park/league-adjusted xFIP (100 = average, lower is better). |
| K_pct | numeric | Strikeout rate. |
| BB_pct | numeric | Walk rate. |
| K-BB_pct | numeric | Strikeout rate minus walk rate. |
| SIERA | numeric | Skill-Interactive ERA. |
| kwERA | numeric | Strikeout/walk-based ERA estimator. |
| RS_9 | numeric | Run support per nine innings. |
| E-F | numeric | Difference between ERA and FIP. |
| Pull | integer | Balls in play hit to the pull field. |
| Cent | integer | Balls in play hit up the middle. |
| Oppo | integer | Balls in play hit to the opposite field. |
| Soft | integer | Soft-contact balls in play. |
| Med | integer | Medium-contact balls in play. |
| Hard | integer | Hard-contact balls in play. |
| bipCount | integer | Count of balls in play with contact-quality data. |
| Pull_pct | numeric | Pull-field percentage. |
| Cent_pct | numeric | Up-the-middle percentage. |
| Oppo_pct | numeric | Opposite-field percentage. |
| Soft_pct | numeric | Soft-contact percentage. |
| Med_pct | numeric | Medium-contact percentage. |
| Hard_pct | numeric | Hard-contact percentage. |
| K_9+ | numeric | Park/league-adjusted strikeouts per nine (100 = average). |
| BB_9+ | numeric | Park/league-adjusted walks per nine (100 = average). |
| K_BB+ | numeric | Park/league-adjusted strikeout-to-walk ratio (100 = average). |
| H_9+ | numeric | Park/league-adjusted hits per nine (100 = average). |
| HR_9+ | numeric | Park/league-adjusted home runs per nine (100 = average). |
| AVG+ | numeric | Park/league-adjusted batting average (100 = average). |
| WHIP+ | numeric | Park/league-adjusted WHIP (100 = average). |
| BABIP+ | numeric | Park/league-adjusted BABIP (100 = average). |
| LOB_pct+ | numeric | Park/league-adjusted strand rate (100 = average). |
| K_pct+ | numeric | Park/league-adjusted strikeout rate (100 = average). |
| BB_pct+ | numeric | Park/league-adjusted walk rate (100 = average). |
| LD_pct+ | numeric | Park/league-adjusted line-drive rate (100 = average). |
| GB_pct+ | numeric | Park/league-adjusted ground-ball rate (100 = average). |
| FB_pct+ | numeric | Park/league-adjusted fly-ball rate (100 = average). |
| HRFB_pct+ | numeric | Park/league-adjusted home-run-per-fly-ball rate (100 = average). |
| Pull_pct+ | numeric | Park/league-adjusted pull rate (100 = average). |
| Cent_pct+ | numeric | Park/league-adjusted up-the-middle rate (100 = average). |
| Oppo_pct+ | numeric | Park/league-adjusted opposite-field rate (100 = average). |
| Soft_pct+ | numeric | Park/league-adjusted soft-contact rate (100 = average). |
| Med_pct+ | numeric | Park/league-adjusted medium-contact rate (100 = average). |
| Hard_pct+ | numeric | Park/league-adjusted hard-contact rate (100 = average). |
| xERA | numeric | Expected ERA (Statcast-based). |
| pb_o_CH | numeric | PitchingBot overall grade on changeups. |
| pb_s_CH | numeric | PitchingBot stuff grade on changeups. |
| pb_c_CH | numeric | PitchingBot command grade on changeups. |
| pb_o_CU | numeric | PitchingBot overall grade on curveballs. |
| pb_s_CU | numeric | PitchingBot stuff grade on curveballs. |
| pb_c_CU | numeric | PitchingBot command grade on curveballs. |
| pb_o_FF | numeric | PitchingBot overall grade on four-seam fastballs. |
| pb_s_FF | numeric | PitchingBot stuff grade on four-seam fastballs. |
| pb_c_FF | numeric | PitchingBot command grade on four-seam fastballs. |
| pb_o_SI | numeric | PitchingBot overall grade on sinkers. |
| pb_s_SI | numeric | PitchingBot stuff grade on sinkers. |
| pb_c_SI | numeric | PitchingBot command grade on sinkers. |
| pb_o_SL | numeric | PitchingBot overall grade on sliders. |
| pb_s_SL | numeric | PitchingBot stuff grade on sliders. |
| pb_c_SL | numeric | PitchingBot command grade on sliders. |
| pb_o_FC | numeric | PitchingBot overall grade on cutters. |
| pb_s_FC | numeric | PitchingBot stuff grade on cutters. |
| pb_c_FC | numeric | PitchingBot command grade on cutters. |
| pb_overall | numeric | PitchingBot overall grade. |
| pb_stuff | numeric | PitchingBot stuff grade. |
| pb_command | numeric | PitchingBot command grade. |
| pb_xRV100 | numeric | PitchingBot expected run value per 100 pitches. |
| pb_ERA | numeric | PitchingBot-modeled ERA. |
| sp_s_CH | numeric | Stuff+ grade on changeups (100 = average). |
| sp_l_CH | numeric | Location+ grade on changeups (100 = average). |
| sp_p_CH | numeric | Pitching+ grade on changeups (100 = average). |
| sp_s_CU | numeric | Stuff+ grade on curveballs (100 = average). |
| sp_l_CU | numeric | Location+ grade on curveballs (100 = average). |
| sp_p_CU | numeric | Pitching+ grade on curveballs (100 = average). |
| sp_s_FF | numeric | Stuff+ grade on four-seam fastballs (100 = average). |
| sp_l_FF | numeric | Location+ grade on four-seam fastballs (100 = average). |
| sp_p_FF | numeric | Pitching+ grade on four-seam fastballs (100 = average). |
| sp_s_SI | numeric | Stuff+ grade on sinkers (100 = average). |
| sp_l_SI | numeric | Location+ grade on sinkers (100 = average). |
| sp_p_SI | numeric | Pitching+ grade on sinkers (100 = average). |
| sp_s_SL | numeric | Stuff+ grade on sliders (100 = average). |
| sp_l_SL | numeric | Location+ grade on sliders (100 = average). |
| sp_p_SL | numeric | Pitching+ grade on sliders (100 = average). |
| sp_s_FC | numeric | Stuff+ grade on cutters (100 = average). |
| sp_l_FC | numeric | Location+ grade on cutters (100 = average). |
| sp_p_FC | numeric | Pitching+ grade on cutters (100 = average). |
| sp_stuff | numeric | Stuff+ overall grade (pitch quality, 100 = average). |
| sp_location | numeric | Location+ overall grade (command, 100 = average). |
| sp_pitching | numeric | Pitching+ overall grade (Stuff+ and Location+ combined, 100 = average). |
| PPTV | integer | Pitch-type pitch values (raw component). |
| CPTV | integer | Catcher pitch-type value (raw component). |
| BPTV | integer | Batter pitch-type value (raw component). |
| DSV | integer | Defensive stuff value (raw component). |
| DGV | integer | Defensive game value (raw component). |
| BTV | integer | Base-state team value (raw component). |
| rPPTV | numeric | Regressed pitch-type pitch values. |
| rBPTV | numeric | Regressed batter pitch-type value. |
| EBV | integer | Earned-base value (raw component). |
| ESV | integer | Earned-strike value (raw component). |
| rFTeamV | numeric | Regressed fielding team value. |
| rBTeamV | numeric | Regressed base-running team value. |
| rTV | numeric | Regressed total team value. |
| pfx_FA_pct | numeric | PITCHf/x four-seam fastballs usage percentage. |
| pfx_FC_pct | numeric | PITCHf/x cutters usage percentage. |
| pfx_SI_pct | numeric | PITCHf/x sinkers usage percentage. |
| pfx_SL_pct | numeric | PITCHf/x sliders usage percentage. |
| pfx_CU_pct | numeric | PITCHf/x curveballs usage percentage. |
| pfx_CH_pct | numeric | PITCHf/x changeups usage percentage. |
| pfx_ST_pct | numeric | PITCHf/x sweepers usage percentage. |
| pfx_CUO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_vFA | numeric | PITCHf/x average four-seam fastballs velocity. |
| pfx_vFC | numeric | PITCHf/x average cutters velocity. |
| pfx_vSI | numeric | PITCHf/x average sinkers velocity. |
| pfx_vSL | numeric | PITCHf/x average sliders velocity. |
| pfx_vCU | numeric | PITCHf/x average curveballs velocity. |
| pfx_vCH | numeric | PITCHf/x average changeups velocity. |
| pfx_vST | numeric | PITCHf/x average sweepers velocity. |
| pfx_vCUO | numeric | PITCHf/x average slurves velocity. |
| pfx_FA-X | numeric | PITCHf/x average horizontal movement on four-seam fastballs. |
| pfx_FC-X | numeric | PITCHf/x average horizontal movement on cutters. |
| pfx_SI-X | numeric | PITCHf/x average horizontal movement on sinkers. |
| pfx_SL-X | numeric | PITCHf/x average horizontal movement on sliders. |
| pfx_CU-X | numeric | PITCHf/x average horizontal movement on curveballs. |
| pfx_CH-X | numeric | PITCHf/x average horizontal movement on changeups. |
| pfx_ST-X | numeric | PITCHf/x average horizontal movement on sweepers. |
| pfx_CUO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_FA-Z | numeric | PITCHf/x average vertical movement on four-seam fastballs. |
| pfx_FC-Z | numeric | PITCHf/x average vertical movement on cutters. |
| pfx_SI-Z | numeric | PITCHf/x average vertical movement on sinkers. |
| pfx_SL-Z | numeric | PITCHf/x average vertical movement on sliders. |
| pfx_CU-Z | numeric | PITCHf/x average vertical movement on curveballs. |
| pfx_CH-Z | numeric | PITCHf/x average vertical movement on changeups. |
| pfx_ST-Z | numeric | PITCHf/x average vertical movement on sweepers. |
| pfx_CUO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_wFA | numeric | PITCHf/x four-seam fastballs linear weight runs. |
| pfx_wFC | numeric | PITCHf/x cutters linear weight runs. |
| pfx_wSI | numeric | PITCHf/x sinkers linear weight runs. |
| pfx_wSL | numeric | PITCHf/x sliders linear weight runs. |
| pfx_wCU | numeric | PITCHf/x curveballs linear weight runs. |
| pfx_wCH | numeric | PITCHf/x changeups linear weight runs. |
| pfx_wST | numeric | PITCHf/x sweepers linear weight runs. |
| pfx_wCUO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wFA_C | numeric | PITCHf/x four-seam fastballs linear weight runs per 100 pitches. |
| pfx_wFC_C | numeric | PITCHf/x cutters linear weight runs per 100 pitches. |
| pfx_wSI_C | numeric | PITCHf/x sinkers linear weight runs per 100 pitches. |
| pfx_wSL_C | numeric | PITCHf/x sliders linear weight runs per 100 pitches. |
| pfx_wCU_C | numeric | PITCHf/x curveballs linear weight runs per 100 pitches. |
| pfx_wCH_C | numeric | PITCHf/x changeups linear weight runs per 100 pitches. |
| pfx_wST_C | numeric | PITCHf/x sweepers linear weight runs per 100 pitches. |
| pfx_wCUO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_aaFA | numeric | PITCHf/x average arsenal value on four-seam fastballs. |
| pfx_aaFC | numeric | PITCHf/x average arsenal value on cutters. |
| pfx_aaSI | numeric | PITCHf/x average arsenal value on sinkers. |
| pfx_aaSL | numeric | PITCHf/x average arsenal value on sliders. |
| pfx_aaCU | numeric | PITCHf/x average arsenal value on curveballs. |
| pfx_aaCH | numeric | PITCHf/x average arsenal value on changeups. |
| pfx_aaST | numeric | PITCHf/x average arsenal value on sweepers. |
| pfx_aaCUO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_spFA | numeric | PITCHf/x Stuff+ value on four-seam fastballs. |
| pfx_spFC | numeric | PITCHf/x Stuff+ value on cutters. |
| pfx_spSI | numeric | PITCHf/x Stuff+ value on sinkers. |
| pfx_spSL | numeric | PITCHf/x Stuff+ value on sliders. |
| pfx_spCU | numeric | PITCHf/x Stuff+ value on curveballs. |
| pfx_spCH | numeric | PITCHf/x Stuff+ value on changeups. |
| pfx_spST | numeric | PITCHf/x Stuff+ value on sweepers. |
| pfx_spCUO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_O-Swing_pct | numeric | PITCHf/x swing percentage on pitches outside the zone. |
| pfx_Z-Swing_pct | numeric | PITCHf/x swing percentage on pitches inside the zone. |
| pfx_Swing_pct | numeric | PITCHf/x swing percentage. |
| pfx_O-Contact_pct | numeric | PITCHf/x contact percentage on pitches outside the zone. |
| pfx_Z-Contact_pct | numeric | PITCHf/x contact percentage on pitches inside the zone. |
| pfx_Contact_pct | numeric | PITCHf/x contact percentage. |
| pfx_Zone_pct | numeric | PITCHf/x percentage of pitches in the strike zone. |
| pfx_Pace | numeric | PITCHf/x pace (seconds between pitches). |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing_pct | numeric | Fast-swing percentage (75+ mph bat speed). |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact_pct | numeric | Squared-up percentage per batted-ball contact. |
| SquaredUpSwing_pct | numeric | Squared-up percentage per swing. |
| BlastContact_pct | numeric | Blast percentage per batted-ball contact. |
| BlastSwing_pct | numeric | Blast percentage per swing. |
| Swords | integer | Swords (awkward, defensive swinging strikes induced). |
| CompetitiveSwings | integer | Competitive swings tracked. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle_pct | numeric | Percentage of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average batter depth in the box (inches). |
| DistanceOffPlate | numeric | Average batter distance off the plate (inches). |
| scH-Swing_pct | numeric | Statcast swing percentage on hard-hit pitches. |
| scH-Contact_pct | numeric | Statcast contact percentage on hard-hit pitches. |
| scH-Zone_pct | numeric | Statcast in-zone percentage on hard-hit pitches. |
| scS-Swing_pct | numeric | Statcast swing percentage on slider pitches. |
| scS-Contact_pct | numeric | Statcast contact percentage on slider pitches. |
| scS-Zone_pct | numeric | Statcast in-zone percentage on slider pitches. |
| scC-Swing_pct | numeric | Statcast swing percentage on curveball pitches. |
| scC-Contact_pct | numeric | Statcast contact percentage on curveball pitches. |
| scC-Zone_pct | numeric | Statcast in-zone percentage on curveball pitches. |
| scW-Swing_pct | numeric | Statcast swing percentage on offspeed pitches. |
| scW-Contact_pct | numeric | Statcast contact percentage on offspeed pitches. |
| scW-Zone_pct | numeric | Statcast in-zone percentage on offspeed pitches. |
| scSI-Swing_pct | numeric | Statcast swing percentage on sinker pitches. |
| scSI-Contact_pct | numeric | Statcast contact percentage on sinker pitches. |
| scSI-Zone_pct | numeric | Statcast in-zone percentage on sinker pitches. |
| scSO-Swing_pct | numeric | Statcast swing percentage on softly-hit pitches. |
| scSO-Contact_pct | numeric | Statcast contact percentage on softly-hit pitches. |
| scSO-Zone_pct | numeric | Statcast in-zone percentage on softly-hit pitches. |
| scO-Swing_pct | numeric | Statcast swing percentage on out-of-zone pitches. |
| scO-Contact_pct | numeric | Statcast contact percentage on out-of-zone pitches. |
| scO-Zone_pct | numeric | Statcast in-zone percentage on out-of-zone pitches. |
| scZ-Swing_pct | numeric | Statcast swing percentage on in-zone pitches. |
| scZ-Contact_pct | numeric | Statcast contact percentage on in-zone pitches. |
| scZ-Zone_pct | numeric | Statcast in-zone percentage on in-zone pitches. |
| pi_CH_pct | numeric | PITCHInfo changeups usage percentage. |
| pi_CU_pct | numeric | PITCHInfo curveballs usage percentage. |
| pi_FA_pct | numeric | PITCHInfo four-seam fastballs usage percentage. |
| pi_SI_pct | numeric | PITCHInfo sinkers usage percentage. |
| pi_SL_pct | numeric | PITCHInfo sliders usage percentage. |
| pi_vCH | numeric | PITCHInfo average changeups velocity. |
| pi_vCU | numeric | PITCHInfo average curveballs velocity. |
| pi_vFA | numeric | PITCHInfo average four-seam fastballs velocity. |
| pi_vSI | numeric | PITCHInfo average sinkers velocity. |
| pi_vSL | numeric | PITCHInfo average sliders velocity. |
| pi_CH-X | numeric | PITCHInfo average horizontal movement on changeups. |
| pi_CU-X | numeric | PITCHInfo average horizontal movement on curveballs. |
| pi_FA-X | numeric | PITCHInfo average horizontal movement on four-seam fastballs. |
| pi_SI-X | numeric | PITCHInfo average horizontal movement on sinkers. |
| pi_SL-X | numeric | PITCHInfo average horizontal movement on sliders. |
| pi_CH-Z | numeric | PITCHInfo average vertical movement on changeups. |
| pi_CU-Z | numeric | PITCHInfo average vertical movement on curveballs. |
| pi_FA-Z | numeric | PITCHInfo average vertical movement on four-seam fastballs. |
| pi_SI-Z | numeric | PITCHInfo average vertical movement on sinkers. |
| pi_SL-Z | numeric | PITCHInfo average vertical movement on sliders. |
| pi_wCH | numeric | PITCHInfo changeups linear weight runs. |
| pi_wCU | numeric | PITCHInfo curveballs linear weight runs. |
| pi_wFA | numeric | PITCHInfo four-seam fastballs linear weight runs. |
| pi_wSI | numeric | PITCHInfo sinkers linear weight runs. |
| pi_wSL | numeric | PITCHInfo sliders linear weight runs. |
| pi_wCH_C | numeric | PITCHInfo changeups linear weight runs per 100 pitches. |
| pi_wCU_C | numeric | PITCHInfo curveballs linear weight runs per 100 pitches. |
| pi_wFA_C | numeric | PITCHInfo four-seam fastballs linear weight runs per 100 pitches. |
| pi_wSI_C | numeric | PITCHInfo sinkers linear weight runs per 100 pitches. |
| pi_wSL_C | numeric | PITCHInfo sliders linear weight runs per 100 pitches. |
| pi_O-Swing_pct | numeric | PITCHInfo swing percentage on pitches outside the zone. |
| pi_Z-Swing_pct | numeric | PITCHInfo swing percentage on pitches inside the zone. |
| pi_Swing_pct | numeric | PITCHInfo swing percentage. |
| pi_O-Contact_pct | numeric | PITCHInfo contact percentage on pitches outside the zone. |
| pi_Z-Contact_pct | numeric | PITCHInfo contact percentage on pitches inside the zone. |
| pi_Contact_pct | numeric | PITCHInfo contact percentage. |
| pi_Zone_pct | numeric | PITCHInfo percentage of pitches in the strike zone. |
| pi_Pace | numeric | PITCHInfo pace (seconds between pitches). |
| Events | integer | Batted-ball events with Statcast measurement. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | integer | Barreled batted balls. |
| Barrel_pct | numeric | Barrel percentage. |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | integer | Hard-hit batted balls (95+ mph). |
| HardHit_pct | numeric | Hard-hit percentage (95+ mph). |
| Q | numeric | Quality of contact / quality score. |
| TG | integer | Total games in the span. |
| TIP | numeric | Total innings pitched in the span. |
| positionDB | character | Position code from the database. |
| position | character | Position played. |
| team_name_abb | character | Team name abbreviation. |
| teamid | integer | FanGraphs team ID. |
| playerTeamId | integer | FanGraphs player-team ID. |
| EV90 | numeric | 90th-percentile exit velocity (mph). |
| CH_pct | numeric | Changeup percentage (pitch usage). |
| CHv | numeric | Average changeup velocity. |
| wCH | numeric | Changeup pitch-type linear weight runs. |
| wCH_C | numeric | Changeup linear weight runs per 100 pitches. |
| pfx_SLO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_vSLO | numeric | PITCHf/x average slurves velocity. |
| pfx_SLO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_SLO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_wSLO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wSLO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_aaSLO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_spSLO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_KC_pct | numeric | PITCHf/x knuckle-curves usage percentage. |
| pfx_vKC | numeric | PITCHf/x average knuckle-curves velocity. |
| pfx_KC-X | numeric | PITCHf/x average horizontal movement on knuckle-curves. |
| pfx_KC-Z | numeric | PITCHf/x average vertical movement on knuckle-curves. |
| pfx_wKC | numeric | PITCHf/x knuckle-curves linear weight runs. |
| pfx_wKC_C | numeric | PITCHf/x knuckle-curves linear weight runs per 100 pitches. |
| pfx_aaKC | numeric | PITCHf/x average arsenal value on knuckle-curves. |
| pfx_spKC | numeric | PITCHf/x Stuff+ value on knuckle-curves. |
| pi_FC_pct | numeric | PITCHInfo cutters usage percentage. |
| pi_vFC | numeric | PITCHInfo average cutters velocity. |
| pi_FC-X | numeric | PITCHInfo average horizontal movement on cutters. |
| pi_FC-Z | numeric | PITCHInfo average vertical movement on cutters. |
| pi_wFC | numeric | PITCHInfo cutters linear weight runs. |
| pi_wFC_C | numeric | PITCHInfo cutters linear weight runs per 100 pitches. |
| pb_o_KC | numeric | PitchingBot overall grade on knuckle-curves. |
| pb_s_KC | numeric | PitchingBot stuff grade on knuckle-curves. |
| pb_c_KC | numeric | PitchingBot command grade on knuckle-curves. |
| sp_s_KC | numeric | Stuff+ grade on knuckle-curves (100 = average). |
| sp_l_KC | numeric | Location+ grade on knuckle-curves (100 = average). |
| sp_p_KC | numeric | Pitching+ grade on knuckle-curves (100 = average). |
| rBTV | numeric | Regressed base-state team value. |
| pb_o_FS | numeric | PitchingBot overall grade on splitters. |
| pb_s_FS | numeric | PitchingBot stuff grade on splitters. |
| pb_c_FS | numeric | PitchingBot command grade on splitters. |
| sp_s_FS | numeric | Stuff+ grade on splitters (100 = average). |
| sp_l_FS | numeric | Location+ grade on splitters (100 = average). |
| sp_p_FS | numeric | Pitching+ grade on splitters (100 = average). |
| pfx_FS_pct | numeric | PITCHf/x splitters usage percentage. |
| pfx_vFS | numeric | PITCHf/x average splitters velocity. |
| pfx_FS-X | numeric | PITCHf/x average horizontal movement on splitters. |
| pfx_FS-Z | numeric | PITCHf/x average vertical movement on splitters. |
| pfx_wFS | numeric | PITCHf/x splitters linear weight runs. |
| pfx_wFS_C | numeric | PITCHf/x splitters linear weight runs per 100 pitches. |
| pfx_aaFS | numeric | PITCHf/x average arsenal value on splitters. |
| pfx_spFS | numeric | PITCHf/x Stuff+ value on splitters. |
| pi_FS_pct | numeric | PITCHInfo splitters usage percentage. |
| pi_vFS | numeric | PITCHInfo average splitters velocity. |
| pi_FS-X | numeric | PITCHInfo average horizontal movement on splitters. |
| pi_FS-Z | numeric | PITCHInfo average vertical movement on splitters. |
| pi_wFS | numeric | PITCHInfo splitters linear weight runs. |
| pi_wFS_C | numeric | PITCHInfo splitters linear weight runs per 100 pitches. |
| rCPTV | numeric | Regressed catcher pitch-type value. |
| KN_pct | numeric | Knuckleball percentage (pitch usage). |
| KNv | numeric | Average knuckleball velocity. |
| wKN | numeric | Knuckleball pitch-type linear weight runs. |
| wKN_C | numeric | Knuckleball linear weight runs per 100 pitches. |
| pfx_KN_pct | numeric | PITCHf/x knuckleballs usage percentage. |
| pfx_vKN | numeric | PITCHf/x average knuckleballs velocity. |
| pfx_KN-X | numeric | PITCHf/x average horizontal movement on knuckleballs. |
| pfx_KN-Z | numeric | PITCHf/x average vertical movement on knuckleballs. |
| pfx_wKN | numeric | PITCHf/x knuckleballs linear weight runs. |
| pfx_wKN_C | numeric | PITCHf/x knuckleballs linear weight runs per 100 pitches. |
| pfx_aaKN | numeric | PITCHf/x average arsenal value on knuckleballs. |
| pfx_spKN | numeric | PITCHf/x Stuff+ value on knuckleballs. |
| pi_KN_pct | numeric | PITCHInfo knuckleballs usage percentage. |
| pi_XX_pct | numeric | PITCHInfo unidentified pitches usage percentage. |
| pi_vKN | numeric | PITCHInfo average knuckleballs velocity. |
| pi_vXX | numeric | PITCHInfo average unidentified pitches velocity. |
| pi_KN-X | numeric | PITCHInfo average horizontal movement on knuckleballs. |
| pi_XX-X | numeric | PITCHInfo average horizontal movement on unidentified pitches. |
| pi_KN-Z | numeric | PITCHInfo average vertical movement on knuckleballs. |
| pi_XX-Z | numeric | PITCHInfo average vertical movement on unidentified pitches. |
| pi_wKN | numeric | PITCHInfo knuckleballs linear weight runs. |
| pi_wXX | numeric | PITCHInfo unidentified pitches linear weight runs. |
| pi_wKN_C | numeric | PITCHInfo knuckleballs linear weight runs per 100 pitches. |
| pi_wXX_C | numeric | PITCHInfo unidentified pitches linear weight runs per 100 pitches. |
| sp_s_FO | numeric | Stuff+ grade on forkballs/pitch-outs (100 = average). |
| sp_l_FO | numeric | Location+ grade on forkballs/pitch-outs (100 = average). |
| sp_p_FO | numeric | Pitching+ grade on forkballs/pitch-outs (100 = average). |
| pfx_FO_pct | numeric | PITCHf/x forkballs/pitch-outs usage percentage. |
| pfx_vFO | numeric | PITCHf/x average forkballs/pitch-outs velocity. |
| pfx_FO-X | numeric | PITCHf/x average horizontal movement on forkballs/pitch-outs. |
| pfx_FO-Z | numeric | PITCHf/x average vertical movement on forkballs/pitch-outs. |
| pfx_wFO | numeric | PITCHf/x forkballs/pitch-outs linear weight runs. |
| pfx_wFO_C | numeric | PITCHf/x forkballs/pitch-outs linear weight runs per 100 pitches. |
| pfx_aaFO | numeric | PITCHf/x average arsenal value on forkballs/pitch-outs. |
| pfx_spFO | numeric | PITCHf/x Stuff+ value on forkballs/pitch-outs. |
| rDGV | numeric | Regressed defensive game value. |
| Relieving | numeric | Relief-pitcher value (runs). |
| Relief_IP | numeric | Innings pitched in relief. |
| pi_CS_pct | numeric | PITCHInfo slow curves usage percentage. |
| pi_vCS | numeric | PITCHInfo average slow curves velocity. |
| pi_CS-X | numeric | PITCHInfo average horizontal movement on slow curves. |
| pi_CS-Z | numeric | PITCHInfo average vertical movement on slow curves. |
| pi_wCS | numeric | PITCHInfo slow curves linear weight runs. |
| pi_wCS_C | numeric | PITCHInfo slow curves linear weight runs per 100 pitches. |
| pfx_CV_pct | numeric | PITCHf/x slow curves usage percentage. |
| pfx_vCV | numeric | PITCHf/x average slow curves velocity. |
| pfx_CV-X | numeric | PITCHf/x average horizontal movement on slow curves. |
| pfx_CV-Z | numeric | PITCHf/x average vertical movement on slow curves. |
| pfx_wCV | numeric | PITCHf/x slow curves linear weight runs. |
| pfx_wCV_C | numeric | PITCHf/x slow curves linear weight runs per 100 pitches. |
| pfx_aaCV | numeric | PITCHf/x average arsenal value on slow curves. |
| pfx_spCV | numeric | PITCHf/x Stuff+ value on slow curves. |
| rDSV | numeric | Regressed defensive stuff value. |
| pfx_EP_pct | numeric | PITCHf/x eephus pitches usage percentage. |
| pfx_vEP | numeric | PITCHf/x average eephus pitches velocity. |
| pfx_EP-X | numeric | PITCHf/x average horizontal movement on eephus pitches. |
| pfx_EP-Z | numeric | PITCHf/x average vertical movement on eephus pitches. |
| pfx_wEP | numeric | PITCHf/x eephus pitches linear weight runs. |
| pfx_wEP_C | numeric | PITCHf/x eephus pitches linear weight runs per 100 pitches. |
| pfx_aaEP | numeric | PITCHf/x average arsenal value on eephus pitches. |
| pfx_spEP | numeric | PITCHf/x Stuff+ value on eephus pitches. |
| pfx_SC_pct | numeric | PITCHf/x screwballs usage percentage. |
| pfx_vSC | numeric | PITCHf/x average screwballs velocity. |
| pfx_SC-X | numeric | PITCHf/x average horizontal movement on screwballs. |
| pfx_SC-Z | numeric | PITCHf/x average vertical movement on screwballs. |
| pfx_wSC | numeric | PITCHf/x screwballs linear weight runs. |
| pfx_wSC_C | numeric | PITCHf/x screwballs linear weight runs per 100 pitches. |
| pfx_aaSC | numeric | PITCHf/x average arsenal value on screwballs. |
| pfx_spSC | numeric | PITCHf/x Stuff+ value on screwballs. |
| pi_SB_pct | numeric | PITCHInfo slow-balls usage percentage. |
| pi_vSB | numeric | PITCHInfo average slow-balls velocity. |
| pi_SB-X | numeric | PITCHInfo average horizontal movement on slow-balls. |
| pi_SB-Z | numeric | PITCHInfo average vertical movement on slow-balls. |
| pi_wSB | numeric | PITCHInfo slow-balls linear weight runs. |
| pi_wSB_C | numeric | PITCHInfo slow-balls linear weight runs per 100 pitches. |
try(fg_pitcher_leaders(startseason = 2023, endseason = 2023))try(fg_pitcher_leaders(startseason = 2023, endseason = 2023))
This function allows you to scrape all leaderboard statistics (basic and advanced) from FanGraphs.com.
fg_team_batter( age = "", pos = "all", stats = "bat", lg = "all", qual = "y", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_team_batter( age = "", pos = "all", stats = "bat", lg = "all", qual = "y", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of batter data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| G | integer | Games played. |
| AB | integer | At-bats. |
| PA | integer | Plate appearances. |
| H | integer | Hits. |
| 1B | integer | Singles. |
| 2B | integer | Doubles. |
| 3B | integer | Triples. |
| HR | integer | Home runs. |
| R | integer | Runs scored. |
| RBI | integer | Runs batted in. |
| BB | integer | Walks (bases on balls). |
| IBB | integer | Intentional walks. |
| SO | integer | Strikeouts. |
| HBP | integer | Hit by pitch. |
| SF | integer | Sacrifice flies. |
| SH | integer | Sacrifice hits (bunts). |
| GDP | integer | Grounded into double plays. |
| SB | integer | Stolen bases. |
| CS | integer | Caught stealing. |
| AVG | numeric | Batting average (or opponent average for pitchers). |
| GB | integer | Ground balls. |
| FB | integer | Fly balls. |
| LD | integer | Line drives. |
| IFFB | integer | Infield fly balls. |
| Pitches | integer | Total pitches seen or thrown. |
| Balls | integer | Total balls. |
| Strikes | integer | Total strikes. |
| IFH | integer | Infield hits. |
| BU | integer | Bunts. |
| BUH | integer | Bunt hits. |
| BB_pct | numeric | Walk rate. |
| K_pct | numeric | Strikeout rate. |
| BB_K | numeric | Walk-to-strikeout ratio. |
| OBP | numeric | On-base percentage. |
| SLG | numeric | Slugging percentage. |
| OPS | numeric | On-base plus slugging. |
| ISO | numeric | Isolated power. |
| BABIP | numeric | Batting average on balls in play. |
| GB_FB | numeric | Ground-ball to fly-ball ratio. |
| LD_pct | numeric | Line-drive percentage. |
| GB_pct | numeric | Ground-ball percentage. |
| FB_pct | numeric | Fly-ball percentage. |
| IFFB_pct | numeric | Infield-fly-ball percentage. |
| HR_FB | numeric | Home-run-per-fly-ball rate. |
| IFH_pct | numeric | Infield-hit percentage. |
| BUH_pct | numeric | Bunt-hit percentage. |
| TTO_pct | numeric | Three-true-outcomes percentage (BB, K, HR). |
| wOBA | numeric | Weighted On-Base Average. |
| wRAA | numeric | Weighted Runs Above Average. |
| wRC | numeric | Weighted Runs Created. |
| Batting | numeric | Batting runs above average. |
| Fielding | numeric | Fielding runs above average. |
| Replacement | numeric | Replacement-level runs. |
| Positional | numeric | Positional adjustment runs. |
| wLeague | numeric | League adjustment runs. |
| CFraming | numeric | Catcher framing runs. |
| Defense | numeric | Total defensive value (runs above average). |
| Offense | numeric | Total offensive value (runs above average). |
| RAR | numeric | Runs Above Replacement. |
| WAR | numeric | Wins Above Replacement. |
| WAROld | numeric | Wins Above Replacement (legacy formulation). |
| Dollars | numeric | Estimated market value of production. |
| BaseRunning | numeric | Base-running runs above average. |
| Spd | numeric | Speed Score. |
| wRC_plus | numeric | Weighted Runs Created Plus (park/league-adjusted, 100 = average). |
| wBsR | numeric | Weighted Base Running runs. |
| WPA | numeric | Win Probability Added. |
| WPA_minus | numeric | Negative Win Probability Added. |
| WPA_plus | numeric | Positive Win Probability Added. |
| RE24 | numeric | Run Expectancy based on the 24 base-out states. |
| REW | numeric | Run Expectancy Wins. |
| pLI | numeric | Average Leverage Index. |
| phLI | numeric | Average Leverage Index in pinch-hit appearances. |
| PH | integer | Pinch-hit appearances. |
| WPA_LI | numeric | Situational Win Probability Added (WPA divided by Leverage Index). |
| Clutch | numeric | Clutch performance relative to context-neutral performance. |
| FBall_pct | numeric | Overall fastball percentage. |
| FBv | numeric | Average fastball velocity. |
| SL_pct | numeric | Slider percentage (pitch usage). |
| SLv | numeric | Average slider velocity. |
| CT_pct | numeric | Cutter percentage (pitch usage). |
| CTv | numeric | Average cutter velocity. |
| CB_pct | numeric | Curveball percentage (pitch usage). |
| CBv | numeric | Average curveball velocity. |
| CH_pct | numeric | Changeup percentage (pitch usage). |
| CHv | numeric | Average changeup velocity. |
| SF_pct | numeric | Splitter percentage (pitch usage). |
| SFv | numeric | Average splitter velocity. |
| XX_pct | numeric | Unidentified-pitch percentage (pitch usage). |
| wFB | numeric | Fastball pitch-type linear weight runs. |
| wSL | numeric | Slider pitch-type linear weight runs. |
| wCT | numeric | Cutter pitch-type linear weight runs. |
| wCB | numeric | Curveball pitch-type linear weight runs. |
| wCH | numeric | Changeup pitch-type linear weight runs. |
| wSF | numeric | Splitter pitch-type linear weight runs. |
| wFB_C | numeric | Fastball linear weight runs per 100 pitches. |
| wSL_C | numeric | Slider linear weight runs per 100 pitches. |
| wCT_C | numeric | Cutter linear weight runs per 100 pitches. |
| wCB_C | numeric | Curveball linear weight runs per 100 pitches. |
| wCH_C | numeric | Changeup linear weight runs per 100 pitches. |
| wSF_C | numeric | Splitter linear weight runs per 100 pitches. |
| O-Swing_pct | numeric | Swing percentage on pitches outside the zone (chase rate). |
| Z-Swing_pct | numeric | Swing percentage on pitches inside the zone. |
| Swing_pct | numeric | Overall swing percentage. |
| O-Contact_pct | numeric | Contact percentage on pitches outside the zone. |
| Z-Contact_pct | numeric | Contact percentage on pitches inside the zone. |
| Contact_pct | numeric | Overall contact percentage. |
| Zone_pct | numeric | Percentage of pitches in the strike zone. |
| F-Strike_pct | numeric | First-pitch strike percentage. |
| SwStr_pct | numeric | Swinging-strike percentage. |
| CStr_pct | numeric | Called-strike percentage. |
| C+SwStr_pct | numeric | Combined called- plus swinging-strike percentage. |
| Pull | integer | Balls in play hit to the pull field. |
| Cent | integer | Balls in play hit up the middle. |
| Oppo | integer | Balls in play hit to the opposite field. |
| Soft | integer | Soft-contact balls in play. |
| Med | integer | Medium-contact balls in play. |
| Hard | integer | Hard-contact balls in play. |
| bipCount | integer | Count of balls in play with contact-quality data. |
| Pull_pct | numeric | Pull-field percentage. |
| Cent_pct | numeric | Up-the-middle percentage. |
| Oppo_pct | numeric | Opposite-field percentage. |
| Soft_pct | numeric | Soft-contact percentage. |
| Med_pct | numeric | Medium-contact percentage. |
| Hard_pct | numeric | Hard-contact percentage. |
| UBR | numeric | Ultimate Base Running runs. |
| GDPRuns | numeric | Runs from grounded-into-double-play avoidance. |
| AVG+ | numeric | Park/league-adjusted batting average (100 = average). |
| BB_pct+ | numeric | Park/league-adjusted walk rate (100 = average). |
| K_pct+ | numeric | Park/league-adjusted strikeout rate (100 = average). |
| OBP+ | numeric | Park/league-adjusted on-base percentage (100 = average). |
| SLG+ | numeric | Park/league-adjusted slugging percentage (100 = average). |
| ISO+ | numeric | Park/league-adjusted isolated power (100 = average). |
| BABIP+ | numeric | Park/league-adjusted BABIP (100 = average). |
| LD_pct+ | numeric | Park/league-adjusted line-drive rate (100 = average). |
| GB_pct+ | numeric | Park/league-adjusted ground-ball rate (100 = average). |
| FB_pct+ | numeric | Park/league-adjusted fly-ball rate (100 = average). |
| HRFB_pct+ | numeric | Park/league-adjusted home-run-per-fly-ball rate (100 = average). |
| Pull_pct+ | numeric | Park/league-adjusted pull rate (100 = average). |
| Cent_pct+ | numeric | Park/league-adjusted up-the-middle rate (100 = average). |
| Oppo_pct+ | numeric | Park/league-adjusted opposite-field rate (100 = average). |
| Soft_pct+ | numeric | Park/league-adjusted soft-contact rate (100 = average). |
| Med_pct+ | numeric | Park/league-adjusted medium-contact rate (100 = average). |
| Hard_pct+ | numeric | Park/league-adjusted hard-contact rate (100 = average). |
| xwOBA | numeric | Expected Weighted On-Base Average (Statcast). |
| xAVG | numeric | Expected batting average (Statcast). |
| xSLG | numeric | Expected slugging percentage (Statcast). |
| XBR | numeric | Extra bases taken on the bases, runs above average. |
| PPTV | integer | Pitch-type pitch values (raw component). |
| CPTV | integer | Catcher pitch-type value (raw component). |
| BPTV | integer | Batter pitch-type value (raw component). |
| DSV | integer | Defensive stuff value (raw component). |
| DGV | integer | Defensive game value (raw component). |
| BTV | integer | Base-state team value (raw component). |
| rPPTV | numeric | Regressed pitch-type pitch values. |
| rCPTV | numeric | Regressed catcher pitch-type value. |
| rBPTV | numeric | Regressed batter pitch-type value. |
| rDGV | numeric | Regressed defensive game value. |
| rBTV | numeric | Regressed base-state team value. |
| EBV | integer | Earned-base value (raw component). |
| ESV | integer | Earned-strike value (raw component). |
| rFTeamV | numeric | Regressed fielding team value. |
| rBTeamV | numeric | Regressed base-running team value. |
| rTV | numeric | Regressed total team value. |
| pfx_FA_pct | numeric | PITCHf/x four-seam fastballs usage percentage. |
| pfx_FC_pct | numeric | PITCHf/x cutters usage percentage. |
| pfx_FS_pct | numeric | PITCHf/x splitters usage percentage. |
| pfx_FO_pct | numeric | PITCHf/x forkballs/pitch-outs usage percentage. |
| pfx_SI_pct | numeric | PITCHf/x sinkers usage percentage. |
| pfx_SL_pct | numeric | PITCHf/x sliders usage percentage. |
| pfx_CU_pct | numeric | PITCHf/x curveballs usage percentage. |
| pfx_KC_pct | numeric | PITCHf/x knuckle-curves usage percentage. |
| pfx_EP_pct | numeric | PITCHf/x eephus pitches usage percentage. |
| pfx_CH_pct | numeric | PITCHf/x changeups usage percentage. |
| pfx_SC_pct | numeric | PITCHf/x screwballs usage percentage. |
| pfx_SLO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_ST_pct | numeric | PITCHf/x sweepers usage percentage. |
| pfx_CUO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_CV_pct | numeric | PITCHf/x slow curves usage percentage. |
| pfx_vFA | numeric | PITCHf/x average four-seam fastballs velocity. |
| pfx_vFC | numeric | PITCHf/x average cutters velocity. |
| pfx_vFS | numeric | PITCHf/x average splitters velocity. |
| pfx_vFO | numeric | PITCHf/x average forkballs/pitch-outs velocity. |
| pfx_vSI | numeric | PITCHf/x average sinkers velocity. |
| pfx_vSL | numeric | PITCHf/x average sliders velocity. |
| pfx_vCU | numeric | PITCHf/x average curveballs velocity. |
| pfx_vKC | numeric | PITCHf/x average knuckle-curves velocity. |
| pfx_vEP | numeric | PITCHf/x average eephus pitches velocity. |
| pfx_vCH | numeric | PITCHf/x average changeups velocity. |
| pfx_vSC | numeric | PITCHf/x average screwballs velocity. |
| pfx_vSLO | numeric | PITCHf/x average slurves velocity. |
| pfx_vST | numeric | PITCHf/x average sweepers velocity. |
| pfx_vCUO | numeric | PITCHf/x average slurves velocity. |
| pfx_vCV | numeric | PITCHf/x average slow curves velocity. |
| pfx_FA-X | numeric | PITCHf/x average horizontal movement on four-seam fastballs. |
| pfx_FC-X | numeric | PITCHf/x average horizontal movement on cutters. |
| pfx_FS-X | numeric | PITCHf/x average horizontal movement on splitters. |
| pfx_FO-X | numeric | PITCHf/x average horizontal movement on forkballs/pitch-outs. |
| pfx_SI-X | numeric | PITCHf/x average horizontal movement on sinkers. |
| pfx_SL-X | numeric | PITCHf/x average horizontal movement on sliders. |
| pfx_CU-X | numeric | PITCHf/x average horizontal movement on curveballs. |
| pfx_KC-X | numeric | PITCHf/x average horizontal movement on knuckle-curves. |
| pfx_EP-X | numeric | PITCHf/x average horizontal movement on eephus pitches. |
| pfx_CH-X | numeric | PITCHf/x average horizontal movement on changeups. |
| pfx_SC-X | numeric | PITCHf/x average horizontal movement on screwballs. |
| pfx_SLO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_ST-X | numeric | PITCHf/x average horizontal movement on sweepers. |
| pfx_CUO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_CV-X | numeric | PITCHf/x average horizontal movement on slow curves. |
| pfx_FA-Z | numeric | PITCHf/x average vertical movement on four-seam fastballs. |
| pfx_FC-Z | numeric | PITCHf/x average vertical movement on cutters. |
| pfx_FS-Z | numeric | PITCHf/x average vertical movement on splitters. |
| pfx_FO-Z | numeric | PITCHf/x average vertical movement on forkballs/pitch-outs. |
| pfx_SI-Z | numeric | PITCHf/x average vertical movement on sinkers. |
| pfx_SL-Z | numeric | PITCHf/x average vertical movement on sliders. |
| pfx_CU-Z | numeric | PITCHf/x average vertical movement on curveballs. |
| pfx_KC-Z | numeric | PITCHf/x average vertical movement on knuckle-curves. |
| pfx_EP-Z | numeric | PITCHf/x average vertical movement on eephus pitches. |
| pfx_CH-Z | numeric | PITCHf/x average vertical movement on changeups. |
| pfx_SC-Z | numeric | PITCHf/x average vertical movement on screwballs. |
| pfx_SLO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_ST-Z | numeric | PITCHf/x average vertical movement on sweepers. |
| pfx_CUO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_CV-Z | numeric | PITCHf/x average vertical movement on slow curves. |
| pfx_wFA | numeric | PITCHf/x four-seam fastballs linear weight runs. |
| pfx_wFC | numeric | PITCHf/x cutters linear weight runs. |
| pfx_wFS | numeric | PITCHf/x splitters linear weight runs. |
| pfx_wFO | numeric | PITCHf/x forkballs/pitch-outs linear weight runs. |
| pfx_wSI | numeric | PITCHf/x sinkers linear weight runs. |
| pfx_wSL | numeric | PITCHf/x sliders linear weight runs. |
| pfx_wCU | numeric | PITCHf/x curveballs linear weight runs. |
| pfx_wKC | numeric | PITCHf/x knuckle-curves linear weight runs. |
| pfx_wEP | numeric | PITCHf/x eephus pitches linear weight runs. |
| pfx_wCH | numeric | PITCHf/x changeups linear weight runs. |
| pfx_wSC | numeric | PITCHf/x screwballs linear weight runs. |
| pfx_wSLO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wST | numeric | PITCHf/x sweepers linear weight runs. |
| pfx_wCUO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wCV | numeric | PITCHf/x slow curves linear weight runs. |
| pfx_wFA_C | numeric | PITCHf/x four-seam fastballs linear weight runs per 100 pitches. |
| pfx_wFC_C | numeric | PITCHf/x cutters linear weight runs per 100 pitches. |
| pfx_wFS_C | numeric | PITCHf/x splitters linear weight runs per 100 pitches. |
| pfx_wFO_C | numeric | PITCHf/x forkballs/pitch-outs linear weight runs per 100 pitches. |
| pfx_wSI_C | numeric | PITCHf/x sinkers linear weight runs per 100 pitches. |
| pfx_wSL_C | numeric | PITCHf/x sliders linear weight runs per 100 pitches. |
| pfx_wCU_C | numeric | PITCHf/x curveballs linear weight runs per 100 pitches. |
| pfx_wKC_C | numeric | PITCHf/x knuckle-curves linear weight runs per 100 pitches. |
| pfx_wEP_C | numeric | PITCHf/x eephus pitches linear weight runs per 100 pitches. |
| pfx_wCH_C | numeric | PITCHf/x changeups linear weight runs per 100 pitches. |
| pfx_wSC_C | numeric | PITCHf/x screwballs linear weight runs per 100 pitches. |
| pfx_wSLO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_wST_C | numeric | PITCHf/x sweepers linear weight runs per 100 pitches. |
| pfx_wCUO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_wCV_C | numeric | PITCHf/x slow curves linear weight runs per 100 pitches. |
| pfx_aaFA | numeric | PITCHf/x average arsenal value on four-seam fastballs. |
| pfx_aaFC | numeric | PITCHf/x average arsenal value on cutters. |
| pfx_aaFS | numeric | PITCHf/x average arsenal value on splitters. |
| pfx_aaFO | numeric | PITCHf/x average arsenal value on forkballs/pitch-outs. |
| pfx_aaSI | numeric | PITCHf/x average arsenal value on sinkers. |
| pfx_aaSL | numeric | PITCHf/x average arsenal value on sliders. |
| pfx_aaCU | numeric | PITCHf/x average arsenal value on curveballs. |
| pfx_aaKC | numeric | PITCHf/x average arsenal value on knuckle-curves. |
| pfx_aaEP | numeric | PITCHf/x average arsenal value on eephus pitches. |
| pfx_aaCH | numeric | PITCHf/x average arsenal value on changeups. |
| pfx_aaSC | numeric | PITCHf/x average arsenal value on screwballs. |
| pfx_aaSLO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_aaST | numeric | PITCHf/x average arsenal value on sweepers. |
| pfx_aaCUO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_aaCV | numeric | PITCHf/x average arsenal value on slow curves. |
| pfx_spFA | numeric | PITCHf/x Stuff+ value on four-seam fastballs. |
| pfx_spFC | numeric | PITCHf/x Stuff+ value on cutters. |
| pfx_spFS | numeric | PITCHf/x Stuff+ value on splitters. |
| pfx_spFO | numeric | PITCHf/x Stuff+ value on forkballs/pitch-outs. |
| pfx_spSI | numeric | PITCHf/x Stuff+ value on sinkers. |
| pfx_spSL | numeric | PITCHf/x Stuff+ value on sliders. |
| pfx_spCU | numeric | PITCHf/x Stuff+ value on curveballs. |
| pfx_spKC | numeric | PITCHf/x Stuff+ value on knuckle-curves. |
| pfx_spEP | numeric | PITCHf/x Stuff+ value on eephus pitches. |
| pfx_spCH | numeric | PITCHf/x Stuff+ value on changeups. |
| pfx_spSC | numeric | PITCHf/x Stuff+ value on screwballs. |
| pfx_spSLO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_spST | numeric | PITCHf/x Stuff+ value on sweepers. |
| pfx_spCUO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_spCV | numeric | PITCHf/x Stuff+ value on slow curves. |
| pfx_O-Swing_pct | numeric | PITCHf/x swing percentage on pitches outside the zone. |
| pfx_Z-Swing_pct | numeric | PITCHf/x swing percentage on pitches inside the zone. |
| pfx_Swing_pct | numeric | PITCHf/x swing percentage. |
| pfx_O-Contact_pct | numeric | PITCHf/x contact percentage on pitches outside the zone. |
| pfx_Z-Contact_pct | numeric | PITCHf/x contact percentage on pitches inside the zone. |
| pfx_Contact_pct | numeric | PITCHf/x contact percentage. |
| pfx_Zone_pct | numeric | PITCHf/x percentage of pitches in the strike zone. |
| pfx_Pace | numeric | PITCHf/x pace (seconds between pitches). |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing_pct | numeric | Fast-swing percentage (75+ mph bat speed). |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact_pct | numeric | Squared-up percentage per batted-ball contact. |
| SquaredUpSwing_pct | numeric | Squared-up percentage per swing. |
| BlastContact_pct | numeric | Blast percentage per batted-ball contact. |
| BlastSwing_pct | numeric | Blast percentage per swing. |
| Swords | integer | Swords (awkward, defensive swinging strikes induced). |
| CompetitiveSwings | integer | Competitive swings tracked. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle_pct | numeric | Percentage of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average batter depth in the box (inches). |
| DistanceOffPlate | numeric | Average batter distance off the plate (inches). |
| scH-Swing_pct | numeric | Statcast swing percentage on hard-hit pitches. |
| scH-Contact_pct | numeric | Statcast contact percentage on hard-hit pitches. |
| scH-Zone_pct | numeric | Statcast in-zone percentage on hard-hit pitches. |
| scS-Swing_pct | numeric | Statcast swing percentage on slider pitches. |
| scS-Contact_pct | numeric | Statcast contact percentage on slider pitches. |
| scS-Zone_pct | numeric | Statcast in-zone percentage on slider pitches. |
| scC-Swing_pct | numeric | Statcast swing percentage on curveball pitches. |
| scC-Contact_pct | numeric | Statcast contact percentage on curveball pitches. |
| scC-Zone_pct | numeric | Statcast in-zone percentage on curveball pitches. |
| scW-Swing_pct | numeric | Statcast swing percentage on offspeed pitches. |
| scW-Contact_pct | numeric | Statcast contact percentage on offspeed pitches. |
| scW-Zone_pct | numeric | Statcast in-zone percentage on offspeed pitches. |
| scSI-Swing_pct | numeric | Statcast swing percentage on sinker pitches. |
| scSI-Contact_pct | numeric | Statcast contact percentage on sinker pitches. |
| scSI-Zone_pct | numeric | Statcast in-zone percentage on sinker pitches. |
| scSO-Swing_pct | numeric | Statcast swing percentage on softly-hit pitches. |
| scSO-Contact_pct | numeric | Statcast contact percentage on softly-hit pitches. |
| scSO-Zone_pct | numeric | Statcast in-zone percentage on softly-hit pitches. |
| scO-Swing_pct | numeric | Statcast swing percentage on out-of-zone pitches. |
| scO-Contact_pct | numeric | Statcast contact percentage on out-of-zone pitches. |
| scO-Zone_pct | numeric | Statcast in-zone percentage on out-of-zone pitches. |
| scZ-Swing_pct | numeric | Statcast swing percentage on in-zone pitches. |
| scZ-Contact_pct | numeric | Statcast contact percentage on in-zone pitches. |
| scZ-Zone_pct | numeric | Statcast in-zone percentage on in-zone pitches. |
| pi_CH_pct | numeric | PITCHInfo changeups usage percentage. |
| pi_CU_pct | numeric | PITCHInfo curveballs usage percentage. |
| pi_FA_pct | numeric | PITCHInfo four-seam fastballs usage percentage. |
| pi_FC_pct | numeric | PITCHInfo cutters usage percentage. |
| pi_FS_pct | numeric | PITCHInfo splitters usage percentage. |
| pi_SB_pct | numeric | PITCHInfo slow-balls usage percentage. |
| pi_SI_pct | numeric | PITCHInfo sinkers usage percentage. |
| pi_SL_pct | numeric | PITCHInfo sliders usage percentage. |
| pi_vCH | numeric | PITCHInfo average changeups velocity. |
| pi_vCU | numeric | PITCHInfo average curveballs velocity. |
| pi_vFA | numeric | PITCHInfo average four-seam fastballs velocity. |
| pi_vFC | numeric | PITCHInfo average cutters velocity. |
| pi_vFS | numeric | PITCHInfo average splitters velocity. |
| pi_vSB | numeric | PITCHInfo average slow-balls velocity. |
| pi_vSI | numeric | PITCHInfo average sinkers velocity. |
| pi_vSL | numeric | PITCHInfo average sliders velocity. |
| pi_CH-X | numeric | PITCHInfo average horizontal movement on changeups. |
| pi_CU-X | numeric | PITCHInfo average horizontal movement on curveballs. |
| pi_FA-X | numeric | PITCHInfo average horizontal movement on four-seam fastballs. |
| pi_FC-X | numeric | PITCHInfo average horizontal movement on cutters. |
| pi_FS-X | numeric | PITCHInfo average horizontal movement on splitters. |
| pi_SB-X | numeric | PITCHInfo average horizontal movement on slow-balls. |
| pi_SI-X | numeric | PITCHInfo average horizontal movement on sinkers. |
| pi_SL-X | numeric | PITCHInfo average horizontal movement on sliders. |
| pi_CH-Z | numeric | PITCHInfo average vertical movement on changeups. |
| pi_CU-Z | numeric | PITCHInfo average vertical movement on curveballs. |
| pi_FA-Z | numeric | PITCHInfo average vertical movement on four-seam fastballs. |
| pi_FC-Z | numeric | PITCHInfo average vertical movement on cutters. |
| pi_FS-Z | numeric | PITCHInfo average vertical movement on splitters. |
| pi_SB-Z | numeric | PITCHInfo average vertical movement on slow-balls. |
| pi_SI-Z | numeric | PITCHInfo average vertical movement on sinkers. |
| pi_SL-Z | numeric | PITCHInfo average vertical movement on sliders. |
| pi_wCH | numeric | PITCHInfo changeups linear weight runs. |
| pi_wCU | numeric | PITCHInfo curveballs linear weight runs. |
| pi_wFA | numeric | PITCHInfo four-seam fastballs linear weight runs. |
| pi_wFC | numeric | PITCHInfo cutters linear weight runs. |
| pi_wFS | numeric | PITCHInfo splitters linear weight runs. |
| pi_wSB | numeric | PITCHInfo slow-balls linear weight runs. |
| pi_wSI | numeric | PITCHInfo sinkers linear weight runs. |
| pi_wSL | numeric | PITCHInfo sliders linear weight runs. |
| pi_wCH_C | numeric | PITCHInfo changeups linear weight runs per 100 pitches. |
| pi_wCU_C | numeric | PITCHInfo curveballs linear weight runs per 100 pitches. |
| pi_wFA_C | numeric | PITCHInfo four-seam fastballs linear weight runs per 100 pitches. |
| pi_wFC_C | numeric | PITCHInfo cutters linear weight runs per 100 pitches. |
| pi_wFS_C | numeric | PITCHInfo splitters linear weight runs per 100 pitches. |
| pi_wSB_C | numeric | PITCHInfo slow-balls linear weight runs per 100 pitches. |
| pi_wSI_C | numeric | PITCHInfo sinkers linear weight runs per 100 pitches. |
| pi_wSL_C | numeric | PITCHInfo sliders linear weight runs per 100 pitches. |
| pi_O-Swing_pct | numeric | PITCHInfo swing percentage on pitches outside the zone. |
| pi_Z-Swing_pct | numeric | PITCHInfo swing percentage on pitches inside the zone. |
| pi_Swing_pct | numeric | PITCHInfo swing percentage. |
| pi_O-Contact_pct | numeric | PITCHInfo contact percentage on pitches outside the zone. |
| pi_Z-Contact_pct | numeric | PITCHInfo contact percentage on pitches inside the zone. |
| pi_Contact_pct | numeric | PITCHInfo contact percentage. |
| pi_Zone_pct | numeric | PITCHInfo percentage of pitches in the strike zone. |
| pi_Pace | numeric | PITCHInfo pace (seconds between pitches). |
| Events | integer | Batted-ball events with Statcast measurement. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | integer | Barreled batted balls. |
| Barrel_pct | numeric | Barrel percentage. |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | integer | Hard-hit batted balls (95+ mph). |
| HardHit_pct | numeric | Hard-hit percentage (95+ mph). |
| Q | numeric | Quality of contact / quality score. |
| TG | integer | Total games in the span. |
| TPA | integer | Total plate appearances in the span. |
| positionDB | character | Position code from the database. |
| position | character | Position played. |
| team_name_abb | character | Team name abbreviation. |
| teamid | integer | FanGraphs team ID. |
| playerTeamId | integer | FanGraphs player-team ID. |
| Pos | numeric | Primary position. |
| EV90 | numeric | 90th-percentile exit velocity (mph). |
| KN_pct | numeric | Knuckleball percentage (pitch usage). |
| KNv | numeric | Average knuckleball velocity. |
| wKN | numeric | Knuckleball pitch-type linear weight runs. |
| wKN_C | numeric | Knuckleball linear weight runs per 100 pitches. |
| pfx_KN_pct | numeric | PITCHf/x knuckleballs usage percentage. |
| pfx_vKN | numeric | PITCHf/x average knuckleballs velocity. |
| pfx_KN-X | numeric | PITCHf/x average horizontal movement on knuckleballs. |
| pfx_KN-Z | numeric | PITCHf/x average vertical movement on knuckleballs. |
| pfx_wKN | numeric | PITCHf/x knuckleballs linear weight runs. |
| pfx_wKN_C | numeric | PITCHf/x knuckleballs linear weight runs per 100 pitches. |
| pfx_aaKN | numeric | PITCHf/x average arsenal value on knuckleballs. |
| pfx_spKN | numeric | PITCHf/x Stuff+ value on knuckleballs. |
| pi_KN_pct | numeric | PITCHInfo knuckleballs usage percentage. |
| pi_XX_pct | numeric | PITCHInfo unidentified pitches usage percentage. |
| pi_vKN | numeric | PITCHInfo average knuckleballs velocity. |
| pi_vXX | numeric | PITCHInfo average unidentified pitches velocity. |
| pi_KN-X | numeric | PITCHInfo average horizontal movement on knuckleballs. |
| pi_XX-X | numeric | PITCHInfo average horizontal movement on unidentified pitches. |
| pi_KN-Z | numeric | PITCHInfo average vertical movement on knuckleballs. |
| pi_XX-Z | numeric | PITCHInfo average vertical movement on unidentified pitches. |
| pi_wKN | numeric | PITCHInfo knuckleballs linear weight runs. |
| pi_wXX | numeric | PITCHInfo unidentified pitches linear weight runs. |
| pi_wKN_C | numeric | PITCHInfo knuckleballs linear weight runs per 100 pitches. |
| pi_wXX_C | numeric | PITCHInfo unidentified pitches linear weight runs per 100 pitches. |
| pi_CS_pct | numeric | PITCHInfo slow curves usage percentage. |
| pi_vCS | numeric | PITCHInfo average slow curves velocity. |
| pi_CS-X | numeric | PITCHInfo average horizontal movement on slow curves. |
| pi_CS-Z | numeric | PITCHInfo average vertical movement on slow curves. |
| pi_wCS | numeric | PITCHInfo slow curves linear weight runs. |
| pi_wCS_C | numeric | PITCHInfo slow curves linear weight runs per 100 pitches. |
| rDSV | numeric | Regressed defensive stuff value. |
try(fg_team_batter(startseason = 2015, endseason = 2015, qual = 200))try(fg_team_batter(startseason = 2015, endseason = 2015, qual = 200))
Scrape Team Fielder Leaderboards from FanGraphs
fg_team_fielder( age = "", pos = "all", stats = "fld", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "1", postseason = "", sortdir = "default", sortstat = "Defense" )fg_team_fielder( age = "", pos = "all", stats = "fld", lg = "all", qual = "0", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "1", postseason = "", sortdir = "default", sortstat = "Defense" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "Defense". |
A data frame of fielder data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| Pos | character | Primary position. |
| Position | character | Position played. |
| G | integer | Games played. |
| GS | integer | Games started. |
| Inn | integer | Innings played in the field. |
| PO | integer | Putouts. |
| A | integer | Assists. |
| E | integer | Errors. |
| FE | integer | Fielding errors. |
| TE | integer | Throwing errors. |
| DP | integer | Double plays. |
| DPS | integer | Double plays started. |
| DPT | integer | Double plays turned. |
| DPF | integer | Double plays finished. |
| Scp | integer | Scoops (first-base picks). |
| SB | integer | Stolen bases. |
| CS | integer | Caught stealing. |
| PB | integer | Passed balls. |
| WP | integer | Wild pitches. |
| FP | numeric | Fielding percentage. |
| rSB | integer | Stolen-base runs (catcher arm). |
| rGDP | integer | Double-play runs. |
| rARM | integer | Outfield-arm runs. |
| rGFP | integer | Good-fielding-play runs. |
| rPM | integer | Plus/minus range runs. |
| rSZ | numeric | Strike-zone (framing) runs. |
| rTS | integer | Team-stolen-base runs. |
| rCERA | integer | Catcher-ERA runs. |
| DRS | integer | Defensive Runs Saved. |
| BIZ | integer | Balls hit in defensive zone. |
| Plays | integer | Plays made in zone. |
| RZR | numeric | Revised Zone Rating. |
| OOZ | integer | Plays made out of zone. |
| ARM | numeric | Outfield-arm runs (UZR component). |
| DPR | numeric | Double-play runs (UZR component). |
| RngR | numeric | Range runs (UZR component). |
| ErrR | numeric | Error runs (UZR component). |
| UZR | numeric | Ultimate Zone Rating. |
| UZR_150 | numeric | Ultimate Zone Rating per 150 defensive games. |
| Defense | numeric | Total defensive value (runs above average). |
| CStrikes | numeric | Catcher framing called strikes above average. |
| CFraming | numeric | Catcher framing runs. |
| OAA | integer | Outs Above Average (Statcast). |
| rFRP | integer | Range component of Fielding Run Prevention. |
| aFRP | integer | Arm component of Fielding Run Prevention. |
| dFRP | integer | Double-play component of Fielding Run Prevention. |
| bFRP | integer | Bunt component of Fielding Run Prevention. |
| tFRP | integer | Throwing component of Fielding Run Prevention. |
| fFRP | integer | Framing component of Fielding Run Prevention. |
| FRP | integer | Total Fielding Run Prevention. |
| Q | numeric | Quality of contact / quality score. |
| TInn | numeric | Total innings played in the field. |
| positionDB | character | Position code from the database. |
| teamid | integer | FanGraphs team ID. |
| team_name_abb | character | Team name abbreviation. |
| playerTeamId | integer | FanGraphs player-team ID. |
try(fg_team_fielder(startseason = 2023, endseason = 2023, qual = 150))try(fg_team_fielder(startseason = 2023, endseason = 2023, qual = 150))
Scrape Team Pitcher Leaderboards from FanGraphs
fg_team_pitcher( age = "", pos = "all", stats = "pit", lg = "all", qual = "y", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )fg_team_pitcher( age = "", pos = "all", stats = "pit", lg = "all", qual = "y", startseason = "2023", endseason = "2023", startdate = "", enddate = "", month = "0", hand = "", team = "0,ts", pageitems = "1000", pagenum = "1", ind = "0", rost = "0", players = "", type = "8", postseason = "", sortdir = "default", sortstat = "WAR" )
age |
(integer) Age of players |
pos |
(character) Position of players, defaults to "all". To exclude pitchers, use "np". |
stats |
(character) Statistic to return. Defaults to "bat". |
lg |
(character) League to return. Defaults to "all". Options are "al", "nl", or "all". |
qual |
(character) Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y". |
startseason |
(character) Season for which you want to scrape the data. |
endseason |
(character) Last season for which you want data. |
startdate |
(character) Start date for which you want data. |
enddate |
(character) End date for which you want data. |
month |
(character) Month for which you want data. |
hand |
(character) Handedness of batter. Options are "L", "R", or "B". Empty string returns all. |
team |
(character) Teams for which you want data, comma separated. |
pageitems |
(character) Number of items per page. |
pagenum |
(character) Page number. |
ind |
(character) Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
rost |
(character) Whether or not to include players on the roster. 1 = include, 0 = exclude. |
players |
(character) Whether or not to include players on the roster. 1 = include only active roster players, 0 = exclude. |
type |
(character) Defaults to 8, which is the standard leaderboard. The values for the leaderboards appear to go to from type = 0 to 48+, which correspond to links on the leaderboard page. |
postseason |
(logical) Whether or not to include postseason data. TRUE = include postseason, FALSE = exclude postseason. |
sortdir |
(character) Sort direction. Options are "asc" or "desc" or "default". |
sortstat |
(character) Sort by stat. Default is "WAR". |
A data frame of pitcher data.
| col_name | types | description |
| Season | integer | Season (YYYY). |
| team_name | character | Team name. |
| SeasonMin | integer | First season in the queried span. |
| SeasonMax | integer | Last season in the queried span. |
| W | integer | Wins. |
| L | integer | Losses. |
| ERA | numeric | Earned run average. |
| G | integer | Games played. |
| GS | integer | Games started. |
| QS | integer | Quality starts. |
| CG | integer | Complete games. |
| ShO | integer | Shutouts. |
| SV | integer | Saves. |
| BS | integer | Blown saves. |
| IP | numeric | Innings pitched. |
| TBF | integer | Total batters faced. |
| H | integer | Hits. |
| R | integer | Runs scored. |
| ER | integer | Earned runs allowed. |
| HR | integer | Home runs. |
| BB | integer | Walks (bases on balls). |
| IBB | integer | Intentional walks. |
| HBP | integer | Hit by pitch. |
| WP | integer | Wild pitches. |
| BK | integer | Balks. |
| SO | integer | Strikeouts. |
| GB | integer | Ground balls. |
| FB | integer | Fly balls. |
| LD | integer | Line drives. |
| IFFB | integer | Infield fly balls. |
| Pitches | integer | Total pitches seen or thrown. |
| Balls | integer | Total balls. |
| Strikes | integer | Total strikes. |
| RS | integer | Run support. |
| IFH | integer | Infield hits. |
| BU | integer | Bunts. |
| BUH | integer | Bunt hits. |
| K_9 | numeric | Strikeouts per nine innings. |
| BB_9 | numeric | Walks per nine innings. |
| K_BB | numeric | Strikeout-to-walk ratio. |
| H_9 | numeric | Hits allowed per nine innings. |
| HR_9 | numeric | Home runs allowed per nine innings. |
| AVG | numeric | Batting average (or opponent average for pitchers). |
| WHIP | numeric | Walks plus hits per inning pitched. |
| BABIP | numeric | Batting average on balls in play. |
| LOB_pct | numeric | Left-on-base percentage (strand rate). |
| FIP | numeric | Fielding Independent Pitching. |
| GB_FB | numeric | Ground-ball to fly-ball ratio. |
| LD_pct | numeric | Line-drive percentage. |
| GB_pct | numeric | Ground-ball percentage. |
| FB_pct | numeric | Fly-ball percentage. |
| IFFB_pct | numeric | Infield-fly-ball percentage. |
| HR_FB | numeric | Home-run-per-fly-ball rate. |
| IFH_pct | numeric | Infield-hit percentage. |
| BUH_pct | numeric | Bunt-hit percentage. |
| TTO_pct | numeric | Three-true-outcomes percentage (BB, K, HR). |
| CFraming | numeric | Catcher framing runs. |
| Starting | numeric | Starting-pitcher value (runs). |
| Start_IP | numeric | Innings pitched as a starter. |
| Relieving | numeric | Relief-pitcher value (runs). |
| Relief_IP | numeric | Innings pitched in relief. |
| RAR | numeric | Runs Above Replacement. |
| WAR | numeric | Wins Above Replacement. |
| Dollars | numeric | Estimated market value of production. |
| RA9-Wins | numeric | Wins based on runs allowed per nine. |
| LOB-Wins | numeric | Wins attributable to strand rate. |
| BIP-Wins | numeric | Wins attributable to balls in play. |
| BS-Wins | numeric | Wins attributable to sequencing. |
| tERA | numeric | True ERA (batted-ball-based ERA estimator). |
| xFIP | numeric | Expected Fielding Independent Pitching. |
| WPA | numeric | Win Probability Added. |
| WPA_minus | numeric | Negative Win Probability Added. |
| WPA_plus | numeric | Positive Win Probability Added. |
| RE24 | numeric | Run Expectancy based on the 24 base-out states. |
| REW | numeric | Run Expectancy Wins. |
| pLI | numeric | Average Leverage Index. |
| inLI | numeric | Average Leverage Index entering the game. |
| gmLI | numeric | Average Leverage Index at game entry. |
| exLI | numeric | Average Leverage Index when exiting the game. |
| Pulls | integer | Times pulled from the game. |
| Games | integer | Games (relief context). |
| WPA_LI | numeric | Situational Win Probability Added (WPA divided by Leverage Index). |
| Clutch | numeric | Clutch performance relative to context-neutral performance. |
| FBall_pct | numeric | Overall fastball percentage. |
| FBv | numeric | Average fastball velocity. |
| SL_pct | numeric | Slider percentage (pitch usage). |
| SLv | numeric | Average slider velocity. |
| CT_pct | numeric | Cutter percentage (pitch usage). |
| CTv | numeric | Average cutter velocity. |
| CB_pct | numeric | Curveball percentage (pitch usage). |
| CBv | numeric | Average curveball velocity. |
| CH_pct | numeric | Changeup percentage (pitch usage). |
| CHv | numeric | Average changeup velocity. |
| SF_pct | numeric | Splitter percentage (pitch usage). |
| SFv | numeric | Average splitter velocity. |
| XX_pct | numeric | Unidentified-pitch percentage (pitch usage). |
| wFB | numeric | Fastball pitch-type linear weight runs. |
| wSL | numeric | Slider pitch-type linear weight runs. |
| wCT | numeric | Cutter pitch-type linear weight runs. |
| wCB | numeric | Curveball pitch-type linear weight runs. |
| wCH | numeric | Changeup pitch-type linear weight runs. |
| wSF | numeric | Splitter pitch-type linear weight runs. |
| wFB_C | numeric | Fastball linear weight runs per 100 pitches. |
| wSL_C | numeric | Slider linear weight runs per 100 pitches. |
| wCT_C | numeric | Cutter linear weight runs per 100 pitches. |
| wCB_C | numeric | Curveball linear weight runs per 100 pitches. |
| wCH_C | numeric | Changeup linear weight runs per 100 pitches. |
| wSF_C | numeric | Splitter linear weight runs per 100 pitches. |
| O-Swing_pct | numeric | Swing percentage on pitches outside the zone (chase rate). |
| Z-Swing_pct | numeric | Swing percentage on pitches inside the zone. |
| Swing_pct | numeric | Overall swing percentage. |
| O-Contact_pct | numeric | Contact percentage on pitches outside the zone. |
| Z-Contact_pct | numeric | Contact percentage on pitches inside the zone. |
| Contact_pct | numeric | Overall contact percentage. |
| Zone_pct | numeric | Percentage of pitches in the strike zone. |
| F-Strike_pct | numeric | First-pitch strike percentage. |
| SwStr_pct | numeric | Swinging-strike percentage. |
| CStr_pct | numeric | Called-strike percentage. |
| C+SwStr_pct | numeric | Combined called- plus swinging-strike percentage. |
| HLD | integer | Holds. |
| SD | integer | Shutdowns (relief appearances that improved win probability). |
| MD | integer | Meltdowns (relief appearances that hurt win probability). |
| ERA- | numeric | Park/league-adjusted ERA (100 = average, lower is better). |
| FIP- | numeric | Park/league-adjusted FIP (100 = average, lower is better). |
| xFIP- | numeric | Park/league-adjusted xFIP (100 = average, lower is better). |
| K_pct | numeric | Strikeout rate. |
| BB_pct | numeric | Walk rate. |
| K-BB_pct | numeric | Strikeout rate minus walk rate. |
| SIERA | numeric | Skill-Interactive ERA. |
| kwERA | numeric | Strikeout/walk-based ERA estimator. |
| RS_9 | numeric | Run support per nine innings. |
| E-F | numeric | Difference between ERA and FIP. |
| Pull | integer | Balls in play hit to the pull field. |
| Cent | integer | Balls in play hit up the middle. |
| Oppo | integer | Balls in play hit to the opposite field. |
| Soft | integer | Soft-contact balls in play. |
| Med | integer | Medium-contact balls in play. |
| Hard | integer | Hard-contact balls in play. |
| bipCount | integer | Count of balls in play with contact-quality data. |
| Pull_pct | numeric | Pull-field percentage. |
| Cent_pct | numeric | Up-the-middle percentage. |
| Oppo_pct | numeric | Opposite-field percentage. |
| Soft_pct | numeric | Soft-contact percentage. |
| Med_pct | numeric | Medium-contact percentage. |
| Hard_pct | numeric | Hard-contact percentage. |
| K_9+ | numeric | Park/league-adjusted strikeouts per nine (100 = average). |
| BB_9+ | numeric | Park/league-adjusted walks per nine (100 = average). |
| K_BB+ | numeric | Park/league-adjusted strikeout-to-walk ratio (100 = average). |
| H_9+ | numeric | Park/league-adjusted hits per nine (100 = average). |
| HR_9+ | numeric | Park/league-adjusted home runs per nine (100 = average). |
| AVG+ | numeric | Park/league-adjusted batting average (100 = average). |
| WHIP+ | numeric | Park/league-adjusted WHIP (100 = average). |
| BABIP+ | numeric | Park/league-adjusted BABIP (100 = average). |
| LOB_pct+ | numeric | Park/league-adjusted strand rate (100 = average). |
| K_pct+ | numeric | Park/league-adjusted strikeout rate (100 = average). |
| BB_pct+ | numeric | Park/league-adjusted walk rate (100 = average). |
| LD_pct+ | numeric | Park/league-adjusted line-drive rate (100 = average). |
| GB_pct+ | numeric | Park/league-adjusted ground-ball rate (100 = average). |
| FB_pct+ | numeric | Park/league-adjusted fly-ball rate (100 = average). |
| HRFB_pct+ | numeric | Park/league-adjusted home-run-per-fly-ball rate (100 = average). |
| Pull_pct+ | numeric | Park/league-adjusted pull rate (100 = average). |
| Cent_pct+ | numeric | Park/league-adjusted up-the-middle rate (100 = average). |
| Oppo_pct+ | numeric | Park/league-adjusted opposite-field rate (100 = average). |
| Soft_pct+ | numeric | Park/league-adjusted soft-contact rate (100 = average). |
| Med_pct+ | numeric | Park/league-adjusted medium-contact rate (100 = average). |
| Hard_pct+ | numeric | Park/league-adjusted hard-contact rate (100 = average). |
| xERA | numeric | Expected ERA (Statcast-based). |
| pb_o_CH | numeric | PitchingBot overall grade on changeups. |
| pb_s_CH | numeric | PitchingBot stuff grade on changeups. |
| pb_c_CH | numeric | PitchingBot command grade on changeups. |
| pb_o_CU | numeric | PitchingBot overall grade on curveballs. |
| pb_s_CU | numeric | PitchingBot stuff grade on curveballs. |
| pb_c_CU | numeric | PitchingBot command grade on curveballs. |
| pb_o_FF | numeric | PitchingBot overall grade on four-seam fastballs. |
| pb_s_FF | numeric | PitchingBot stuff grade on four-seam fastballs. |
| pb_c_FF | numeric | PitchingBot command grade on four-seam fastballs. |
| pb_o_SI | numeric | PitchingBot overall grade on sinkers. |
| pb_s_SI | numeric | PitchingBot stuff grade on sinkers. |
| pb_c_SI | numeric | PitchingBot command grade on sinkers. |
| pb_o_SL | numeric | PitchingBot overall grade on sliders. |
| pb_s_SL | numeric | PitchingBot stuff grade on sliders. |
| pb_c_SL | numeric | PitchingBot command grade on sliders. |
| pb_o_KC | numeric | PitchingBot overall grade on knuckle-curves. |
| pb_s_KC | numeric | PitchingBot stuff grade on knuckle-curves. |
| pb_c_KC | numeric | PitchingBot command grade on knuckle-curves. |
| pb_o_FC | numeric | PitchingBot overall grade on cutters. |
| pb_s_FC | numeric | PitchingBot stuff grade on cutters. |
| pb_c_FC | numeric | PitchingBot command grade on cutters. |
| pb_o_FS | numeric | PitchingBot overall grade on splitters. |
| pb_s_FS | numeric | PitchingBot stuff grade on splitters. |
| pb_c_FS | numeric | PitchingBot command grade on splitters. |
| pb_overall | numeric | PitchingBot overall grade. |
| pb_stuff | numeric | PitchingBot stuff grade. |
| pb_command | numeric | PitchingBot command grade. |
| pb_xRV100 | numeric | PitchingBot expected run value per 100 pitches. |
| pb_ERA | numeric | PitchingBot-modeled ERA. |
| sp_s_CH | numeric | Stuff+ grade on changeups (100 = average). |
| sp_l_CH | numeric | Location+ grade on changeups (100 = average). |
| sp_p_CH | numeric | Pitching+ grade on changeups (100 = average). |
| sp_s_CU | numeric | Stuff+ grade on curveballs (100 = average). |
| sp_l_CU | numeric | Location+ grade on curveballs (100 = average). |
| sp_p_CU | numeric | Pitching+ grade on curveballs (100 = average). |
| sp_s_FF | numeric | Stuff+ grade on four-seam fastballs (100 = average). |
| sp_l_FF | numeric | Location+ grade on four-seam fastballs (100 = average). |
| sp_p_FF | numeric | Pitching+ grade on four-seam fastballs (100 = average). |
| sp_s_SI | numeric | Stuff+ grade on sinkers (100 = average). |
| sp_l_SI | numeric | Location+ grade on sinkers (100 = average). |
| sp_p_SI | numeric | Pitching+ grade on sinkers (100 = average). |
| sp_s_SL | numeric | Stuff+ grade on sliders (100 = average). |
| sp_l_SL | numeric | Location+ grade on sliders (100 = average). |
| sp_p_SL | numeric | Pitching+ grade on sliders (100 = average). |
| sp_s_KC | numeric | Stuff+ grade on knuckle-curves (100 = average). |
| sp_l_KC | numeric | Location+ grade on knuckle-curves (100 = average). |
| sp_p_KC | numeric | Pitching+ grade on knuckle-curves (100 = average). |
| sp_s_FC | numeric | Stuff+ grade on cutters (100 = average). |
| sp_l_FC | numeric | Location+ grade on cutters (100 = average). |
| sp_p_FC | numeric | Pitching+ grade on cutters (100 = average). |
| sp_s_FS | numeric | Stuff+ grade on splitters (100 = average). |
| sp_l_FS | numeric | Location+ grade on splitters (100 = average). |
| sp_p_FS | numeric | Pitching+ grade on splitters (100 = average). |
| sp_stuff | numeric | Stuff+ overall grade (pitch quality, 100 = average). |
| sp_location | numeric | Location+ overall grade (command, 100 = average). |
| sp_pitching | numeric | Pitching+ overall grade (Stuff+ and Location+ combined, 100 = average). |
| PPTV | integer | Pitch-type pitch values (raw component). |
| CPTV | integer | Catcher pitch-type value (raw component). |
| BPTV | integer | Batter pitch-type value (raw component). |
| DSV | integer | Defensive stuff value (raw component). |
| DGV | integer | Defensive game value (raw component). |
| BTV | integer | Base-state team value (raw component). |
| rPPTV | numeric | Regressed pitch-type pitch values. |
| rBPTV | numeric | Regressed batter pitch-type value. |
| rDGV | numeric | Regressed defensive game value. |
| rBTV | numeric | Regressed base-state team value. |
| EBV | integer | Earned-base value (raw component). |
| ESV | integer | Earned-strike value (raw component). |
| rFTeamV | numeric | Regressed fielding team value. |
| rBTeamV | numeric | Regressed base-running team value. |
| rTV | numeric | Regressed total team value. |
| pfx_FA_pct | numeric | PITCHf/x four-seam fastballs usage percentage. |
| pfx_FC_pct | numeric | PITCHf/x cutters usage percentage. |
| pfx_FS_pct | numeric | PITCHf/x splitters usage percentage. |
| pfx_SI_pct | numeric | PITCHf/x sinkers usage percentage. |
| pfx_SL_pct | numeric | PITCHf/x sliders usage percentage. |
| pfx_CU_pct | numeric | PITCHf/x curveballs usage percentage. |
| pfx_KC_pct | numeric | PITCHf/x knuckle-curves usage percentage. |
| pfx_EP_pct | numeric | PITCHf/x eephus pitches usage percentage. |
| pfx_CH_pct | numeric | PITCHf/x changeups usage percentage. |
| pfx_SLO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_ST_pct | numeric | PITCHf/x sweepers usage percentage. |
| pfx_CUO_pct | numeric | PITCHf/x slurves usage percentage. |
| pfx_vFA | numeric | PITCHf/x average four-seam fastballs velocity. |
| pfx_vFC | numeric | PITCHf/x average cutters velocity. |
| pfx_vFS | numeric | PITCHf/x average splitters velocity. |
| pfx_vSI | numeric | PITCHf/x average sinkers velocity. |
| pfx_vSL | numeric | PITCHf/x average sliders velocity. |
| pfx_vCU | numeric | PITCHf/x average curveballs velocity. |
| pfx_vKC | numeric | PITCHf/x average knuckle-curves velocity. |
| pfx_vEP | numeric | PITCHf/x average eephus pitches velocity. |
| pfx_vCH | numeric | PITCHf/x average changeups velocity. |
| pfx_vSLO | numeric | PITCHf/x average slurves velocity. |
| pfx_vST | numeric | PITCHf/x average sweepers velocity. |
| pfx_vCUO | numeric | PITCHf/x average slurves velocity. |
| pfx_FA-X | numeric | PITCHf/x average horizontal movement on four-seam fastballs. |
| pfx_FC-X | numeric | PITCHf/x average horizontal movement on cutters. |
| pfx_FS-X | numeric | PITCHf/x average horizontal movement on splitters. |
| pfx_SI-X | numeric | PITCHf/x average horizontal movement on sinkers. |
| pfx_SL-X | numeric | PITCHf/x average horizontal movement on sliders. |
| pfx_CU-X | numeric | PITCHf/x average horizontal movement on curveballs. |
| pfx_KC-X | numeric | PITCHf/x average horizontal movement on knuckle-curves. |
| pfx_EP-X | numeric | PITCHf/x average horizontal movement on eephus pitches. |
| pfx_CH-X | numeric | PITCHf/x average horizontal movement on changeups. |
| pfx_SLO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_ST-X | numeric | PITCHf/x average horizontal movement on sweepers. |
| pfx_CUO-X | numeric | PITCHf/x average horizontal movement on slurves. |
| pfx_FA-Z | numeric | PITCHf/x average vertical movement on four-seam fastballs. |
| pfx_FC-Z | numeric | PITCHf/x average vertical movement on cutters. |
| pfx_FS-Z | numeric | PITCHf/x average vertical movement on splitters. |
| pfx_SI-Z | numeric | PITCHf/x average vertical movement on sinkers. |
| pfx_SL-Z | numeric | PITCHf/x average vertical movement on sliders. |
| pfx_CU-Z | numeric | PITCHf/x average vertical movement on curveballs. |
| pfx_KC-Z | numeric | PITCHf/x average vertical movement on knuckle-curves. |
| pfx_EP-Z | numeric | PITCHf/x average vertical movement on eephus pitches. |
| pfx_CH-Z | numeric | PITCHf/x average vertical movement on changeups. |
| pfx_SLO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_ST-Z | numeric | PITCHf/x average vertical movement on sweepers. |
| pfx_CUO-Z | numeric | PITCHf/x average vertical movement on slurves. |
| pfx_wFA | numeric | PITCHf/x four-seam fastballs linear weight runs. |
| pfx_wFC | numeric | PITCHf/x cutters linear weight runs. |
| pfx_wFS | numeric | PITCHf/x splitters linear weight runs. |
| pfx_wSI | numeric | PITCHf/x sinkers linear weight runs. |
| pfx_wSL | numeric | PITCHf/x sliders linear weight runs. |
| pfx_wCU | numeric | PITCHf/x curveballs linear weight runs. |
| pfx_wKC | numeric | PITCHf/x knuckle-curves linear weight runs. |
| pfx_wEP | numeric | PITCHf/x eephus pitches linear weight runs. |
| pfx_wCH | numeric | PITCHf/x changeups linear weight runs. |
| pfx_wSLO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wST | numeric | PITCHf/x sweepers linear weight runs. |
| pfx_wCUO | numeric | PITCHf/x slurves linear weight runs. |
| pfx_wFA_C | numeric | PITCHf/x four-seam fastballs linear weight runs per 100 pitches. |
| pfx_wFC_C | numeric | PITCHf/x cutters linear weight runs per 100 pitches. |
| pfx_wFS_C | numeric | PITCHf/x splitters linear weight runs per 100 pitches. |
| pfx_wSI_C | numeric | PITCHf/x sinkers linear weight runs per 100 pitches. |
| pfx_wSL_C | numeric | PITCHf/x sliders linear weight runs per 100 pitches. |
| pfx_wCU_C | numeric | PITCHf/x curveballs linear weight runs per 100 pitches. |
| pfx_wKC_C | numeric | PITCHf/x knuckle-curves linear weight runs per 100 pitches. |
| pfx_wEP_C | numeric | PITCHf/x eephus pitches linear weight runs per 100 pitches. |
| pfx_wCH_C | numeric | PITCHf/x changeups linear weight runs per 100 pitches. |
| pfx_wSLO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_wST_C | numeric | PITCHf/x sweepers linear weight runs per 100 pitches. |
| pfx_wCUO_C | numeric | PITCHf/x slurves linear weight runs per 100 pitches. |
| pfx_aaFA | numeric | PITCHf/x average arsenal value on four-seam fastballs. |
| pfx_aaFC | numeric | PITCHf/x average arsenal value on cutters. |
| pfx_aaFS | numeric | PITCHf/x average arsenal value on splitters. |
| pfx_aaSI | numeric | PITCHf/x average arsenal value on sinkers. |
| pfx_aaSL | numeric | PITCHf/x average arsenal value on sliders. |
| pfx_aaCU | numeric | PITCHf/x average arsenal value on curveballs. |
| pfx_aaKC | numeric | PITCHf/x average arsenal value on knuckle-curves. |
| pfx_aaEP | numeric | PITCHf/x average arsenal value on eephus pitches. |
| pfx_aaCH | numeric | PITCHf/x average arsenal value on changeups. |
| pfx_aaSLO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_aaST | numeric | PITCHf/x average arsenal value on sweepers. |
| pfx_aaCUO | numeric | PITCHf/x average arsenal value on slurves. |
| pfx_spFA | numeric | PITCHf/x Stuff+ value on four-seam fastballs. |
| pfx_spFC | numeric | PITCHf/x Stuff+ value on cutters. |
| pfx_spFS | numeric | PITCHf/x Stuff+ value on splitters. |
| pfx_spSI | numeric | PITCHf/x Stuff+ value on sinkers. |
| pfx_spSL | numeric | PITCHf/x Stuff+ value on sliders. |
| pfx_spCU | numeric | PITCHf/x Stuff+ value on curveballs. |
| pfx_spKC | numeric | PITCHf/x Stuff+ value on knuckle-curves. |
| pfx_spEP | numeric | PITCHf/x Stuff+ value on eephus pitches. |
| pfx_spCH | numeric | PITCHf/x Stuff+ value on changeups. |
| pfx_spSLO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_spST | numeric | PITCHf/x Stuff+ value on sweepers. |
| pfx_spCUO | numeric | PITCHf/x Stuff+ value on slurves. |
| pfx_O-Swing_pct | numeric | PITCHf/x swing percentage on pitches outside the zone. |
| pfx_Z-Swing_pct | numeric | PITCHf/x swing percentage on pitches inside the zone. |
| pfx_Swing_pct | numeric | PITCHf/x swing percentage. |
| pfx_O-Contact_pct | numeric | PITCHf/x contact percentage on pitches outside the zone. |
| pfx_Z-Contact_pct | numeric | PITCHf/x contact percentage on pitches inside the zone. |
| pfx_Contact_pct | numeric | PITCHf/x contact percentage. |
| pfx_Zone_pct | numeric | PITCHf/x percentage of pitches in the strike zone. |
| pfx_Pace | numeric | PITCHf/x pace (seconds between pitches). |
| AvgBatSpeed | numeric | Average bat speed (mph). |
| FastSwing_pct | numeric | Fast-swing percentage (75+ mph bat speed). |
| SwingLength | numeric | Average swing length (feet). |
| SquaredUpContact_pct | numeric | Squared-up percentage per batted-ball contact. |
| SquaredUpSwing_pct | numeric | Squared-up percentage per swing. |
| BlastContact_pct | numeric | Blast percentage per batted-ball contact. |
| BlastSwing_pct | numeric | Blast percentage per swing. |
| Swords | integer | Swords (awkward, defensive swinging strikes induced). |
| CompetitiveSwings | integer | Competitive swings tracked. |
| Tilt | numeric | Average swing tilt (degrees). |
| AttackAngle | numeric | Average attack angle (degrees). |
| AttackDirection | numeric | Average attack direction (degrees). |
| IdealAttackAngle_pct | numeric | Percentage of swings in the ideal attack-angle range. |
| DepthInBox | numeric | Average batter depth in the box (inches). |
| DistanceOffPlate | numeric | Average batter distance off the plate (inches). |
| scH-Swing_pct | numeric | Statcast swing percentage on hard-hit pitches. |
| scH-Contact_pct | numeric | Statcast contact percentage on hard-hit pitches. |
| scH-Zone_pct | numeric | Statcast in-zone percentage on hard-hit pitches. |
| scS-Swing_pct | numeric | Statcast swing percentage on slider pitches. |
| scS-Contact_pct | numeric | Statcast contact percentage on slider pitches. |
| scS-Zone_pct | numeric | Statcast in-zone percentage on slider pitches. |
| scC-Swing_pct | numeric | Statcast swing percentage on curveball pitches. |
| scC-Contact_pct | numeric | Statcast contact percentage on curveball pitches. |
| scC-Zone_pct | numeric | Statcast in-zone percentage on curveball pitches. |
| scW-Swing_pct | numeric | Statcast swing percentage on offspeed pitches. |
| scW-Contact_pct | numeric | Statcast contact percentage on offspeed pitches. |
| scW-Zone_pct | numeric | Statcast in-zone percentage on offspeed pitches. |
| scSI-Swing_pct | numeric | Statcast swing percentage on sinker pitches. |
| scSI-Contact_pct | numeric | Statcast contact percentage on sinker pitches. |
| scSI-Zone_pct | numeric | Statcast in-zone percentage on sinker pitches. |
| scSO-Swing_pct | numeric | Statcast swing percentage on softly-hit pitches. |
| scSO-Contact_pct | numeric | Statcast contact percentage on softly-hit pitches. |
| scSO-Zone_pct | numeric | Statcast in-zone percentage on softly-hit pitches. |
| scO-Swing_pct | numeric | Statcast swing percentage on out-of-zone pitches. |
| scO-Contact_pct | numeric | Statcast contact percentage on out-of-zone pitches. |
| scO-Zone_pct | numeric | Statcast in-zone percentage on out-of-zone pitches. |
| scZ-Swing_pct | numeric | Statcast swing percentage on in-zone pitches. |
| scZ-Contact_pct | numeric | Statcast contact percentage on in-zone pitches. |
| scZ-Zone_pct | numeric | Statcast in-zone percentage on in-zone pitches. |
| pi_CH_pct | numeric | PITCHInfo changeups usage percentage. |
| pi_CU_pct | numeric | PITCHInfo curveballs usage percentage. |
| pi_FA_pct | numeric | PITCHInfo four-seam fastballs usage percentage. |
| pi_FC_pct | numeric | PITCHInfo cutters usage percentage. |
| pi_FS_pct | numeric | PITCHInfo splitters usage percentage. |
| pi_SI_pct | numeric | PITCHInfo sinkers usage percentage. |
| pi_SL_pct | numeric | PITCHInfo sliders usage percentage. |
| pi_XX_pct | numeric | PITCHInfo unidentified pitches usage percentage. |
| pi_vCH | numeric | PITCHInfo average changeups velocity. |
| pi_vCU | numeric | PITCHInfo average curveballs velocity. |
| pi_vFA | numeric | PITCHInfo average four-seam fastballs velocity. |
| pi_vFC | numeric | PITCHInfo average cutters velocity. |
| pi_vFS | numeric | PITCHInfo average splitters velocity. |
| pi_vSI | numeric | PITCHInfo average sinkers velocity. |
| pi_vSL | numeric | PITCHInfo average sliders velocity. |
| pi_vXX | numeric | PITCHInfo average unidentified pitches velocity. |
| pi_CH-X | numeric | PITCHInfo average horizontal movement on changeups. |
| pi_CU-X | numeric | PITCHInfo average horizontal movement on curveballs. |
| pi_FA-X | numeric | PITCHInfo average horizontal movement on four-seam fastballs. |
| pi_FC-X | numeric | PITCHInfo average horizontal movement on cutters. |
| pi_FS-X | numeric | PITCHInfo average horizontal movement on splitters. |
| pi_SI-X | numeric | PITCHInfo average horizontal movement on sinkers. |
| pi_SL-X | numeric | PITCHInfo average horizontal movement on sliders. |
| pi_XX-X | numeric | PITCHInfo average horizontal movement on unidentified pitches. |
| pi_CH-Z | numeric | PITCHInfo average vertical movement on changeups. |
| pi_CU-Z | numeric | PITCHInfo average vertical movement on curveballs. |
| pi_FA-Z | numeric | PITCHInfo average vertical movement on four-seam fastballs. |
| pi_FC-Z | numeric | PITCHInfo average vertical movement on cutters. |
| pi_FS-Z | numeric | PITCHInfo average vertical movement on splitters. |
| pi_SI-Z | numeric | PITCHInfo average vertical movement on sinkers. |
| pi_SL-Z | numeric | PITCHInfo average vertical movement on sliders. |
| pi_XX-Z | numeric | PITCHInfo average vertical movement on unidentified pitches. |
| pi_wCH | numeric | PITCHInfo changeups linear weight runs. |
| pi_wCU | numeric | PITCHInfo curveballs linear weight runs. |
| pi_wFA | numeric | PITCHInfo four-seam fastballs linear weight runs. |
| pi_wFC | numeric | PITCHInfo cutters linear weight runs. |
| pi_wFS | numeric | PITCHInfo splitters linear weight runs. |
| pi_wSI | numeric | PITCHInfo sinkers linear weight runs. |
| pi_wSL | numeric | PITCHInfo sliders linear weight runs. |
| pi_wXX | numeric | PITCHInfo unidentified pitches linear weight runs. |
| pi_wCH_C | numeric | PITCHInfo changeups linear weight runs per 100 pitches. |
| pi_wCU_C | numeric | PITCHInfo curveballs linear weight runs per 100 pitches. |
| pi_wFA_C | numeric | PITCHInfo four-seam fastballs linear weight runs per 100 pitches. |
| pi_wFC_C | numeric | PITCHInfo cutters linear weight runs per 100 pitches. |
| pi_wFS_C | numeric | PITCHInfo splitters linear weight runs per 100 pitches. |
| pi_wSI_C | numeric | PITCHInfo sinkers linear weight runs per 100 pitches. |
| pi_wSL_C | numeric | PITCHInfo sliders linear weight runs per 100 pitches. |
| pi_wXX_C | numeric | PITCHInfo unidentified pitches linear weight runs per 100 pitches. |
| pi_O-Swing_pct | numeric | PITCHInfo swing percentage on pitches outside the zone. |
| pi_Z-Swing_pct | numeric | PITCHInfo swing percentage on pitches inside the zone. |
| pi_Swing_pct | numeric | PITCHInfo swing percentage. |
| pi_O-Contact_pct | numeric | PITCHInfo contact percentage on pitches outside the zone. |
| pi_Z-Contact_pct | numeric | PITCHInfo contact percentage on pitches inside the zone. |
| pi_Contact_pct | numeric | PITCHInfo contact percentage. |
| pi_Zone_pct | numeric | PITCHInfo percentage of pitches in the strike zone. |
| pi_Pace | numeric | PITCHInfo pace (seconds between pitches). |
| Events | integer | Batted-ball events with Statcast measurement. |
| EV | numeric | Average exit velocity (mph). |
| LA | numeric | Average launch angle (degrees). |
| Barrels | integer | Barreled batted balls. |
| Barrel_pct | numeric | Barrel percentage. |
| maxEV | numeric | Maximum exit velocity (mph). |
| HardHit | integer | Hard-hit batted balls (95+ mph). |
| HardHit_pct | numeric | Hard-hit percentage (95+ mph). |
| Q | numeric | Quality of contact / quality score. |
| TG | integer | Total games in the span. |
| TIP | numeric | Total innings pitched in the span. |
| positionDB | character | Position code from the database. |
| position | character | Position played. |
| team_name_abb | character | Team name abbreviation. |
| teamid | integer | FanGraphs team ID. |
| playerTeamId | integer | FanGraphs player-team ID. |
| EV90 | numeric | 90th-percentile exit velocity (mph). |
| KN_pct | numeric | Knuckleball percentage (pitch usage). |
| KNv | numeric | Average knuckleball velocity. |
| wKN | numeric | Knuckleball pitch-type linear weight runs. |
| wKN_C | numeric | Knuckleball linear weight runs per 100 pitches. |
| rCPTV | numeric | Regressed catcher pitch-type value. |
| pfx_CV_pct | numeric | PITCHf/x slow curves usage percentage. |
| pfx_vCV | numeric | PITCHf/x average slow curves velocity. |
| pfx_CV-X | numeric | PITCHf/x average horizontal movement on slow curves. |
| pfx_CV-Z | numeric | PITCHf/x average vertical movement on slow curves. |
| pfx_wCV | numeric | PITCHf/x slow curves linear weight runs. |
| pfx_wCV_C | numeric | PITCHf/x slow curves linear weight runs per 100 pitches. |
| pfx_aaCV | numeric | PITCHf/x average arsenal value on slow curves. |
| pfx_spCV | numeric | PITCHf/x Stuff+ value on slow curves. |
| pfx_KN_pct | numeric | PITCHf/x knuckleballs usage percentage. |
| pfx_vKN | numeric | PITCHf/x average knuckleballs velocity. |
| pfx_KN-X | numeric | PITCHf/x average horizontal movement on knuckleballs. |
| pfx_KN-Z | numeric | PITCHf/x average vertical movement on knuckleballs. |
| pfx_wKN | numeric | PITCHf/x knuckleballs linear weight runs. |
| pfx_wKN_C | numeric | PITCHf/x knuckleballs linear weight runs per 100 pitches. |
| pfx_aaKN | numeric | PITCHf/x average arsenal value on knuckleballs. |
| pfx_spKN | numeric | PITCHf/x Stuff+ value on knuckleballs. |
| pi_KN_pct | numeric | PITCHInfo knuckleballs usage percentage. |
| pi_vKN | numeric | PITCHInfo average knuckleballs velocity. |
| pi_KN-X | numeric | PITCHInfo average horizontal movement on knuckleballs. |
| pi_KN-Z | numeric | PITCHInfo average vertical movement on knuckleballs. |
| pi_wKN | numeric | PITCHInfo knuckleballs linear weight runs. |
| pi_wKN_C | numeric | PITCHInfo knuckleballs linear weight runs per 100 pitches. |
| rDSV | numeric | Regressed defensive stuff value. |
| pfx_SC_pct | numeric | PITCHf/x screwballs usage percentage. |
| pfx_vSC | numeric | PITCHf/x average screwballs velocity. |
| pfx_SC-X | numeric | PITCHf/x average horizontal movement on screwballs. |
| pfx_SC-Z | numeric | PITCHf/x average vertical movement on screwballs. |
| pfx_wSC | numeric | PITCHf/x screwballs linear weight runs. |
| pfx_wSC_C | numeric | PITCHf/x screwballs linear weight runs per 100 pitches. |
| pfx_aaSC | numeric | PITCHf/x average arsenal value on screwballs. |
| pfx_spSC | numeric | PITCHf/x Stuff+ value on screwballs. |
| pi_SB_pct | numeric | PITCHInfo slow-balls usage percentage. |
| pi_vSB | numeric | PITCHInfo average slow-balls velocity. |
| pi_SB-X | numeric | PITCHInfo average horizontal movement on slow-balls. |
| pi_SB-Z | numeric | PITCHInfo average vertical movement on slow-balls. |
| pi_wSB | numeric | PITCHInfo slow-balls linear weight runs. |
| pi_wSB_C | numeric | PITCHInfo slow-balls linear weight runs per 100 pitches. |
| pi_CS_pct | numeric | PITCHInfo slow curves usage percentage. |
| pi_vCS | numeric | PITCHInfo average slow curves velocity. |
| pi_CS-X | numeric | PITCHInfo average horizontal movement on slow curves. |
| pi_CS-Z | numeric | PITCHInfo average vertical movement on slow curves. |
| pi_wCS | numeric | PITCHInfo slow curves linear weight runs. |
| pi_wCS_C | numeric | PITCHInfo slow curves linear weight runs per 100 pitches. |
| sp_s_FO | numeric | Stuff+ grade on forkballs/pitch-outs (100 = average). |
| sp_l_FO | numeric | Location+ grade on forkballs/pitch-outs (100 = average). |
| sp_p_FO | numeric | Pitching+ grade on forkballs/pitch-outs (100 = average). |
| pfx_FO_pct | numeric | PITCHf/x forkballs/pitch-outs usage percentage. |
| pfx_vFO | numeric | PITCHf/x average forkballs/pitch-outs velocity. |
| pfx_FO-X | numeric | PITCHf/x average horizontal movement on forkballs/pitch-outs. |
| pfx_FO-Z | numeric | PITCHf/x average vertical movement on forkballs/pitch-outs. |
| pfx_wFO | numeric | PITCHf/x forkballs/pitch-outs linear weight runs. |
| pfx_wFO_C | numeric | PITCHf/x forkballs/pitch-outs linear weight runs per 100 pitches. |
| pfx_aaFO | numeric | PITCHf/x average arsenal value on forkballs/pitch-outs. |
| pfx_spFO | numeric | PITCHf/x Stuff+ value on forkballs/pitch-outs. |
try(fg_team_pitcher(startseason = 2015, endseason = 2015, qual = 150))try(fg_team_pitcher(startseason = 2015, endseason = 2015, qual = 150))
This function allows you to calculate FIP and related metrics for any given set of data, provided the right variables are in the data set. The function currently returns both FIP per inning pitched, wOBA against (based on batters faced), and wOBA against per instance of fair contact.
fip_plus(df)fip_plus(df)
df |
A data frame of statistics that includes, at a minimum, the following columns: IP (innings pitched), BF (batters faced), uBB (unintentional walks), HBP (Hit By Pitch), x1B (singles), x2B (doubles), x3B (triples), HR (home runs), AB (at-bats), SH (sacrifice hits), SO (strike outs), and season. |
Returns a tibble with the following columns:
| col_name | types |
| bbref_id | character |
| season | integer |
| Name | character |
| Age | numeric |
| Level | character |
| Team | character |
| G | numeric |
| GS | numeric |
| W | numeric |
| L | numeric |
| SV | numeric |
| IP | numeric |
| H | numeric |
| R | numeric |
| ER | numeric |
| uBB | numeric |
| BB | numeric |
| SO | numeric |
| HR | numeric |
| HBP | numeric |
| ERA | numeric |
| AB | numeric |
| X1B | numeric |
| X2B | numeric |
| X3B | numeric |
| IBB | numeric |
| GDP | numeric |
| SF | numeric |
| SB | numeric |
| CS | numeric |
| PO | numeric |
| BF | numeric |
| Pit | numeric |
| Str | numeric |
| StL | numeric |
| StS | numeric |
| GB.FB | numeric |
| LD | numeric |
| PU | numeric |
| WHIP | numeric |
| BAbip | numeric |
| SO9 | numeric |
| SO.W | numeric |
| SO_perc | numeric |
| uBB_perc | numeric |
| SO_uBB | numeric |
| FIP | numeric |
| wOBA_against | numeric |
| wOBA_CON_against | numeric |
try({ df <- bref_daily_pitcher("2015-04-05", "2015-04-30") fip_plus(df) })try({ df <- bref_daily_pitcher("2015-04-05", "2015-04-30") fip_plus(df) })
(legacy) Retrieve batting orders for a given MLB game
get_batting_orders(game_pk, type = "starting")get_batting_orders(game_pk, type = "starting")
game_pk |
The unique game_pk identifier for the game |
type |
Whether to just return the starting lineup ('starting') or all batters that appeared ('all') |
Returns a tibble that includes probable starting pitchers and
the home plate umpire for the game_pk requested
(legacy) Retrieve draft pick information by year
get_draft_mlb(year)get_draft_mlb(year)
year |
The year for which to return data |
Returns a tibble with information for every draft pick in every round for the year requested
(legacy) Retrieve additional game information for major and minor league games
get_game_info_mlb(game_pk)get_game_info_mlb(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tibble that includes supplemental information, such as weather, official scorer, attendance, etc., for the game_pk provided
(legacy) Download a data frame of supplemental data about MLB games since 2008.
get_game_info_sup_petti()get_game_info_sup_petti()
Function returns a tibble with various columns, including:
game_pk
game_date
venue id
attendance
game temperature
wind speed
direction
start time
end time
(legacy) Get MLB Game Info by Date and Level
get_game_pks_mlb(date, level_ids = c(1))get_game_pks_mlb(date, level_ids = c(1))
date |
The date for which you want to find game_pk values for MLB games |
level_ids |
A numeric vector with ids for each level where game_pks are desired. See below for a reference of level ids. |
Returns a tibble that includes game_pk values and additional information for games scheduled or played
(legacy) Get Play-By-Play Data for NCAA Baseball Games
(legacy) Get Play-By-Play Data for NCAA Baseball Games
get_ncaa_baseball_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... ) ncaa_baseball_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... )get_ncaa_baseball_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... ) ncaa_baseball_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... )
game_info_url |
The url for the game's boxscore data. This can be found using the ncaa_schedule_info function. |
game_pbp_url |
The url for the game's play-by-play data. This can be found using the ncaa_schedule_info function. |
raw_html_to_disk |
Write raw html to disk (saves as |
raw_html_path |
Directory path to write raw html |
read_from_file |
Read from raw html on disk |
file |
File with full path to read raw html |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with play-by-play data for an individual game.
A data frame with play-by-play data for an individual game.
(legacy) Get NCAA Baseball Game Logs
get_ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)get_ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)
player_id |
A player's unique id. Can be found using the get_ncaa_baseball_roster function. |
year |
The year of interest. |
type |
The kind of statistics you want to return. Current options are 'batting' or 'pitching'. |
span |
The span of time; can either be 'game' for game logs in a season, or 'career' which returns seasonal stats for a player's career. |
... |
Additional arguments passed to an underlying function like httr. |
A data frame containing player and school information as well as game by game statistics
game_info_url(legacy) Retrieve lineups for a given NCAA game via its game_info_url
get_ncaa_lineups(game_info_url = NULL, ...)get_ncaa_lineups(game_info_url = NULL, ...)
game_info_url |
The unique game info url |
... |
Additional arguments passed to an underlying function like httr. |
Returns a tibble of each school's starting lineup and starting pitcher
(legacy) Get Park Effects for NCAA Baseball Teams
get_ncaa_park_factor(team_id, years, type = "conference", ...)get_ncaa_park_factor(team_id, years, type = "conference", ...)
team_id |
The team's unique NCAA id. |
years |
The season or seasons (i.e. use 2016 for the 2015-2016 season, etc., limited to just 2013-2023 seasons). |
type |
default is conference. the conference parameter adjusts for the conference the school plays in, the division parameter calculates based on the division the school plays in 1,2,or 3. Defaults to 'conference'. |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with the following fields: school, home_game, away_game, runs_scored_home, runs_allowed_home, run_scored_away, runs_allowed_away, base_pf (base park factor), home_game_adj (an adjustment for the percentage of home games played) final_pf (park factor after adjustments)
(legacy) Get Schedule and Results for NCAA Baseball Teams
get_ncaa_schedule_info(team_id = NULL, year = NULL, pbp_links = FALSE, ...)get_ncaa_schedule_info(team_id = NULL, year = NULL, pbp_links = FALSE, ...)
team_id |
The team's unique NCAA id. |
year |
The season (i.e. use 2016 for the 2015-2016 season, etc.) |
pbp_links |
Logical parameter to run process for scraping play_by_play urls for each game |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with the following fields: date, opponent, result, score, innings (if more than regulation), and the url for the game itself.
(legacy) Acquire pitch-by-pitch data for Major and Minor League games
(legacy) Acquire pitch-by-pitch data for Major and Minor League games
get_pbp_mlb(game_pk) get_pbp_mlb(game_pk)get_pbp_mlb(game_pk) get_pbp_mlb(game_pk)
game_pk |
The date for which you want to find game_pk values for MLB games |
Returns a tibble that includes over 100 columns of data provided by the MLB Stats API at a pitch level.
Returns a tibble that includes over 100 columns of data provided by the MLB Stats API at a pitch level.
(legacy) Retrieve probable starters for a given MLB game
get_probables_mlb(game_pk)get_probables_mlb(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tibble that includes probable starting pitchers and
the home plate umpire for the game_pk requested
(legacy) Get, Parse, and Format Retrosheet Event and Roster Files
get_retrosheet_data( path_to_directory = NULL, years_to_acquire = most_recent_mlb_season() - 1, sequence_years = FALSE )get_retrosheet_data( path_to_directory = NULL, years_to_acquire = most_recent_mlb_season() - 1, sequence_years = FALSE )
path_to_directory |
(default: NULL) A file path that if set, either:
|
years_to_acquire |
(format: YYYY) The seasons to collect. Single, multiple, and
sequential years can be passed. If passing multiple years, enclose in a
vector (i.e. c(2017,2018)). Defaults to |
sequence_years |
(logical, default: FALSE): If the seasons passed in the years_to_acquire parameter should be sequenced so that the function returns all years including and between the vector passed, set the argument to TRUE. Defaults to FALSE. |
If path_to_directory is not set (default), the process will return a named list
of tibbles: 'events' and 'rosters' for each season provided to years_to_acquire
If path_to_directory is set, will also write two csv files to the unzipped directory: 1) a combined csv
of the event data for a given year and 2) a combined csv of each team's
roster for each year provided to years_to_acquire
(legacy) Download a data frame of all umpires and their MLBAM IDs for games since 2008
get_umpire_ids_petti()get_umpire_ids_petti()
Function returns a tibble with the following columns:
id
position,
name
game_pk
game_date
This function allows you to create spray charts with ggplots given a data frame with batted ball location coordinates.
ggspraychart( data, x_value = "hc_x", y_value = "-hc_y", fill_value = NULL, fill_palette = NULL, fill_legend_title = NULL, density = FALSE, bin_size = 15, point_alpha = 0.75, point_size = 2, frame = NULL )ggspraychart( data, x_value = "hc_x", y_value = "-hc_y", fill_value = NULL, fill_palette = NULL, fill_legend_title = NULL, density = FALSE, bin_size = 15, point_alpha = 0.75, point_size = 2, frame = NULL )
data |
A data frame that includes batted ball coordinates. Typically, this coordinates will come from the GameDay xml feed or downloads from baseballsavant.com |
x_value |
The x coordindate. Typically hc_x. |
y_value |
The y coordinate. Typically hc_y. You generally need the inverse or negative of the hc_y values, so it is recommended you calculate before plotting. |
fill_value |
The categorical variable that you want the geom_points to base the fill on. Pass as a string. If left blank, defaults to blue. |
fill_palette |
An object containing a customer palette to be used with ggplot2::scale_fill_manual. |
fill_legend_title |
A string containing a custom legend title to be used with ggplot2::scale_fill_manual. |
density |
Chooses between a 2d density plot or a point plot. Defaults to FALSE. |
bin_size |
Size of bins used when building a density plot. Defaults to 15. |
point_alpha |
Alpha value whenever geom_point is used. Defaults to .75. Recommend .3 for density plots. To remove points on density points set use point_alpha = 0. |
point_size |
Set the size of geom_point if used. |
frame |
Variable to use as the frame argument if using gganimate to create animated plots. For density plots be sure your variable is a factor. |
ggspraychart(df, x_value = "hc_x", y_value = "-hc_y", fill_value = "events")
A plot of the spraychart for the supplied dataset
Based on a series of heuristics, this function attempts to label Statcast data for which the launch angle and speed have been imputed.
label_statcast_imputed_data( statcast_df, impute_file = NULL, inverse_precision = 10000 )label_statcast_imputed_data( statcast_df, impute_file = NULL, inverse_precision = 10000 )
statcast_df |
A dataframe containing Statcast batted ball data |
impute_file |
A CSV file giving the launch angle, launch speed,
|
inverse_precision |
inverse of how many digits to truncate the launch angle
and speed to for comparison. Default is |
A copy of the input dataframe with the same Statcast pitch-level
columns produced by statcast_search() (see that function's return value for
the full column-by-column reference), with three columns appended:
| col_name | types | description |
| ila | integer | Launch angle truncated to integer precision (launch_angle * inverse_precision), used as a join key against the impute table. |
| ils | integer | Launch speed truncated to integer precision (launch_speed * inverse_precision), used as a join key against the impute table. |
| imputed | numeric | 1 if the launch angle and launch speed are likely imputed, 0 otherwise. |
try({ statcast_df <- statcast_search("2017-05-01", "2017-05-02") sc_df <- label_statcast_imputed_data(statcast_df) mean(sc_df$imputed) })try({ statcast_df <- statcast_search("2017-05-01", "2017-05-02") sc_df <- label_statcast_imputed_data(statcast_df) mean(sc_df$imputed) })
This function allows a user to generate linear weight values for events using Baseball Savant data. Output includes both linear weights above average and linear weights above outs for home runs, triples, doubles, singles, walks, hit by pitches, and outs.
linear_weights_savant(df, level = "plate appearance")linear_weights_savant(df, level = "plate appearance")
df |
A data frame generated from Baseball Savant that has been run through
the |
level |
Whether to calculate linear weights the plate appearance or pitch level. Defaults to 'plate appearance'. |
Returns a tibble with the following columns:
| col_name | types | description |
| events | character | Event type (e.g. home_run, triple, double, single, walk, hit_by_pitch, outs). |
| linear_weights_above_average | numeric | Average change in run expectancy (RE24) for the event, i.e. linear weight above average. |
| linear_weights_above_outs | numeric | Linear weight expressed above the value of an out (above-average value plus the absolute out value). |
try({ df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15", playerid = 621043, player_type = 'batter') df <- run_expectancy_code(df, level = "plate appearances") linear_weights_savant(df, level = "plate appearance") })try({ df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15", playerid = 621043, player_type = 'batter') df <- run_expectancy_code(df, level = "plate appearances") linear_weights_savant(df, level = "plate appearance") })
load_umpire_ids(): Download a data frame of all umpires and their mlbamids for games since 2008.
load_game_info_sup(): Download a data frame of supplemental data about MLB games since 2008.
load_ncaa_baseball_pbp(): Load cleaned NCAA baseball play-by-play data from the baseballr data repo.
load_ncaa_baseball_schedule(): Load cleaned NCAA baseball schedule from the baseballr data repo.
load_ncaa_baseball_season_ids(): Load cleaned NCAA men's college baseball season IDs from the baseballr data repo.
load_ncaa_baseball_teams(): Load cleaned NCAA men's college baseball teams from the baseballr data repo.
These functions load cleaned MLB and NCAA baseball data from the baseballr data repository.
Download a data frame of supplemental data about MLB games since 2008.
load_game_info_sup()load_game_info_sup()
Function returns a tibble with various columns, including:
game_pk
game_date
venue id
attendance
game temperature
wind speed
direction
start time
end time
try(load_game_info_sup())try(load_game_info_sup())
helper that loads multiple seasons from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
load_ncaa_baseball_pbp( seasons = most_recent_ncaa_baseball_season(), ..., dbConnection = NULL, tablename = NULL )load_ncaa_baseball_pbp( seasons = most_recent_ncaa_baseball_season(), ..., dbConnection = NULL, tablename = NULL )
seasons |
A vector of 4-digit years associated with given NCAA college baseball seasons. (Min: 2022) |
... |
Additional arguments passed to an underlying function that writes the season data into a database. |
dbConnection |
A |
tablename |
The name of the schedule data table within the database |
Returns a tibble
try(load_ncaa_baseball_pbp(seasons = 2021))try(load_ncaa_baseball_pbp(seasons = 2021))
helper that loads multiple seasons from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
load_ncaa_baseball_schedule( seasons = most_recent_ncaa_baseball_season(), ..., dbConnection = NULL, tablename = NULL )load_ncaa_baseball_schedule( seasons = most_recent_ncaa_baseball_season(), ..., dbConnection = NULL, tablename = NULL )
seasons |
A vector of 4-digit years associated with given NCAA college baseball seasons. (Min: 2012) |
... |
Additional arguments passed to an underlying function that writes the season data into a database. |
dbConnection |
A |
tablename |
The name of the schedule data table within the database |
Returns a tibble
try(load_ncaa_baseball_schedule(seasons = 2022))try(load_ncaa_baseball_schedule(seasons = 2022))
helper that loads multiple seasons of season IDs from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
load_ncaa_baseball_season_ids(..., dbConnection = NULL, tablename = NULL)load_ncaa_baseball_season_ids(..., dbConnection = NULL, tablename = NULL)
... |
Additional arguments passed to an underlying function that writes the season data into a database. |
dbConnection |
A |
tablename |
The name of the data table within the database |
Returns a tibble
try(load_ncaa_baseball_season_ids())try(load_ncaa_baseball_season_ids())
helper that loads multiple seasons of teams from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
load_ncaa_baseball_teams(..., dbConnection = NULL, tablename = NULL)load_ncaa_baseball_teams(..., dbConnection = NULL, tablename = NULL)
... |
Additional arguments passed to an underlying function that writes the season data into a database. |
dbConnection |
A |
tablename |
The name of the data table within the database |
Returns a tibble
try(load_ncaa_baseball_teams())try(load_ncaa_baseball_teams())
Download a data frame of all umpires and their mlbamids for games since 2008
load_umpire_ids()load_umpire_ids()
Function returns a tibble with the following columns:
id
position
name
game_pk
game_date
try(load_umpire_ids())try(load_umpire_ids())
fip_plus(): Calculate FIP and related metrics for any set of data.
woba_plus(): Calculate wOBA and related metrics for any set of data.
team_consistency(): Calculate Team-level Consistency.
label_statcast_imputed_data(): Label Statcast data as imputed.
run_expectancy_code(): Generate run expectancy and related measures from Baseball Savant data.
linear_weights_savant(): Generate linear weight values for events using Baseball Savant data.
team_consistency(year=2015)
fips_plus(df)
woba_plus(df)
statcast_df <- scrape_statcast_savant("2017-05-01", "2017-05-02")
sc_df <- label_statcast_imputed_data(statcast_df)
mean(sc_df$imputed)
df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15",
playerid = 621043, player_type = 'batter')
run_expectancy_code(df, level = "plate appearances")
df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15",
playerid = 621043, player_type = 'batter')
df <- run_expectancy_code(df, level = "plate appearances")
linear_weights_savant(df, level = "plate appearance")
(legacy) Scrape MiLB game logs for batters from FanGraphs
milb_batter_game_logs_fg(playerid, year)milb_batter_game_logs_fg(playerid, year)
playerid |
The batter's minor league ID from FanGraphs. |
year |
The season for which game logs should be returned. |
Returns a tibble of Minor League batter game logs.
(legacy) Scrape MiLB game logs for pitchers from FanGraphs
milb_pitcher_game_logs_fg(playerid, year)milb_pitcher_game_logs_fg(playerid, year)
playerid |
The pitcher's minor league ID from FanGraphs.com. |
year |
The season for which game logs should be returned. |
Returns a tibble of Minor League pitcher game logs.
mlb_batting_orders(): Retrieve batting orders for a given MLB game.
mlb_draft(): Retrieve draft pick information by year.
mlb_pbp(): Acquire pitch-by-pitch data for Major and Minor League games.
mlb_game_info(): Retrieve additional game information for major and minor league games.
mlb_game_pks(): Get MLB Game Info by Date and Level.
mlb_schedule(): Find game_pk values for professional baseball games (major and minor leagues).
mlb_probables(): Retrieve probable starters for a given MLB game.
mlb_batting_orders(game_pk=566001)
mlb_draft(year= 2018)
mlb_pbp(game_pk = 575156)
mlb_game_info(game_pk = 566001)
mlb_game_pks("2019-04-29")
mlb_schedule(season = "2019")
mlb_probables(566001)
mlb_all_star_ballots(): Find MLB All-Star Ballots.
mlb_all_star_final_vote(): Find MLB All-Star Final Vote.
mlb_all_star_write_ins(): Find MLB All-Star Write-ins.
These functions retrieve MLB All-Star ballot, final vote, and write-in information from the MLB Stats API.
Find MLB All-Star Ballots
mlb_all_star_ballots(league_id = NULL, season = NULL)mlb_all_star_ballots(league_id = NULL, season = NULL)
league_id |
League ID for league all-star ballot of interest. |
season |
The season of the all-star ballot. |
Returns a tibble with the following columns:
| col_name | types | description |
| player_id | integer | MLB player ID. |
| full_name | character | Player full name. |
| link | character | MLB Stats API relative resource link. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Player uniform number. |
| birth_date | character | Birth date (YYYY-MM-DD). |
| current_age | integer | Current age in years. |
| birth_city | character | City of birth. |
| birth_country | character | Country of birth. |
| height | character | Height (feet and inches). |
| weight | integer | Weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Preferred first name. |
| use_last_name | character | Preferred last name. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Name as shown in box scores. |
| nick_name | character | Player nickname. |
| gender | character | Player gender. |
| name_matrilineal | character | Maternal family name. |
| is_player | logical | Whether the person is a player. |
| is_verified | logical | Whether the player profile is verified. |
| pronunciation | character | Phonetic name pronunciation. |
| last_played_date | character | Date of last MLB game played. |
| mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Name in first-last order. |
| name_slug | character | URL-friendly name slug. |
| first_last_name | character | First and last name. |
| last_first_name | character | Name in last, first order. |
| last_init_name | character | Last name with first initial. |
| init_last_name | character | First initial with last name. |
| full_fml_name | character | Full name (first-middle-last). |
| full_lfm_name | character | Full name (last-first-middle). |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| birth_state_province | character | State or province of birth. |
| draft_year | integer | Year the player was drafted. |
| name_title | character | Name title. |
| name_suffix | character | Name suffix (e.g. Jr., III). |
| primary_position_code | character | Primary fielding position code. |
| primary_position_name | character | Primary fielding position name. |
| primary_position_type | character | Primary position type (e.g. Infielder). |
| primary_position_abbreviation | character | Primary position abbreviation. |
| bat_side_code | character | Batting side code (L/R/S). |
| bat_side_description | character | Batting side description. |
| pitch_hand_code | character | Throwing hand code (L/R). |
| pitch_hand_description | character | Throwing hand description. |
| league_id | numeric | MLB league ID. |
| season | numeric | Season (YYYY). |
try(mlb_all_star_ballots(league_id = 103, season = 2021))try(mlb_all_star_ballots(league_id = 103, season = 2021))
Find MLB All-Star Final Vote
mlb_all_star_final_vote(league_id = NULL, season = NULL)mlb_all_star_final_vote(league_id = NULL, season = NULL)
league_id |
League ID for league all-star ballot of interest. |
season |
The season of the all-star ballot. |
Returns a tibble with the following columns:
| col_name | types | description |
| player_id | integer | MLB player ID. |
| full_name | character | Player full name. |
| link | character | MLB Stats API relative resource link. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Player uniform number. |
| birth_date | character | Birth date (YYYY-MM-DD). |
| current_age | integer | Current age in years. |
| birth_city | character | City of birth. |
| birth_country | character | Country of birth. |
| height | character | Height (feet and inches). |
| weight | integer | Weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Preferred first name. |
| use_last_name | character | Preferred last name. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Name as shown in box scores. |
| nick_name | character | Player nickname. |
| gender | character | Player gender. |
| name_matrilineal | character | Maternal family name. |
| is_player | logical | Whether the person is a player. |
| is_verified | logical | Whether the player profile is verified. |
| pronunciation | character | Phonetic name pronunciation. |
| last_played_date | character | Date of last MLB game played. |
| mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Name in first-last order. |
| name_slug | character | URL-friendly name slug. |
| first_last_name | character | First and last name. |
| last_first_name | character | Name in last, first order. |
| last_init_name | character | Last name with first initial. |
| init_last_name | character | First initial with last name. |
| full_fml_name | character | Full name (first-middle-last). |
| full_lfm_name | character | Full name (last-first-middle). |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| birth_state_province | character | State or province of birth. |
| name_title | character | Name title. |
| name_suffix | character | Name suffix (e.g. Jr., III). |
| draft_year | integer | Year the player was drafted. |
| primary_position_code | character | Primary fielding position code. |
| primary_position_name | character | Primary fielding position name. |
| primary_position_type | character | Primary position type (e.g. Infielder). |
| primary_position_abbreviation | character | Primary position abbreviation. |
| bat_side_code | character | Batting side code (L/R/S). |
| bat_side_description | character | Batting side description. |
| pitch_hand_code | character | Throwing hand code (L/R). |
| pitch_hand_description | character | Throwing hand description. |
| league_id | numeric | MLB league ID. |
| season | numeric | Season (YYYY). |
try(mlb_all_star_final_vote(league_id = 103, season = 2021))try(mlb_all_star_final_vote(league_id = 103, season = 2021))
Find MLB All-Star Write-ins
mlb_all_star_write_ins(league_id = NULL, season = NULL)mlb_all_star_write_ins(league_id = NULL, season = NULL)
league_id |
League ID for league all-star ballot of interest. |
season |
The season of the all-star ballot. |
Returns a tibble with the following columns:
| col_name | types | description |
| player_id | integer | MLB player ID. |
| full_name | character | Player full name. |
| link | character | MLB Stats API relative resource link. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Player uniform number. |
| birth_date | character | Birth date (YYYY-MM-DD). |
| current_age | integer | Current age in years. |
| birth_city | character | City of birth. |
| birth_state_province | character | State or province of birth. |
| birth_country | character | Country of birth. |
| height | character | Height (feet and inches). |
| weight | integer | Weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Preferred first name. |
| use_last_name | character | Preferred last name. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Name as shown in box scores. |
| nick_name | character | Player nickname. |
| gender | character | Player gender. |
| is_player | logical | Whether the person is a player. |
| is_verified | logical | Whether the player profile is verified. |
| draft_year | integer | Year the player was drafted. |
| mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Name in first-last order. |
| name_slug | character | URL-friendly name slug. |
| first_last_name | character | First and last name. |
| last_first_name | character | Name in last, first order. |
| last_init_name | character | Last name with first initial. |
| init_last_name | character | First initial with last name. |
| full_fml_name | character | Full name (first-middle-last). |
| full_lfm_name | character | Full name (last-first-middle). |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| pronunciation | character | Phonetic name pronunciation. |
| last_played_date | character | Date of last MLB game played. |
| name_title | character | Name title. |
| name_suffix | character | Name suffix (e.g. Jr., III). |
| name_matrilineal | character | Maternal family name. |
| bat_side_code | character | Batting side code (L/R/S). |
| bat_side_description | character | Batting side description. |
| pitch_hand_code | character | Throwing hand code (L/R). |
| pitch_hand_description | character | Throwing hand description. |
| league_id | numeric | MLB league ID. |
| season | numeric | Season (YYYY). |
try(mlb_all_star_write_ins(league_id = 103, season = 2021))try(mlb_all_star_write_ins(league_id = 103, season = 2021))
MLB Attendance
mlb_attendance( team_id = NULL, league_id = NULL, season = NULL, date = NULL, league_list_id = NULL )mlb_attendance( team_id = NULL, league_id = NULL, season = NULL, date = NULL, league_list_id = NULL )
team_id |
Return attendance information for a particular team_id(s). |
league_id |
Return attendance information for a particular league_id(s). Format: '103,104' |
season |
Return attendance information for particular year(s). |
date |
Return attendance information on a particular date. Format: MM/DD/YYYY |
league_list_id |
Unique league list identifier to return a directory of attendance for a specific league list_id Valid values include:
|
Returns a tibble with the following columns
| col_name | types | description |
| openings_total | integer | Total number of openings (games eligible to open). |
| openings_total_away | integer | Total away openings. |
| openings_total_home | integer | Total home openings. |
| openings_total_lost | integer | Openings lost (e.g. to rainouts). |
| games_total | integer | Total games played. |
| games_away_total | integer | Total away games. |
| games_home_total | integer | Total home games. |
| year | character | Season year (YYYY). |
| attendance_average_away | integer | Average away-game attendance. |
| attendance_average_home | integer | Average home-game attendance. |
| attendance_average_ytd | integer | Year-to-date average attendance. |
| attendance_high | integer | Highest single-game attendance. |
| attendance_high_date | character | Date of the highest-attendance game. |
| attendance_low | integer | Lowest single-game attendance. |
| attendance_low_date | character | Date of the lowest-attendance game. |
| attendance_opening_average | integer | Average opening-day attendance. |
| attendance_total | integer | Total attendance for the period. |
| attendance_total_away | integer | Total away attendance. |
| attendance_total_home | integer | Total home attendance. |
| attendance_high_game_game_pk | integer | game_pk of the highest-attendance game. |
| attendance_high_game_link | character | API link to the highest-attendance game. |
| attendance_high_game_day_night | character | Day/night status of the highest-attendance game. |
| attendance_high_game_content_link | character | API content link for the highest-attendance game. |
| attendance_low_game_game_pk | integer | game_pk of the lowest-attendance game. |
| attendance_low_game_link | character | API link to the lowest-attendance game. |
| attendance_low_game_day_night | character | Day/night status of the lowest-attendance game. |
| attendance_low_game_content_link | character | API content link for the lowest-attendance game. |
| game_type_id | character | Game type code (e.g. R for regular season). |
| game_type_description | character | Game type description. |
| team_id | integer | MLB team ID. |
| team_name | character | Team name. |
| team_link | character | MLB Stats API relative team link. |
try(mlb_attendance(team_id = 109, season = 2021))try(mlb_attendance(team_id = 109, season = 2021))
mlb_all_star_ballots(): Find MLB All-Star Ballots.
mlb_all_star_final_vote(): Find MLB All-Star Final Vote.
mlb_all_star_write_ins(): Find MLB All-Star Write-ins.
mlb_awards(): Find MLB Awards.
mlb_awards_recipient(): Find MLB Award Recipients.
mlb_homerun_derby(): Retrieve MLB Home Run Derby Data.
mlb_homerun_derby_bracket(): Retrieve MLB Home Run Derby Bracket.
mlb_homerun_derby_players(): Retrieve MLB Home Run Derby Players.
try(mlb_all_star_ballots(league_id = 103, season = 2021))
try(mlb_all_star_final_vote(league_id = 103, season = 2021))
try(mlb_all_star_write_ins(league_id = 103, season = 2021))
try(mlb_awards())
try(mlb_awards_recipient(award_id = 'MLBHOF', season = 2020))
try(mlb_homerun_derby(game_pk = 511101))
try(mlb_homerun_derby_bracket(game_pk = 511101))
try(mlb_homerun_derby_players(game_pk = 511101))
MLB Awards
mlb_awards()mlb_awards()
Returns a tibble with the following columns
| col_name | types | description |
| award_id | character | Award identifier code. |
| award_name | character | Award name. |
| award_description | character | Award description. |
| sort_order | integer | Display sort order for the award. |
| active | logical | Whether the award is currently active. |
| notes | character | Additional notes about the award. |
| sport_id | integer | MLB sport ID associated with the award. |
| sport_link | character | MLB Stats API relative sport link. |
| league_id | integer | MLB league ID associated with the award. |
| league_link | character | MLB Stats API relative league link. |
try(mlb_awards())try(mlb_awards())
MLB Award Recipients
mlb_awards_recipient( award_id = NULL, sport_id = NULL, league_id = NULL, season = NULL )mlb_awards_recipient( award_id = NULL, sport_id = NULL, league_id = NULL, season = NULL )
award_id |
award_id to return a directory of players for a given award. |
sport_id |
sport_id to return a directory of players for a given aware in a specific sport. |
league_id |
league_id(s) to return a directory of players for a given award in a specific league. Format '103,104' |
season |
Year(s) to return a directory of players for a given award in a given season. |
Returns a tibble with the following columns
| col_name | types | description |
| award_id | character | Award identifier code. |
| award_name | character | Award name. |
| date | character | Date the award was given (YYYY-MM-DD). |
| season | character | Season the award was given (YYYY). |
| votes | integer | Number of votes received. |
| notes | character | Additional notes about the recipient. |
| player_id | integer | MLB player ID of the recipient. |
| player_link | character | MLB Stats API relative player link. |
| player_name_first_last | character | Recipient name in first-last order. |
| player_primary_position_code | character | Recipient primary fielding position code. |
| player_primary_position_name | character | Recipient primary fielding position name. |
| player_primary_position_type | character | Recipient primary position type. |
| player_primary_position_abbreviation | character | Recipient primary position abbreviation. |
| team_id | integer | MLB team ID of the recipient. |
| team_link | character | MLB Stats API relative team link. |
try(mlb_awards_recipient(award_id = 'MLBHOF', season = 2020))try(mlb_awards_recipient(award_id = 'MLBHOF', season = 2020))
MLB Baseball Stats
mlb_baseball_stats()mlb_baseball_stats()
Returns a tibble with the following columns:
| col_name | types | description |
| stat_name | character | Internal stat name. |
| stat_lookup_param | character | Lookup parameter/abbreviation for the stat. |
| is_counting | logical | Whether the stat is a counting stat. |
| stat_label | character | Human-readable stat label. |
| stat_group | character | Stat group (e.g. hitting, pitching, fielding). |
try(mlb_baseball_stats())try(mlb_baseball_stats())
Retrieve batting orders for a given MLB game
mlb_batting_orders(game_pk, type = "starting")mlb_batting_orders(game_pk, type = "starting")
game_pk |
The unique game_pk identifier for the game |
type |
Whether to just return the starting lineup ('starting') or all batters that appeared ('all') |
Returns a tibble that includes probable starting pitchers and
the home plate umpire for the game_pk requested
| col_name | types | description |
| id | integer | MLB player ID. |
| fullName | character | Player full name. |
| abbreviation | character | Fielding position abbreviation. |
| batting_order | character | Spot in the batting order (1-9). |
| batting_position_num | character | Sub-position within the lineup spot (0 = starter). |
| team | character | Side of the matchup ('home' or 'away'). |
| teamName | character | Team name. |
| teamID | integer | MLB team ID. |
try(mlb_batting_orders(game_pk=566001))try(mlb_batting_orders(game_pk=566001))
View all PCL conferences
mlb_conferences(conference_id = NULL, season = NULL)mlb_conferences(conference_id = NULL, season = NULL)
conference_id |
Conference ID to return information for. |
season |
Year to return to return conference information for. |
Returns a tibble with the following columns
| col_name | types | description |
| conference_id | integer | MLB conference ID. |
| conference_name | character | Conference name. |
| link | character | MLB Stats API relative conference link. |
| conference_abbreviation | character | Conference abbreviation. |
| has_wildcard | logical | Whether the conference has a wild card. |
| conference_name_short | character | Short conference name. |
| league_id | integer | MLB league ID. |
| league_link | character | MLB Stats API relative league link. |
| sport_id | integer | MLB sport ID. |
| sport_link | character | MLB Stats API relative sport link. |
try(mlb_conferences()) try(mlb_conferences(conference_id = 301, season = 2020))try(mlb_conferences()) try(mlb_conferences(conference_id = 301, season = 2020))
MLB Divisions
mlb_divisions(division_id = NULL, league_id = NULL, sport_id = NULL)mlb_divisions(division_id = NULL, league_id = NULL, sport_id = NULL)
division_id |
Return division(s) data for a specific division |
league_id |
Return division(s) data for all divisions in a specific league |
sport_id |
Return division(s) for all divisions in a specific sport. |
Returns a tibble with the following columns
| col_name | types | description |
| division_id | integer | MLB division ID. |
| division_name | character | Division name. |
| season | character | Season (YYYY). |
| division_name_short | character | Short division name. |
| division_link | character | MLB Stats API relative division link. |
| division_abbreviation | character | Division abbreviation. |
| has_wildcard | logical | Whether the division has a wild card. |
| sort_order | integer | Display sort order for the division. |
| num_playoff_teams | integer | Number of playoff teams from the division. |
| active | logical | Whether the division is currently active. |
| league_id | integer | MLB league ID. |
| league_link | character | MLB Stats API relative league link. |
| sport_id | integer | MLB sport ID. |
| sport_link | character | MLB Stats API relative sport link. |
try(mlb_divisions(sport_id = 1))try(mlb_divisions(sport_id = 1))
Retrieve draft pick information by year
mlb_draft(year)mlb_draft(year)
year |
The year for which to return data |
Returns a tibble with information for every draft pick in every round for the year requested
| col_name | types | description |
| bis_player_id | integer | BIS (Baseball Info Solutions) player ID. |
| pick_round | character | Draft round. |
| pick_number | integer | Overall pick number. |
| display_pick_number | integer | Pick number as displayed. |
| round_pick_number | integer | Pick number within the round. |
| rank | integer | Prospect rank. |
| pick_value | character | Assigned slot/pick value (dollars). |
| signing_bonus | character | Signing bonus (dollars). |
| scouting_report | character | Link to the scouting report. |
| blurb | character | Prospect scouting blurb. |
| headshot_link | character | URL to the player's headshot image. |
| is_drafted | logical | Whether the prospect was drafted. |
| is_pass | logical | Whether the pick was a pass. |
| year | character | Draft year (YYYY). |
| home_city | character | Prospect home city. |
| home_state | character | Prospect home state. |
| home_country | character | Prospect home country. |
| school_name | character | School name. |
| school_school_class | character | School class (e.g. 4YR JR, HS SR). |
| school_country | character | School country. |
| school_state | character | School state. |
| person_id | integer | MLB player ID. |
| person_full_name | character | Player full name. |
| person_link | character | MLB Stats API relative player link. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| person_primary_number | character | Player uniform number. |
| person_birth_date | character | Birth date (YYYY-MM-DD). |
| person_current_age | integer | Current age in years. |
| person_birth_city | character | City of birth. |
| person_birth_state_province | character | State or province of birth. |
| person_birth_country | character | Country of birth. |
| person_height | character | Height (feet and inches). |
| person_weight | integer | Weight in pounds. |
| person_active | logical | Whether the player is currently active. |
| person_use_name | character | Preferred first name. |
| person_use_last_name | character | Preferred last name. |
| person_middle_name | character | Player middle name. |
| person_boxscore_name | character | Name as shown in box scores. |
| person_gender | character | Player gender. |
| person_is_player | logical | Whether the person is a player. |
| person_is_verified | logical | Whether the player profile is verified. |
| person_draft_year | integer | Year the player was drafted. |
| person_mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| person_name_first_last | character | Name in first-last order. |
| person_name_slug | character | URL-friendly name slug. |
| person_first_last_name | character | First and last name. |
| person_last_first_name | character | Name in last, first order. |
| person_last_init_name | character | Last name with first initial. |
| person_init_last_name | character | First initial with last name. |
| person_full_fml_name | character | Full name (first-middle-last). |
| person_full_lfm_name | character | Full name (last-first-middle). |
| person_strike_zone_top | numeric | Top of the player's strike zone (feet). |
| person_strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| person_pronunciation | character | Phonetic name pronunciation. |
| person_name_title | character | Name title. |
| person_name_suffix | character | Name suffix (e.g. Jr., III). |
| person_nick_name | character | Player nickname. |
| person_name_matrilineal | character | Maternal family name. |
| person_primary_position_code | character | Primary fielding position code. |
| person_primary_position_name | character | Primary fielding position name. |
| person_primary_position_type | character | Primary position type (e.g. Infielder). |
| person_primary_position_abbreviation | character | Primary position abbreviation. |
| person_bat_side_code | character | Batting side code (L/R/S). |
| person_bat_side_description | character | Batting side description. |
| person_pitch_hand_code | character | Throwing hand code (L/R). |
| person_pitch_hand_description | character | Throwing hand description. |
| team_all_star_status | character | Team all-star status flag. |
| team_id | integer | MLB team ID of the drafting team. |
| team_name | character | Drafting team name. |
| team_link | character | MLB Stats API relative team link. |
| team_spring_league_id | integer | Spring training league ID. |
| team_spring_league_name | character | Spring training league name. |
| team_spring_league_link | character | MLB Stats API relative spring league link. |
| team_spring_league_abbreviation | character | Spring training league abbreviation. |
| draft_type_code | character | Draft type code. |
| draft_type_description | character | Draft type description. |
try(mlb_draft(year = 2020))try(mlb_draft(year = 2020))
mlb_draft(): Retrieve draft pick information by year.
mlb_draft_latest(): Retrieve latest draft information by year.
mlb_draft_prospects(): Retrieve draft prospect information by year.
These functions retrieve MLB Draft pick, latest pick, and prospect information from the MLB Stats API.
Retrieve latest draft information by year
mlb_draft_latest(year)mlb_draft_latest(year)
year |
The year for which to return data |
Returns a tibble with the latest draft information for the year requested:
| col_name | types | description |
| pick_round | character | Draft round. |
| pick_number | integer | Overall pick number. |
| display_pick_number | integer | Pick number as displayed. |
| round_pick_number | integer | Pick number within the round. |
| pick_value | character | Assigned slot/pick value (dollars). |
| signing_bonus | character | Signing bonus (dollars). |
| home_city | character | Prospect home city. |
| home_state | character | Prospect home state. |
| home_country | character | Prospect home country. |
| school_name | character | School name. |
| school_school_class | character | School class (e.g. 4YR JR, HS SR). |
| school_country | character | School country. |
| school_state | character | School state. |
| headshot_link | character | URL to the player's headshot image. |
| person_id | integer | MLB player ID. |
| person_full_name | character | Player full name. |
| person_link | character | MLB Stats API relative player link. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| person_primary_number | character | Player uniform number. |
| person_birth_date | character | Birth date (YYYY-MM-DD). |
| person_current_age | integer | Current age in years. |
| person_birth_city | character | City of birth. |
| person_birth_state_province | character | State or province of birth. |
| person_birth_country | character | Country of birth. |
| person_height | character | Height (feet and inches). |
| person_weight | integer | Weight in pounds. |
| person_active | logical | Whether the player is currently active. |
| person_primary_position_code | character | Primary fielding position code. |
| person_primary_position_name | character | Primary fielding position name. |
| person_primary_position_type | character | Primary position type (e.g. Infielder). |
| person_primary_position_abbreviation | character | Primary position abbreviation. |
| person_use_name | character | Preferred first name. |
| person_use_last_name | character | Preferred last name. |
| person_middle_name | character | Player middle name. |
| person_boxscore_name | character | Name as shown in box scores. |
| person_gender | character | Player gender. |
| person_is_player | logical | Whether the person is a player. |
| person_is_verified | logical | Whether the player profile is verified. |
| person_draft_year | integer | Year the player was drafted. |
| person_mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| person_bat_side_code | character | Batting side code (L/R/S). |
| person_bat_side_description | character | Batting side description. |
| person_pitch_hand_code | character | Throwing hand code (L/R). |
| person_pitch_hand_description | character | Throwing hand description. |
| person_name_first_last | character | Name in first-last order. |
| person_name_slug | character | URL-friendly name slug. |
| person_first_last_name | character | First and last name. |
| person_last_first_name | character | Name in last, first order. |
| person_last_init_name | character | Last name with first initial. |
| person_init_last_name | character | First initial with last name. |
| person_full_fml_name | character | Full name (first-middle-last). |
| person_full_lfm_name | character | Full name (last-first-middle). |
| person_strike_zone_top | numeric | Top of the player's strike zone (feet). |
| person_strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| person_xref_ids_xref_id | character | Cross-reference ID from an external source. |
| person_xref_ids_xref_type | character | Cross-reference source type (e.g. fangraphs). |
| person_xref_ids_season | character | Season associated with the cross-reference ID. |
| team_spring_league_id | integer | Spring training league ID. |
| team_spring_league_name | character | Spring training league name. |
| team_spring_league_link | character | MLB Stats API relative spring league link. |
| team_spring_league_abbreviation | character | Spring training league abbreviation. |
| team_all_star_status | character | Team all-star status flag. |
| team_id | integer | MLB team ID of the drafting team. |
| team_name | character | Drafting team name. |
| team_link | character | MLB Stats API relative team link. |
| team_season | integer | Team season (YYYY). |
| team_venue_id | integer | Home venue ID. |
| team_venue_name | character | Home venue name. |
| team_venue_link | character | MLB Stats API relative venue link. |
| team_spring_venue_id | integer | Spring training venue ID. |
| team_spring_venue_link | character | MLB Stats API relative spring venue link. |
| team_team_code | character | Team code. |
| team_file_code | character | Team file code. |
| team_abbreviation | character | Team abbreviation. |
| team_team_name | character | Team nickname. |
| team_location_name | character | Team location/city name. |
| team_first_year_of_play | character | First year the franchise played. |
| team_league_id | integer | MLB league ID. |
| team_league_name | character | League name. |
| team_league_link | character | MLB Stats API relative league link. |
| team_division_id | integer | Division ID. |
| team_division_name | character | Division name. |
| team_division_link | character | MLB Stats API relative division link. |
| team_sport_id | integer | MLB sport ID. |
| team_sport_link | character | MLB Stats API relative sport link. |
| team_sport_name | character | Sport name. |
| team_short_name | character | Team short name. |
| team_franchise_name | character | Franchise name. |
| team_club_name | character | Club name. |
| team_active | logical | Whether the team is currently active. |
| draft_type_code | character | Draft type code. |
| draft_type_description | character | Draft type description. |
| is_drafted | logical | Whether the prospect was drafted. |
| is_pass | logical | Whether the pick was a pass. |
| year | character | Draft year (YYYY). |
try(mlb_draft_latest(year = 2020))try(mlb_draft_latest(year = 2020))
Retrieve draft prospect information by year
mlb_draft_prospects(year)mlb_draft_prospects(year)
year |
The year for which to return data |
Returns a tibble with information for every draft prospect for the year requested:
| col_name | types | description |
| bis_player_id | integer | BIS (Baseball Info Solutions) player ID. |
| headshot_link | character | URL to the player's headshot image. |
| is_drafted | logical | Whether the prospect was drafted. |
| is_pass | logical | Whether the pick was a pass. |
| year | character | Draft year (YYYY). |
| pick_round | character | Draft round. |
| pick_number | integer | Overall pick number. |
| rank | integer | Prospect rank. |
| scouting_report | character | Link to the scouting report. |
| blurb | character | Prospect scouting blurb. |
| home_city | character | Prospect home city. |
| home_state | character | Prospect home state. |
| home_country | character | Prospect home country. |
| school_name | character | School name. |
| school_school_class | character | School class (e.g. 4YR JR, HS SR). |
| school_country | character | School country. |
| school_state | character | School state. |
| person_id | integer | MLB player ID. |
| person_full_name | character | Player full name. |
| person_link | character | MLB Stats API relative player link. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| person_birth_date | character | Birth date (YYYY-MM-DD). |
| person_current_age | integer | Current age in years. |
| person_birth_city | character | City of birth. |
| person_birth_state_province | character | State or province of birth. |
| person_birth_country | character | Country of birth. |
| person_height | character | Height (feet and inches). |
| person_weight | integer | Weight in pounds. |
| person_active | logical | Whether the player is currently active. |
| person_use_name | character | Preferred first name. |
| person_use_last_name | character | Preferred last name. |
| person_middle_name | character | Player middle name. |
| person_boxscore_name | character | Name as shown in box scores. |
| person_gender | character | Player gender. |
| person_is_player | logical | Whether the person is a player. |
| person_is_verified | logical | Whether the player profile is verified. |
| person_draft_year | integer | Year the player was drafted. |
| person_name_first_last | character | Name in first-last order. |
| person_name_slug | character | URL-friendly name slug. |
| person_first_last_name | character | First and last name. |
| person_last_first_name | character | Name in last, first order. |
| person_last_init_name | character | Last name with first initial. |
| person_init_last_name | character | First initial with last name. |
| person_full_fml_name | character | Full name (first-middle-last). |
| person_full_lfm_name | character | Full name (last-first-middle). |
| person_strike_zone_top | numeric | Top of the player's strike zone (feet). |
| person_strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| person_primary_number | character | Player uniform number. |
| person_mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| person_pronunciation | character | Phonetic name pronunciation. |
| person_name_matrilineal | character | Maternal family name. |
| person_name_title | character | Name title. |
| person_name_suffix | character | Name suffix (e.g. Jr., III). |
| person_nick_name | character | Player nickname. |
| person_death_date | character | Date of death (YYYY-MM-DD), if applicable. |
| person_death_city | character | City of death, if applicable. |
| person_death_state_province | character | State or province of death, if applicable. |
| person_death_country | character | Country of death, if applicable. |
| person_primary_position_code | character | Primary fielding position code. |
| person_primary_position_name | character | Primary fielding position name. |
| person_primary_position_type | character | Primary position type (e.g. Infielder). |
| person_primary_position_abbreviation | character | Primary position abbreviation. |
| person_bat_side_code | character | Batting side code (L/R/S). |
| person_bat_side_description | character | Batting side description. |
| person_pitch_hand_code | character | Throwing hand code (L/R). |
| person_pitch_hand_description | character | Throwing hand description. |
| draft_type_code | character | Draft type code. |
| draft_type_description | character | Draft type description. |
| team_all_star_status | character | Team all-star status flag. |
| team_id | integer | MLB team ID associated with the prospect. |
| team_name | character | Team name. |
| team_link | character | MLB Stats API relative team link. |
| team_season | integer | Team season (YYYY). |
| team_team_code | character | Team code. |
| team_file_code | character | Team file code. |
| team_abbreviation | character | Team abbreviation. |
| team_team_name | character | Team nickname. |
| team_location_name | character | Team location/city name. |
| team_first_year_of_play | character | First year the franchise played. |
| team_short_name | character | Team short name. |
| team_franchise_name | character | Franchise name. |
| team_club_name | character | Club name. |
| team_active | logical | Whether the team is currently active. |
| team_spring_league_id | integer | Spring training league ID. |
| team_spring_league_name | character | Spring training league name. |
| team_spring_league_link | character | MLB Stats API relative spring league link. |
| team_spring_league_abbreviation | character | Spring training league abbreviation. |
| team_venue_id | integer | Home venue ID. |
| team_venue_name | character | Home venue name. |
| team_venue_link | character | MLB Stats API relative venue link. |
| team_spring_venue_id | integer | Spring training venue ID. |
| team_spring_venue_link | character | MLB Stats API relative spring venue link. |
| team_league_id | integer | MLB league ID. |
| team_league_name | character | League name. |
| team_league_link | character | MLB Stats API relative league link. |
| team_division_id | integer | Division ID. |
| team_division_name | character | Division name. |
| team_division_link | character | MLB Stats API relative division link. |
| team_sport_id | integer | MLB sport ID. |
| team_sport_link | character | MLB Stats API relative sport link. |
| team_sport_name | character | Sport name. |
try(mlb_draft_prospects(year = 2020))try(mlb_draft_prospects(year = 2020))
MLB Event Types
mlb_event_types()mlb_event_types()
Returns a tibble with the following columns
| col_name | types | description |
| plate_appearance | logical | Whether the event counts as a plate appearance. |
| hit | logical | Whether the event is a hit. |
| event_code | character | Event type code. |
| base_running_event | logical | Whether the event is a base-running event. |
| event_description | character | Human-readable event description. |
try(mlb_event_types())try(mlb_event_types())
MLB Fielder Detail Types
mlb_fielder_detail_types()mlb_fielder_detail_types()
Returns a tibble with the following columns
| col_name | types | description |
| stat_name | character | Internal fielder detail stat name. |
| code | character | Fielder detail type code. |
| names | list | Associated detail names for the type. |
| chance | logical | Whether the detail counts as a fielding chance. |
| error | logical | Whether the detail counts as an error. |
try(mlb_fielder_detail_types())try(mlb_fielder_detail_types())
Acquire time codes for Major and Minor League games
mlb_game_changes(updated_since, sport_id)mlb_game_changes(updated_since, sport_id)
updated_since |
Updated since date time |
sport_id |
Return division(s) for all divisions in a specific sport. |
Returns a tibble that includes time codes from the game_pk requested
| col_name | types | description |
| date | character | Schedule date (YYYY-MM-DD). |
| total_items | integer | Total items for the date. |
| total_events | integer | Total events for the date. |
| total_games | integer | Total games for the date. |
| total_games_in_progress | integer | Games currently in progress for the date. |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier. |
| link | character | MLB Stats API relative game link. |
| game_type | character | Game type code (R, P, D, etc.). |
| season | character | Season (YYYY). |
| game_date | character | Game date-time (ISO 8601, UTC). |
| official_date | character | Official game date (YYYY-MM-DD). |
| is_tie | logical | Whether the game ended in a tie. |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator (N/Y/S). |
| gameday_type | character | Gameday data type code. |
| tiebreaker | character | Tiebreaker indicator. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display season (YYYY). |
| day_night | character | Day/night designation. |
| description | character | Game description. |
| scheduled_innings | integer | Number of scheduled innings. |
| reverse_home_away_status | logical | Whether home/away designation is reversed. |
| inning_break_length | integer | Length of the inning break (seconds). |
| games_in_series | integer | Total games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Series description. |
| record_source | character | Source of the record data. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | If-necessary description. |
| status_abstract_game_state | character | Abstract game state (e.g. Final). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state. |
| status_status_code | character | Game status code. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_abstract_game_code | character | Abstract game code. |
| teams_away_score | integer | Away team score. |
| teams_away_is_winner | logical | Whether the away team won. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team series number. |
| teams_away_team_id | integer | Away team MLB ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | MLB Stats API relative away team link. |
| teams_away_league_record_wins | integer | Away team league-record wins. |
| teams_away_league_record_losses | integer | Away team league-record losses. |
| teams_away_league_record_ties | integer | Away team league-record ties. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_home_score | integer | Home team score. |
| teams_home_is_winner | logical | Whether the home team won. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team series number. |
| teams_home_team_id | integer | Home team MLB ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | MLB Stats API relative home team link. |
| teams_home_league_record_wins | integer | Home team league-record wins. |
| teams_home_league_record_losses | integer | Home team league-record losses. |
| teams_home_league_record_ties | integer | Home team league-record ties. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| venue_id | integer | Venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | MLB Stats API relative venue link. |
| content_link | character | MLB Stats API relative game content link. |
| status_reason | character | Reason for the game status, if any. |
| rescheduled_from | character | Original scheduled date-time if rescheduled. |
| rescheduled_from_date | character | Original scheduled date if rescheduled. |
| resumed_from | character | Original date-time if the game was resumed. |
| resumed_from_date | character | Original date if the game was resumed. |
| events | list | Nested list of change events for the game. |
try(mlb_game_changes(updated_since = "2021-08-10T19:08:24.000004Z", sport_id = 1))try(mlb_game_changes(updated_since = "2021-08-10T19:08:24.000004Z", sport_id = 1))
Retrieve additional game content for major and minor league games
mlb_game_content(game_pk)mlb_game_content(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tibble of game content data with the following columns:
| col_name | types | description |
| title | character | Media/EPG title (e.g. MLBTV). |
| call_letters | character | Broadcaster call letters. |
| espn_auth_required | logical | Whether ESPN authentication is required. |
| tbs_auth_required | logical | Whether TBS authentication is required. |
| espn2auth_required | logical | Whether ESPN2 authentication is required. |
| game_date | character | Game date associated with the content. |
| content_id | character | Content identifier. |
| fs1auth_required | logical | Whether FS1 authentication is required. |
| media_id | character | Media identifier. |
| media_feed_type | character | Media feed type (HOME/AWAY/NATIONAL). |
| mlbn_auth_required | logical | Whether MLB Network authentication is required. |
| fox_auth_required | logical | Whether FOX authentication is required. |
| media_feed_sub_type | character | Media feed sub-type code. |
| free_game | logical | Whether the broadcast is a free game. |
| epg_id | integer | Electronic programming guide identifier. |
| media_state | character | Media state (e.g. MEDIA_ARCHIVE). |
| abc_auth_required | logical | Whether ABC authentication is required. |
| rendition_name | character | Media rendition name. |
| description | character | Content description. |
| language | character | Broadcast language. |
| type | character | Content/media type. |
try(mlb_game_content(game_pk = 566001))try(mlb_game_content(game_pk = 566001))
Acquire game context metrics for Major and Minor League games
mlb_game_context_metrics(game_pk, timecode)mlb_game_context_metrics(game_pk, timecode)
game_pk |
The game_pk for the game requested |
timecode |
The time code for the MLB game (format: MMDDYYYY_HHMMSS) |
Returns a tibble that includes time codes from the game_pk requested
| col_name | types | description |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier. |
| link | character | MLB Stats API relative game link. |
| game_type | character | Game type code (R, P, etc.). |
| season | character | Season (YYYY). |
| game_date | character | Game date-time (ISO 8601, UTC). |
| official_date | character | Official game date (YYYY-MM-DD). |
| status_abstract_game_state | character | Abstract game state (e.g. Final). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state. |
| status_status_code | character | Game status code. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_abstract_game_code | character | Abstract game code. |
| teams_away_team_id | integer | Away team MLB ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | MLB Stats API relative away team link. |
| teams_away_league_record_wins | integer | Away team league-record wins. |
| teams_away_league_record_losses | integer | Away team league-record losses. |
| teams_away_league_record_ties | integer | Away team league-record ties. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_away_score | integer | Away team score. |
| teams_away_is_winner | logical | Whether the away team won. |
| teams_away_probable_pitcher_id | integer | Away probable pitcher MLB ID. |
| teams_away_probable_pitcher_full_name | character | Away probable pitcher name. |
| teams_away_probable_pitcher_link | character | MLB Stats API relative away pitcher link. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team series number. |
| teams_home_team_id | integer | Home team MLB ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | MLB Stats API relative home team link. |
| teams_home_league_record_wins | integer | Home team league-record wins. |
| teams_home_league_record_losses | integer | Home team league-record losses. |
| teams_home_league_record_ties | integer | Home team league-record ties. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| teams_home_score | integer | Home team score. |
| teams_home_is_winner | logical | Whether the home team won. |
| teams_home_probable_pitcher_id | integer | Home probable pitcher MLB ID. |
| teams_home_probable_pitcher_full_name | character | Home probable pitcher name. |
| teams_home_probable_pitcher_link | character | MLB Stats API relative home pitcher link. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team series number. |
| venue_id | integer | Venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | MLB Stats API relative venue link. |
| link_1 | character | MLB Stats API relative game content link. |
| is_tie | logical | Whether the game ended in a tie. |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator (N/Y/S). |
| gameday_type | character | Gameday data type code. |
| tiebreaker | character | Tiebreaker indicator. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display season (YYYY). |
| day_night | character | Day/night designation. |
| scheduled_innings | integer | Number of scheduled innings. |
| reverse_home_away_status | logical | Whether home/away designation is reversed. |
| inning_break_length | integer | Length of the inning break (seconds). |
| games_in_series | integer | Total games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Series description. |
| record_source | character | Source of the record data. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | If-necessary description. |
| game_id | character | Human-readable game ID slug. |
| home_win_probability | numeric | Home team win probability (percent). |
| away_win_probability | numeric | Away team win probability (percent). |
try(mlb_game_context_metrics(game_pk = 531060, timecode = "20180803_182458"))try(mlb_game_context_metrics(game_pk = 531060, timecode = "20180803_182458"))
mlb_game_info(): Retrieve additional game information for major and minor league games.
mlb_game_pks(): Get MLB Game Info by Date and Level.
mlb_game_content(): Retrieve additional game content for major and minor league games.
mlb_game_linescore(): Retrieve game linescores for major and minor league games.
mlb_game_wp(): Acquire win probability for Major and Minor League games.
mlb_game_pace(): Retrieve game pace metrics for major and minor league.
mlb_game_changes(): Acquire time codes for Major and Minor League games.
mlb_game_context_metrics(): Acquire game context metrics for Major and Minor League games.
mlb_pbp(): Acquire pitch-by-pitch data for Major and Minor League games.
mlb_pbp_diff(): Acquire pitch-by-pitch data between two timecodes for Major and Minor League games.
These functions retrieve MLB game information, content, linescores, win probability, pace, changes, context metrics, and pitch-by-pitch data from the MLB Stats API.
Retrieve additional game information for major and minor league games
mlb_game_info(game_pk)mlb_game_info(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tibble that includes supplemental information, such as weather, official scorer, attendance, etc., for the game_pk provided
| col_name | types | description |
| game_date | character | Game date (YYYY-MM-DD). |
| game_pk | numeric | Unique game identifier. |
| venue_name | character | Stadium name. |
| venue_id | integer | Venue ID. |
| temperature | character | Game-time temperature (degrees F). |
| other_weather | character | Weather condition description. |
| wind | character | Wind speed and direction. |
| attendance | character | Reported game attendance. |
| start_time | character | First-pitch local start time. |
| elapsed_time | character | Total elapsed game time (H:MM). |
| game_id | character | Human-readable game ID slug. |
| game_type | character | Game type code (R, P, etc.). |
| home_sport_code | character | Home sport code (always 'mlb'). |
| official_scorer | character | Official scorer name. |
| date | character | Long-form game date label. |
| status_ind | character | Game status code. |
| home_league_id | integer | Home team league ID. |
| gameday_sw | character | Gameday data type code. |
try(mlb_game_info(game_pk = 566001))try(mlb_game_info(game_pk = 566001))
Retrieve game linescores for major and minor league games
mlb_game_linescore(game_pk)mlb_game_linescore(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tibble with the following columns
| col_name | types | description |
| game_pk | numeric | Unique game identifier. |
| home_team_id | character | Home team MLB ID. |
| home_team_name | character | Home team name. |
| away_team_id | character | Away team MLB ID. |
| away_team_name | character | Away team name. |
| num | integer | Inning number. |
| ordinal_num | character | Inning ordinal label (e.g. 1st). |
| home_runs | integer | Home runs scored in the inning. |
| home_hits | integer | Home hits in the inning. |
| home_errors | integer | Home errors in the inning. |
| home_left_on_base | integer | Home runners left on base in the inning. |
| away_runs | integer | Away runs scored in the inning. |
| away_hits | integer | Away hits in the inning. |
| away_errors | integer | Away errors in the inning. |
| away_left_on_base | integer | Away runners left on base in the inning. |
| home_team_all_star_status | character | Home team all-star status flag. |
| home_team_link | character | MLB Stats API relative home team link. |
| home_team_season | character | Home team season (YYYY). |
| home_team_venue_id | character | Home team venue ID. |
| home_team_venue_name | character | Home team venue name. |
| home_team_venue_link | character | MLB Stats API relative home venue link. |
| home_team_team_code | character | Home team code. |
| home_team_file_code | character | Home team file code. |
| home_team_abbreviation | character | Home team abbreviation. |
| home_team_team_name | character | Home team nickname. |
| home_team_location_name | character | Home team location/city name. |
| home_team_first_year_of_play | character | Home franchise first year of play. |
| home_team_league_id | character | Home team league ID. |
| home_team_league_name | character | Home team league name. |
| home_team_league_link | character | MLB Stats API relative home league link. |
| home_team_division_id | character | Home team division ID. |
| home_team_division_name | character | Home team division name. |
| home_team_division_link | character | MLB Stats API relative home division link. |
| home_team_sport_id | character | Home team sport ID. |
| home_team_sport_link | character | MLB Stats API relative home sport link. |
| home_team_sport_name | character | Home team sport name. |
| home_team_short_name | character | Home team short name. |
| home_team_record_games_played | character | Home team games played. |
| home_team_record_wild_card_games_back | character | Home team games back in the wild card. |
| home_team_record_league_games_back | character | Home team games back in the league. |
| home_team_record_spring_league_games_back | character | Home team games back in the spring league. |
| home_team_record_sport_games_back | character | Home team games back in the sport. |
| home_team_record_division_games_back | character | Home team games back in the division. |
| home_team_record_conference_games_back | character | Home team games back in the conference. |
| home_team_record_league_record_wins | character | Home team league-record wins. |
| home_team_record_league_record_losses | character | Home team league-record losses. |
| home_team_record_league_record_ties | character | Home team league-record ties. |
| home_team_record_league_record_pct | character | Home team winning percentage. |
| home_team_record_division_leader | character | Whether the home team leads its division. |
| home_team_record_wins | character | Home team wins. |
| home_team_record_losses | character | Home team losses. |
| home_team_record_winning_percentage | character | Home team winning percentage. |
| home_team_franchise_name | character | Home franchise name. |
| home_team_club_name | character | Home club name. |
| home_team_active | character | Whether the home team is active. |
| away_team_all_star_status | character | Away team all-star status flag. |
| away_team_link | character | MLB Stats API relative away team link. |
| away_team_season | character | Away team season (YYYY). |
| away_team_venue_id | character | Away team venue ID. |
| away_team_venue_name | character | Away team venue name. |
| away_team_venue_link | character | MLB Stats API relative away venue link. |
| away_team_team_code | character | Away team code. |
| away_team_file_code | character | Away team file code. |
| away_team_abbreviation | character | Away team abbreviation. |
| away_team_team_name | character | Away team nickname. |
| away_team_location_name | character | Away team location/city name. |
| away_team_first_year_of_play | character | Away franchise first year of play. |
| away_team_league_id | character | Away team league ID. |
| away_team_league_name | character | Away team league name. |
| away_team_league_link | character | MLB Stats API relative away league link. |
| away_team_division_id | character | Away team division ID. |
| away_team_division_name | character | Away team division name. |
| away_team_division_link | character | MLB Stats API relative away division link. |
| away_team_sport_id | character | Away team sport ID. |
| away_team_sport_link | character | MLB Stats API relative away sport link. |
| away_team_sport_name | character | Away team sport name. |
| away_team_short_name | character | Away team short name. |
| away_team_record_games_played | character | Away team games played. |
| away_team_record_wild_card_games_back | character | Away team games back in the wild card. |
| away_team_record_league_games_back | character | Away team games back in the league. |
| away_team_record_spring_league_games_back | character | Away team games back in the spring league. |
| away_team_record_sport_games_back | character | Away team games back in the sport. |
| away_team_record_division_games_back | character | Away team games back in the division. |
| away_team_record_conference_games_back | character | Away team games back in the conference. |
| away_team_record_league_record_wins | character | Away team league-record wins. |
| away_team_record_league_record_losses | character | Away team league-record losses. |
| away_team_record_league_record_ties | character | Away team league-record ties. |
| away_team_record_league_record_pct | character | Away team winning percentage. |
| away_team_record_division_leader | character | Whether the away team leads its division. |
| away_team_record_wins | character | Away team wins. |
| away_team_record_losses | character | Away team losses. |
| away_team_record_winning_percentage | character | Away team winning percentage. |
| away_team_franchise_name | character | Away franchise name. |
| away_team_club_name | character | Away club name. |
| away_team_active | character | Whether the away team is active. |
try(mlb_game_linescore(game_pk = 566001))try(mlb_game_linescore(game_pk = 566001))
Retrieve game pace metrics for major and minor league
mlb_game_pace( season, league_ids = NULL, sport_ids = NULL, team_ids = NULL, game_type = NULL, venue_ids = NULL, org_type = NULL, start_date = NULL, end_date = NULL )mlb_game_pace( season, league_ids = NULL, sport_ids = NULL, team_ids = NULL, game_type = NULL, venue_ids = NULL, org_type = NULL, start_date = NULL, end_date = NULL )
season |
Year for which to return information (Required). |
league_ids |
The league_id(s) for which to return information. |
sport_ids |
The sport_id(s) for which to return information. |
team_ids |
The team_id(s) for which to return information. |
game_type |
The game_type for which to return information. |
venue_ids |
Venue directorial information based venue_id. |
org_type |
pace of game metrics based on team ('T'), league ('L') or sport('S') |
start_date |
Date of first game for which you want data. Format must be in MM/DD/YYYY format. |
end_date |
Date of last game for which you want data. Format must be in MM/DD/YYYY format. |
Returns a tibble with the following columns
| col_name | types | description |
| hits_per9inn | numeric | Hits per 9 innings. |
| runs_per9inn | numeric | Runs per 9 innings. |
| pitches_per9inn | numeric | Pitches per 9 innings. |
| plate_appearances_per9inn | numeric | Plate appearances per 9 innings. |
| hits_per_game | numeric | Hits per game. |
| runs_per_game | numeric | Runs per game. |
| innings_played_per_game | numeric | Innings played per game. |
| pitches_per_game | numeric | Pitches per game. |
| pitchers_per_game | numeric | Pitchers used per game. |
| plate_appearances_per_game | numeric | Plate appearances per game. |
| total_game_time | character | Total game time (HHH:MM:SS). |
| total_innings_played | numeric | Total innings played. |
| total_hits | integer | Total hits. |
| total_runs | integer | Total runs. |
| total_plate_appearances | integer | Total plate appearances. |
| total_pitchers | integer | Total pitchers used. |
| total_pitches | integer | Total pitches thrown. |
| total_games | integer | Total games. |
| total7inn_games | integer | Total 7-inning games. |
| total9inn_games | integer | Total 9-inning games. |
| total_extra_inn_games | integer | Total extra-inning games. |
| time_per_game | character | Average time per game (HH:MM:SS). |
| time_per_pitch | character | Average time per pitch (HH:MM:SS). |
| time_per_hit | character | Average time per hit (HH:MM:SS). |
| time_per_run | character | Average time per run (HH:MM:SS). |
| time_per_plate_appearance | character | Average time per plate appearance (HH:MM:SS). |
| time_per9inn | character | Average time per 9 innings (HH:MM:SS). |
| time_per77plate_appearances | character | Average time per 77 plate appearances. |
| total_extra_inn_time | character | Total extra-inning time (HHH:MM:SS). |
| time_per7inn_game | character | Average time per 7-inning game (HH:MM:SS). |
| time_per7inn_game_without_extra_inn | character | Average time per 7-inning game excl. extras. |
| total7inn_games_scheduled | integer | Total 7-inning games scheduled. |
| total7inn_games_without_extra_inn | integer | Total 7-inning games without extra innings. |
| total9inn_games_without_extra_inn | integer | Total 9-inning games without extra innings. |
| total9inn_games_scheduled | integer | Total 9-inning games scheduled. |
| hits_per_run | numeric | Hits per run. |
| pitches_per_pitcher | numeric | Pitches per pitcher. |
| season | character | Season (YYYY). |
| total9inn_games_completed_early | integer | 9-inning games completed early. |
| total7inn_games_completed_early | integer | 7-inning games completed early. |
| sport_id | integer | MLB sport ID. |
| sport_code | character | Sport code (e.g. mlb, aaa). |
| sport_link | character | MLB Stats API relative sport link. |
| pr_portal_calculated_fields_total7inn_games | integer | Portal-calculated total 7-inning games. |
| pr_portal_calculated_fields_total9inn_games | integer | Portal-calculated total 9-inning games. |
| pr_portal_calculated_fields_total_extra_inn_games | integer | Portal-calculated total extra-inning games. |
| pr_portal_calculated_fields_time_per7inn_game | character | Portal-calculated time per 7-inning game. |
| pr_portal_calculated_fields_time_per9inn_game | character | Portal-calculated time per 9-inning game. |
| pr_portal_calculated_fields_time_per_extra_inn_game | character | Portal-calculated time per extra-inning game. |
try(mlb_game_pace(season = 2021, start_date = "09/14/2021", end_date = "09/16/2021"))try(mlb_game_pace(season = 2021, start_date = "09/14/2021", end_date = "09/16/2021"))
Find game_pk values for professional baseball games (major and minor leagues) via the MLB api https://www.mlb.com/
mlb_game_pks(date, level_ids = c(1))mlb_game_pks(date, level_ids = c(1))
date |
The date for which you want to find game_pk values for MLB games |
level_ids |
A numeric vector with ids for each level where game_pks are desired. See below for a reference of level ids. |
Level IDs:
The following IDs can be passed to the level_ids argument:
1 = MLB 11 = Triple-A 12 = Doubl-A 13 = Class A Advanced 14 = Class A 15 = Class A Short Season 5442 = Rookie Advanced 16 = Rookie 17 = Winter League
Returns a tibble that includes game_pk values and additional information for games scheduled or played with the following columns:
| col_name | types | description |
| game_pk | integer | Unique game identifier. |
| gameGuid | character | Globally unique game identifier. |
| link | character | MLB Stats API relative game link. |
| gameType | character | Game type code (R, P, etc.). |
| season | character | Season (YYYY). |
| gameDate | character | Game date-time (ISO 8601, UTC). |
| officialDate | character | Official game date (YYYY-MM-DD). |
| isTie | logical | Whether the game ended in a tie. |
| gameNumber | integer | Game number within a doubleheader. |
| publicFacing | logical | Whether the game is public-facing. |
| doubleHeader | character | Doubleheader indicator (N/Y/S). |
| gamedayType | character | Gameday data type code. |
| tiebreaker | character | Tiebreaker indicator. |
| calendarEventID | character | Calendar event identifier. |
| seasonDisplay | character | Display season (YYYY). |
| dayNight | character | Day/night designation. |
| scheduledInnings | integer | Number of scheduled innings. |
| reverseHomeAwayStatus | logical | Whether home/away designation is reversed. |
| inningBreakLength | integer | Length of the inning break (seconds). |
| gamesInSeries | integer | Total games in the series. |
| seriesGameNumber | integer | Game number within the series. |
| seriesDescription | character | Series description. |
| recordSource | character | Source of the record data. |
| ifNecessary | character | Whether the game is played only if necessary. |
| ifNecessaryDescription | character | If-necessary description. |
| status.abstractGameState | character | Abstract game state (e.g. Final). |
| status.codedGameState | character | Coded game state. |
| status.detailedState | character | Detailed game state. |
| status.statusCode | character | Game status code. |
| status.startTimeTBD | logical | Whether the start time is TBD. |
| status.abstractGameCode | character | Abstract game code. |
| teams.away.score | integer | Away team score. |
| teams.away.isWinner | logical | Whether the away team won. |
| teams.away.splitSquad | logical | Whether the away team is a split squad. |
| teams.away.seriesNumber | integer | Away team series number. |
| teams.away.team.id | integer | Away team MLB ID. |
| teams.away.team.name | character | Away team name. |
| teams.away.team.link | character | MLB Stats API relative away team link. |
| teams.away.leagueRecord.wins | integer | Away team league-record wins. |
| teams.away.leagueRecord.losses | integer | Away team league-record losses. |
| teams.away.leagueRecord.ties | integer | Away team league-record ties. |
| teams.away.leagueRecord.pct | character | Away team winning percentage. |
| teams.home.score | integer | Home team score. |
| teams.home.isWinner | logical | Whether the home team won. |
| teams.home.splitSquad | logical | Whether the home team is a split squad. |
| teams.home.seriesNumber | integer | Home team series number. |
| teams.home.team.id | integer | Home team MLB ID. |
| teams.home.team.name | character | Home team name. |
| teams.home.team.link | character | MLB Stats API relative home team link. |
| teams.home.leagueRecord.wins | integer | Home team league-record wins. |
| teams.home.leagueRecord.losses | integer | Home team league-record losses. |
| teams.home.leagueRecord.ties | integer | Home team league-record ties. |
| teams.home.leagueRecord.pct | character | Home team winning percentage. |
| venue.id | integer | Venue ID. |
| venue.name | character | Venue name. |
| venue.link | character | MLB Stats API relative venue link. |
| content.link | character | MLB Stats API relative game content link. |
try(mlb_game_pks("2019-04-29"))try(mlb_game_pks("2019-04-29"))
MLB Game Status Codes
mlb_game_status_codes()mlb_game_status_codes()
Returns a tibble with the following columns
| col_name | types | description |
| abstract_game_state | character | Abstract game state grouping (e.g. 'Preview', 'Live', 'Final'). |
| coded_game_state | character | Single-letter coded game state (e.g. 'S', 'P', 'I', 'F'). |
| detailed_state | character | Detailed status description (e.g. 'Scheduled', 'Pre-Game', 'In Progress'). |
| status_code | character | Status code identifier (e.g. 'S', 'P', 'I', 'F'). |
| reason | character | Reason text for the status when applicable (e.g. delay/postponement). |
| abstract_game_code | character | Single-letter abstract game code (e.g. 'P', 'L', 'F'). |
try(mlb_game_status_codes())try(mlb_game_status_codes())
Acquire time codes for Major and Minor League games
mlb_game_timecodes(game_pk)mlb_game_timecodes(game_pk)
game_pk |
The game_pk for the game requested |
Returns a tibble that includes time codes from the game_pk requested
| col_name | types | description |
| timecodes | character | Play snapshot time code in 'YYYYMMDD_HHMMSS' format. |
try(mlb_game_timecodes(game_pk = 632970))try(mlb_game_timecodes(game_pk = 632970))
MLB Game Types
mlb_game_types()mlb_game_types()
Returns a tibble with the following columns
| col_name | types | description |
| game_type_id | character | Single-letter game type code (e.g. 'S', 'R', 'P', 'W'). |
| game_type_description | character | Game type description (e.g. 'Spring Training', 'Regular Season'). |
try(mlb_game_types())try(mlb_game_types())
Acquire win probability for Major and Minor League games
mlb_game_wp(game_pk, timecode = NULL)mlb_game_wp(game_pk, timecode = NULL)
game_pk |
The game_pk for the game requested |
timecode |
The time code for the MLB game (format: MMDDYYYY_HHMMSS) |
Returns a tibble that includes time codes from the game_pk requested
| col_name | types | description |
| home_team_win_probability | numeric | Home team win probability (percent) entering the at-bat. |
| away_team_win_probability | numeric | Away team win probability (percent) entering the at-bat. |
| home_team_win_probability_added | numeric | Change in home team win probability attributed to the at-bat. |
| at_bat_index | integer | Zero-based index of the at-bat within the game. |
| leverage_index | numeric | Leverage index quantifying the importance of the at-bat situation. |
try(mlb_game_wp(game_pk = 531060))try(mlb_game_wp(game_pk = 531060))
Acquire high/low stats for Major and Minor Leagues
mlb_high_low_stats( org_type, season, sort_stat, team_ids = NULL, league_ids = NULL, sport_ids = NULL, game_type = NULL, stat_group = NULL, limit = NULL )mlb_high_low_stats( org_type, season, sort_stat, team_ids = NULL, league_ids = NULL, sport_ids = NULL, game_type = NULL, stat_group = NULL, limit = NULL )
org_type |
The organization type for return information (Required). Valid values include:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
season |
The season for which you want to return information (Required). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sort_stat |
The stat to sort the return (Required). Valid values can be found from 'stat_lookup_param' below
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
team_ids |
The team_id(s) for which to return information. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
league_ids |
The league_id(s) for which to return information. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sport_ids |
The sport_id(s) for which to return information. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
game_type |
The game_type for which to return information. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stat_group |
Stat group for which to return information. Valid values include:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit |
Number of records as the limit of the return. |
Returns a tibble with the following columns
| col_name | types | description |
| total_splits | integer | Total number of split records matching the query. |
| season | integer | Season year for the split. |
| date | character | Date of the game (YYYY-MM-DD). |
| is_home | logical | Whether the subject team was the home team. |
| rank | integer | Rank of the split within the high/low leaderboard. |
| game_innings | integer | Number of innings played in the game. |
| stat_at_bats | integer | Value of the sorted statistic (here at bats) for the split. |
| team_id | integer | MLB team id for the subject team. |
| team_name | character | Subject team name. |
| team_link | character | API relative link to the subject team. |
| opponent_id | integer | MLB team id for the opponent. |
| opponent_name | character | Opponent team name. |
| opponent_link | character | API relative link to the opponent team. |
| game_pk | integer | MLB game primary key. |
| game_link | character | API relative link to the game live feed. |
| game_number | integer | Game number within a day (1 unless a doubleheader). |
| game_day_night | character | Day/night designation of the game ('day' or 'night'). |
| game_content_link | character | API relative link to the game content endpoint. |
| home_team_id | integer | Home team id (populated for game-level org types). |
| home_team_name | character | Home team name (populated for game-level org types). |
| home_team_link | character | API relative link to the home team. |
| away_team_id | integer | Away team id (populated for game-level org types). |
| away_team_name | character | Away team name (populated for game-level org types). |
| away_team_link | character | API relative link to the away team. |
| combined_stats | logical | Whether the stat combines multiple split sources. |
| group_display_name | character | Stat group display name (e.g. 'hitting'). |
| game_type_id | character | Single-letter game type code (e.g. 'R'). |
| game_type_description | character | Game type description (e.g. 'Regular Season'). |
| sort_stat_name | character | Snake-case name of the sorted statistic (e.g. 'at_bats'). |
| sort_stat_lookup_param | character | API lookup parameter for the sorted statistic (e.g. 'atBats'). |
| sort_stat_is_counting | logical | Whether the sorted statistic is a counting stat. |
| sort_stat_label | character | Human-readable label of the sorted statistic (e.g. 'At bats'). |
try(mlb_high_low_stats(org_type = 'Team', season = 2020, sort_stat = 'atBats'))try(mlb_high_low_stats(org_type = 'Team', season = 2020, sort_stat = 'atBats'))
MLB Stat High/Low Types
mlb_high_low_types()mlb_high_low_types()
Returns a tibble with the following columns
| col_name | types | description |
| stat_name | character | Snake-case name of the statistic (e.g. 'at_bats'). |
| stat_lookup_param | character | API lookup parameter for the statistic (e.g. 'atBats'). |
| is_counting | logical | Whether the statistic is a counting stat. |
| stat_label | character | Human-readable label of the statistic (e.g. 'At bats'). |
| stat_groups | list | List-column of stat group display names the stat belongs to. |
| org_types | list | List-column of organization types the stat applies to (e.g. PLAYER). |
| high_low_types | list | List-column of high/low aggregation types (e.g. PLAYER, TEAM, GAME). |
try(mlb_high_low_types())try(mlb_high_low_types())
MLB Hit Trajectories
mlb_hit_trajectories()mlb_hit_trajectories()
Returns a tibble with the following columns
| col_name | types | description |
| hit_trajectory_code | character | Hit trajectory code (e.g. 'bunt_grounder', 'bunt_popup'). |
| hit_trajectory_description | character | Hit trajectory description (e.g. 'Bunt - Ground Ball', 'Bunt - Popup'). |
try(mlb_hit_trajectories())try(mlb_hit_trajectories())
Retrieve Homerun Derby data
mlb_homerun_derby(game_pk)mlb_homerun_derby(game_pk)
game_pk |
The game_pk for which you want to return data |
Returns a tibble with the following columns
| col_name | types | description |
| game_pk | integer | MLB game primary key for the Home Run Derby event. |
| event_name | character | Event name (e.g. 'All-Star Workout Day: Home Run Derby'). |
| event_date | character | Event date-time in ISO 8601 (e.g. '2017-07-11T00:00:00Z'). |
| event_type_code | character | Single-letter event type code (e.g. 'O'). |
| event_type_name | character | Event type name (e.g. 'Other'). |
| venue_id | integer | MLB venue id hosting the event. |
| venue_name | character | Venue name (e.g. 'Marlins Park'). |
| round | integer | Derby round number for the matchup. |
| batter | character | Full name of the batter for this swing record. |
| batter_id | integer | MLB player id of the batter. |
| batter_link | character | API relative link to the batter. |
| top_seed_complete | logical | Whether the top seed's turn in the matchup is complete. |
| top_seed_started | logical | Whether the top seed's turn in the matchup has started. |
| top_seed_winner | logical | Whether the top seed won the matchup. |
| bonus_time | logical | Whether the swing occurred during bonus time. |
| home_run | logical | Whether the swing was scored a home run. |
| tie_breaker | logical | Whether the swing occurred during a tie-breaker. |
| is_home_run | logical | Whether the recorded hit is a home run. |
| time_remaining | character | Time remaining on the clock when the swing occurred. |
| is_bonus_time | logical | Whether the swing counted toward bonus time. |
| is_tie_breaker | logical | Whether the swing counted toward a tie-breaker. |
| hit_data_launch_speed | integer | Exit velocity of the home run swing (mph). |
| hit_data_launch_angle | integer | Launch angle of the batted ball (degrees). |
| hit_data_total_distance | integer | Projected total distance of the batted ball (feet). |
| hit_data_coordinates_coord_x | numeric | Hit location x-coordinate on the field overlay. |
| hit_data_coordinates_coord_y | numeric | Hit location y-coordinate on the field overlay. |
| hit_data_coordinates_landing_pos_x | numeric | Landing position x-coordinate of the batted ball. |
| hit_data_coordinates_landing_pos_y | numeric | Landing position y-coordinate of the batted ball. |
| hit_data_trajectory_data_trajectory_polynomial_x | list | Polynomial coefficients of the x trajectory. |
| hit_data_trajectory_data_trajectory_polynomial_y | list | Polynomial coefficients of the y trajectory. |
| hit_data_trajectory_data_trajectory_polynomial_z | list | Polynomial coefficients of the z trajectory. |
| hit_data_trajectory_data_valid_time_interval | list | Valid time interval for the trajectory fit (seconds). |
| top_seed_seed | integer | Bracket seed number of the top seed. |
| top_seed_is_winner | logical | Whether the top seed is the matchup winner. |
| top_seed_is_complete | logical | Whether the top seed's turn is complete. |
| top_seed_is_started | logical | Whether the top seed's turn has started. |
| top_seed_num_home_runs | integer | Number of home runs hit by the top seed. |
| top_seed_player_id | integer | MLB player id of the top seed. |
| top_seed_player_full_name | character | Full name of the top seed. |
| top_seed_player_link | character | API relative link to the top seed player. |
| top_seed_top_derby_hit_data_launch_speed | integer | Top seed's hardest-hit exit velocity in the round (mph). |
| top_seed_top_derby_hit_data_total_distance | integer | Top seed's longest projected distance in the round (feet). |
| bottom_seed_complete | logical | Whether the bottom seed's turn in the matchup is complete. |
| bottom_seed_started | logical | Whether the bottom seed's turn in the matchup has started. |
| bottom_seed_winner | logical | Whether the bottom seed won the matchup. |
| bottom_seed_seed | integer | Bracket seed number of the bottom seed. |
| bottom_seed_is_winner | logical | Whether the bottom seed is the matchup winner. |
| bottom_seed_is_complete | logical | Whether the bottom seed's turn is complete. |
| bottom_seed_is_started | logical | Whether the bottom seed's turn has started. |
| bottom_seed_num_home_runs | integer | Number of home runs hit by the bottom seed. |
| bottom_seed_player_id | integer | MLB player id of the bottom seed. |
| bottom_seed_player_full_name | character | Full name of the bottom seed. |
| bottom_seed_player_link | character | API relative link to the bottom seed player. |
| bottom_seed_top_derby_hit_data_launch_speed | integer | Bottom seed's hardest-hit exit velocity in the round (mph). |
| bottom_seed_top_derby_hit_data_total_distance | integer | Bottom seed's longest projected distance in the round (feet). |
| venue_link | character | API relative link to the event venue. |
| is_multi_day | logical | Whether the event spans multiple days. |
| is_primary_calendar | logical | Whether the event is on the primary calendar. |
| file_code | character | Internal file code for the event. |
| event_number | integer | Event number identifier. |
| public_facing | logical | Whether the event is public facing. |
try(mlb_homerun_derby(game_pk = 511101))try(mlb_homerun_derby(game_pk = 511101))
Retrieve Homerun Derby Bracket
mlb_homerun_derby_bracket(game_pk)mlb_homerun_derby_bracket(game_pk)
game_pk |
The game_pk for which you want to return data |
Returns a tibble with the following columns
| col_name | types | description |
| game_pk | integer | MLB game primary key for the Home Run Derby event. |
| event_name | character | Event name (e.g. 'All-Star Workout Day: Home Run Derby'). |
| event_type_code | character | Single-letter event type code (e.g. 'O'). |
| event_type_name | character | Event type name (e.g. 'Other'). |
| event_date | character | Event date-time in ISO 8601 (e.g. '2017-07-11T00:00:00Z'). |
| venue_id | integer | MLB venue id hosting the event. |
| venue_name | character | Venue name (e.g. 'Marlins Park'). |
| venue_link | character | API relative link to the event venue. |
| is_multi_day | logical | Whether the event spans multiple days. |
| is_primary_calendar | logical | Whether the event is on the primary calendar. |
| file_code | character | Internal file code for the event. |
| event_number | integer | Event number identifier. |
| public_facing | logical | Whether the event is public facing. |
| round | integer | Derby bracket round number. |
| top_seed_complete | logical | Whether the top seed's turn in the matchup is complete. |
| top_seed_started | logical | Whether the top seed's turn in the matchup has started. |
| top_seed_winner | logical | Whether the top seed won the matchup. |
| top_seed_seed | integer | Bracket seed number of the top seed. |
| top_seed_is_winner | logical | Whether the top seed is the matchup winner. |
| top_seed_is_complete | logical | Whether the top seed's turn is complete. |
| top_seed_is_started | logical | Whether the top seed's turn has started. |
| top_seed_num_home_runs | integer | Number of home runs hit by the top seed. |
| top_seed_player_id | integer | MLB player id of the top seed. |
| top_seed_player_full_name | character | Full name of the top seed. |
| top_seed_player_link | character | API relative link to the top seed player. |
| top_seed_top_derby_hit_data_launch_speed | integer | Top seed's hardest-hit exit velocity in the round (mph). |
| top_seed_top_derby_hit_data_total_distance | integer | Top seed's longest projected distance in the round (feet). |
| bottom_seed_complete | logical | Whether the bottom seed's turn in the matchup is complete. |
| bottom_seed_started | logical | Whether the bottom seed's turn in the matchup has started. |
| bottom_seed_winner | logical | Whether the bottom seed won the matchup. |
| bottom_seed_seed | integer | Bracket seed number of the bottom seed. |
| bottom_seed_is_winner | logical | Whether the bottom seed is the matchup winner. |
| bottom_seed_is_complete | logical | Whether the bottom seed's turn is complete. |
| bottom_seed_is_started | logical | Whether the bottom seed's turn has started. |
| bottom_seed_num_home_runs | integer | Number of home runs hit by the bottom seed. |
| bottom_seed_player_id | integer | MLB player id of the bottom seed. |
| bottom_seed_player_full_name | character | Full name of the bottom seed. |
| bottom_seed_player_link | character | API relative link to the bottom seed player. |
| bottom_seed_top_derby_hit_data_launch_speed | integer | Bottom seed's hardest-hit exit velocity in the round (mph). |
| bottom_seed_top_derby_hit_data_total_distance | integer | Bottom seed's longest projected distance in the round (feet). |
try(mlb_homerun_derby_bracket(game_pk = 511101))try(mlb_homerun_derby_bracket(game_pk = 511101))
mlb_homerun_derby(): Retrieve Homerun Derby data.
mlb_homerun_derby_bracket(): Retrieve Homerun Derby Bracket.
mlb_homerun_derby_players(): Retrieve Homerun Derby Players.
These functions retrieve MLB Home Run Derby data, bracket, and player information from the MLB Stats API.
Retrieve Homerun Derby Players
mlb_homerun_derby_players(game_pk)mlb_homerun_derby_players(game_pk)
game_pk |
The game_pk for which you want to return data |
Returns a tibble with the following columns
| col_name | types | description |
| game_pk | integer | MLB game primary key for the Home Run Derby event. |
| event_name | character | Event name (e.g. 'All-Star Workout Day: Home Run Derby'). |
| event_date | character | Event date-time in ISO 8601 (e.g. '2017-07-11T00:00:00Z'). |
| event_type_code | character | Single-letter event type code (e.g. 'O'). |
| event_type_name | character | Event type name (e.g. 'Other'). |
| venue_id | integer | MLB venue id hosting the event. |
| venue_name | character | Venue name (e.g. 'Marlins Park'). |
| player_id | integer | MLB player id of the participant. |
| player_full_name | character | Participant full name. |
| player_link | character | API relative link to the player. |
| player_first_name | character | Participant first name. |
| player_last_name | character | Participant last name. |
| player_primary_number | character | Participant primary jersey number. |
| player_birth_date | character | Participant birth date (YYYY-MM-DD). |
| player_current_age | integer | Participant current age in years. |
| player_birth_city | character | Participant birth city. |
| player_birth_state_province | character | Participant birth state or province. |
| player_birth_country | character | Participant birth country. |
| player_height | character | Participant height (e.g. "6' 5\""). |
| player_weight | integer | Participant weight in pounds. |
| player_active | logical | Whether the participant is currently an active player. |
| player_use_name | character | Participant preferred display first name. |
| player_middle_name | character | Participant middle name. |
| player_boxscore_name | character | Participant short box score name. |
| player_nick_name | character | Participant nickname. |
| player_gender | character | Participant gender code (e.g. 'M'). |
| player_is_player | logical | Whether the person is classified as a player. |
| player_is_verified | logical | Whether the player profile is verified. |
| player_draft_year | integer | Year the participant was drafted. |
| player_pronunciation | character | Phonetic pronunciation of the participant's name. |
| player_mlb_debut_date | character | Participant MLB debut date (YYYY-MM-DD). |
| player_name_first_last | character | Participant name in first-last order. |
| player_name_slug | character | URL slug for the participant (name plus id). |
| player_first_last_name | character | Participant name in first-last order. |
| player_last_first_name | character | Participant name in last, first order. |
| player_last_init_name | character | Participant name as last, first initial. |
| player_init_last_name | character | Participant name as first initial last. |
| player_full_fml_name | character | Participant full first-middle-last name. |
| player_full_lfm_name | character | Participant full last, first-middle name. |
| player_strike_zone_top | numeric | Top of the participant's strike zone (feet). |
| player_strike_zone_bottom | numeric | Bottom of the participant's strike zone (feet). |
| player_name_matrilineal | character | Participant matrilineal name when provided. |
| player_current_team_id | integer | Participant current team id. |
| player_current_team_name | character | Participant current team name. |
| player_current_team_link | character | API relative link to the current team. |
| player_current_team_season | integer | Season of the current team reference. |
| player_current_team_team_code | character | Current team three-letter team code. |
| player_current_team_file_code | character | Current team file code. |
| player_current_team_abbreviation | character | Current team abbreviation (e.g. 'NYY'). |
| player_current_team_team_name | character | Current team short team name (e.g. 'Yankees'). |
| player_current_team_location_name | character | Current team location name. |
| player_current_team_first_year_of_play | character | Franchise first year of play. |
| player_current_team_short_name | character | Current team short name. |
| player_current_team_franchise_name | character | Current team franchise name. |
| player_current_team_club_name | character | Current team club name. |
| player_current_team_all_star_status | character | Current team all-star status flag. |
| player_current_team_active | logical | Whether the current team is active. |
| player_current_team_parent_org_name | character | Parent organization name (minors). |
| player_current_team_parent_org_id | integer | Parent organization id (minors). |
| player_current_team_venue_id | integer | Current team home venue id. |
| player_current_team_venue_name | character | Current team home venue name. |
| player_current_team_venue_link | character | API relative link to the team venue. |
| player_current_team_spring_venue_id | integer | Current team spring training venue id. |
| player_current_team_spring_venue_link | character | API relative link to the spring venue. |
| player_current_team_league_id | integer | Current team league id (e.g. 103, 104). |
| player_current_team_league_name | character | Current team league name. |
| player_current_team_league_link | character | API relative link to the league. |
| player_current_team_division_id | integer | Current team division id. |
| player_current_team_division_name | character | Current team division name. |
| player_current_team_division_link | character | API relative link to the division. |
| player_current_team_sport_id | integer | Current team sport id (1 for MLB). |
| player_current_team_sport_link | character | API relative link to the sport. |
| player_current_team_sport_name | character | Current team sport name. |
| player_current_team_spring_league_id | integer | Spring league id. |
| player_current_team_spring_league_name | character | Spring league name (e.g. 'Grapefruit League'). |
| player_current_team_spring_league_link | character | API relative link to the spring league. |
| player_current_team_spring_league_abbreviation | character | Spring league abbreviation (e.g. 'GL'). |
| player_primary_position_code | character | Participant primary position code. |
| player_primary_position_name | character | Participant primary position name. |
| player_primary_position_type | character | Participant primary position type (e.g. 'Hitter'). |
| player_primary_position_abbreviation | character | Participant primary position abbreviation (e.g. 'DH'). |
| player_bat_side_code | character | Participant batting side code (e.g. 'R'). |
| player_bat_side_description | character | Participant batting side description (e.g. 'Right'). |
| player_pitch_hand_code | character | Participant throwing hand code (e.g. 'R'). |
| player_pitch_hand_description | character | Participant throwing hand description (e.g. 'Right'). |
| venue_link | character | API relative link to the event venue. |
| is_multi_day | logical | Whether the event spans multiple days. |
| is_primary_calendar | logical | Whether the event is on the primary calendar. |
| file_code | character | Internal file code for the event. |
| event_number | integer | Event number identifier. |
| public_facing | logical | Whether the event is public facing. |
try(mlb_homerun_derby_players(game_pk = 511101))try(mlb_homerun_derby_players(game_pk = 511101))
MLB Job Types
mlb_job_types()mlb_job_types()
Returns a tibble with the following columns
| col_name | types | description |
| job_code | character | Four-letter job type code (e.g. 'UMPR', 'UDIR'). |
| job | character | Job title (e.g. 'Umpire', 'Director of Instant Replay'). |
| sort_order | integer | Display sort order for the job type. |
try(mlb_job_types())try(mlb_job_types())
MLB Jobs
mlb_jobs(job_type = "UMPR", sport_id = NULL, date = NULL)mlb_jobs(job_type = "UMPR", sport_id = NULL, date = NULL)
job_type |
Return information for a given job_type. See |
sport_id |
Return information for a given sport_id. |
date |
Return information for a given date. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Jersey number worn (often blank for non-uniformed roles). |
| job | character | Job title (e.g. 'Umpire'). |
| job_code | character | Four-letter job type code (e.g. 'UMPR'). |
| title | character | Specific role title for the assignment. |
| person_id | integer | MLB person id for the individual. |
| person_full_name | character | Full name of the individual. |
| person_link | character | API relative link to the person. |
try(mlb_jobs(job_type='UMPR'))try(mlb_jobs(job_type='UMPR'))
MLB Jobs Datacasters
mlb_jobs_datacasters(sport_id = NULL, date = NULL)mlb_jobs_datacasters(sport_id = NULL, date = NULL)
sport_id |
Return information for a given sport_id. |
date |
Return information for a given date. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Jersey number (typically blank for datacasters). |
| job | character | Job title (e.g. 'Stringer'). |
| job_code | character | Four-letter job type code (e.g. 'MSTR'). |
| title | character | Specific role title for the assignment. |
| person_id | integer | MLB person id for the datacaster. |
| person_full_name | character | Full name of the datacaster. |
| person_link | character | API relative link to the person. |
try(mlb_jobs_datacasters(sport_id=1))try(mlb_jobs_datacasters(sport_id=1))
mlb_jobs(): MLB Jobs.
mlb_jobs_datacasters(): MLB Jobs Datacasters.
mlb_jobs_official_scorers(): MLB Jobs Official Scorers.
mlb_jobs_umpires(): MLB Jobs Umpires.
mlb_job_types(): MLB Job Types.
These functions retrieve MLB job, datacaster, official scorer, umpire, and job-type information from the MLB Stats API.
MLB Jobs Official Scorers
mlb_jobs_official_scorers(sport_id = NULL, date = NULL)mlb_jobs_official_scorers(sport_id = NULL, date = NULL)
sport_id |
Return information for a given sport_id. |
date |
Return information for a given date. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Jersey number (typically blank for official scorers). |
| job | character | Job title (e.g. 'Official Scorer'). |
| job_code | character | Four-letter job type code (e.g. 'SCOR'). |
| title | character | Specific role title for the assignment. |
| person_id | integer | MLB person id for the official scorer. |
| person_full_name | character | Full name of the official scorer. |
| person_link | character | API relative link to the person. |
try(mlb_jobs_official_scorers(sport_id=1))try(mlb_jobs_official_scorers(sport_id=1))
MLB Jobs Umpires
mlb_jobs_umpires(sport_id = NULL, date = NULL)mlb_jobs_umpires(sport_id = NULL, date = NULL)
sport_id |
Return information for a given sport_id. |
date |
Return information for a given date. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Umpire jersey number. |
| job | character | Job title (e.g. 'Umpire'). |
| job_code | character | Four-letter job type code (e.g. 'UMPR'). |
| title | character | Specific role title for the assignment. |
| person_id | integer | MLB person id for the umpire. |
| person_full_name | character | Full name of the umpire. |
| person_link | character | API relative link to the person. |
try(mlb_jobs_umpires(sport_id=1))try(mlb_jobs_umpires(sport_id=1))
MLB API Language Options
mlb_languages()mlb_languages()
Returns a tibble with the following columns
| col_name | types | description |
| language_id | integer | Numeric language identifier. |
| language_code | character | Short language code (e.g. 'en', 'xe'). |
| language_name | character | Language display name (e.g. 'English', 'Elias'). |
| locale | character | Locale string for the language (e.g. 'en_US'). |
try(mlb_languages())try(mlb_languages())
MLB Leagues
mlb_league(seasons = NULL, sport_id = NULL, league_id = NULL)mlb_league(seasons = NULL, sport_id = NULL, league_id = NULL)
seasons |
Year(s) to return to return league information for. |
sport_id |
The sport_id to return league information for. |
league_id |
The league_id(s) to return league information for. |
Returns a tibble with the following columns
| col_name | types | description |
| league_id | integer | MLB league id (e.g. 103 for AL, 104 for NL). |
| league_name | character | League name (e.g. 'American League'). |
| league_link | character | API relative link to the league. |
| league_abbreviation | character | League abbreviation (e.g. 'AL'). |
| league_name_short | character | Short league name (e.g. 'American'). |
| league_season_state | character | Season state (e.g. 'offseason', 'regular'). |
| league_has_wild_card | logical | Whether the league uses a wild card. |
| league_has_split_season | logical | Whether the league has a split season. |
| league_num_games | integer | Scheduled number of regular season games. |
| league_has_playoff_points | logical | Whether the league awards playoff points. |
| league_num_teams | integer | Number of teams in the league. |
| league_num_wildcard_teams | integer | Number of wild card teams. |
| league_season | character | Season year for the league record. |
| league_org_code | character | Organization code (e.g. 'AL'). |
| league_conferences_in_use | logical | Whether conferences are used. |
| league_divisions_in_use | logical | Whether divisions are used. |
| league_sort_order | integer | Display sort order for the league. |
| league_active | logical | Whether the league is active. |
| season_date_info_season_id | character | Season identifier for the date info block. |
| season_date_info_pre_season_start_date | character | Preseason start date (YYYY-MM-DD). |
| season_date_info_pre_season_end_date | character | Preseason end date (YYYY-MM-DD). |
| season_date_info_season_start_date | character | Season start date (YYYY-MM-DD). |
| season_date_info_spring_start_date | character | Spring training start date (YYYY-MM-DD). |
| season_date_info_spring_end_date | character | Spring training end date (YYYY-MM-DD). |
| season_date_info_regular_season_start_date | character | Regular season start date (YYYY-MM-DD). |
| season_date_info_last_date1st_half | character | Last date of the first half (YYYY-MM-DD). |
| season_date_info_all_star_date | character | All-Star Game date (YYYY-MM-DD). |
| season_date_info_first_date2nd_half | character | First date of the second half (YYYY-MM-DD). |
| season_date_info_regular_season_end_date | character | Regular season end date (YYYY-MM-DD). |
| season_date_info_post_season_start_date | character | Postseason start date (YYYY-MM-DD). |
| season_date_info_post_season_end_date | character | Postseason end date (YYYY-MM-DD). |
| season_date_info_season_end_date | character | Season end date (YYYY-MM-DD). |
| season_date_info_offseason_start_date | character | Offseason start date (YYYY-MM-DD). |
| season_date_info_off_season_end_date | character | Offseason end date (YYYY-MM-DD). |
| season_date_info_season_level_gameday_type | character | Season-level Gameday data type code. |
| season_date_info_game_level_gameday_type | character | Game-level Gameday data type code. |
| season_date_info_qualifier_plate_appearances | numeric | Plate appearances per game needed to qualify. |
| season_date_info_qualifier_outs_pitched | integer | Outs pitched per game needed to qualify. |
| sport_id | integer | Sport id associated with the league (1 for MLB). |
| sport_link | character | API relative link to the sport. |
try(mlb_league(seasons = 2021, sport_id = 1))try(mlb_league(seasons = 2021, sport_id = 1))
MLB League Leader Types
mlb_league_leader_types()mlb_league_leader_types()
Returns a tibble with the following columns
| col_name | types | description |
| leader_type | character | League leader category display name (e.g. 'assists', 'shutouts'). |
try(mlb_league_leader_types())try(mlb_league_leader_types())
MLB Logical Events
mlb_logical_events()mlb_logical_events()
Returns a tibble with the following columns
| col_name | types | description |
| event_code | character | Logical event code used by the MLB Gameday feed (e.g. 'newBatter'). |
try(mlb_logical_events())try(mlb_logical_events())
MLB Metrics
mlb_metrics()mlb_metrics()
Returns a tibble with the following columns
| col_name | types | description |
| metric_name | character | Metric name (e.g. 'releaseSpinRate'). |
| metric_id | integer | Numeric metric identifier. |
| stat_group | character | Stat group the metric belongs to (e.g. 'pitching'). |
| metric_unit | character | Unit of measure for the metric (e.g. 'RPM'). |
try(mlb_metrics())try(mlb_metrics())
Acquire pitch-by-pitch data for Major and Minor League games
mlb_pbp(game_pk)mlb_pbp(game_pk)
game_pk |
The date for which you want to find game_pk values for MLB games |
Returns a tibble that includes over 100 columns of data provided by the MLB Stats API at a pitch level.
Some data will vary depending on the park and the league level, as most sensor data is not available in minor league parks via this API. Note that the column names have mostly been left as-is and there are likely duplicate columns in terms of the information they provide. I plan to clean the output up down the road, but for now I am leaving the majority as-is.
Both major and minor league pitch-by-pitch data can be pulled with this function.
| col_name | types | description |
| game_pk | numeric | MLB game primary key. |
| game_date | character | Game date (YYYY-MM-DD). |
| index | integer | Index of the play event within the at-bat. |
| startTime | character | Event start timestamp (ISO 8601). |
| endTime | character | Event end timestamp (ISO 8601). |
| isPitch | logical | Whether the event is a pitch. |
| type | character | Play event type (e.g. 'pitch', 'action'). |
| playId | character | Unique play event identifier (UUID). |
| pitchNumber | integer | Pitch number within the at-bat. |
| details.description | character | Pitch/event description (e.g. 'Swinging Strike'). |
| details.event | character | Event name for non-pitch actions. |
| details.awayScore | integer | Away score recorded at the event. |
| details.homeScore | integer | Home score recorded at the event. |
| details.isScoringPlay | logical | Whether the event is a scoring play. |
| details.hasReview | logical | Whether the event was reviewed. |
| details.code | character | Pitch/result code (e.g. 'S', 'C', 'B'). |
| details.ballColor | character | Gameday ball color rgba string. |
| details.isInPlay | logical | Whether the ball was put in play. |
| details.isStrike | logical | Whether the pitch was a strike. |
| details.isBall | logical | Whether the pitch was a ball. |
| details.call.code | character | Umpire call code. |
| details.call.description | character | Umpire call description. |
| count.balls.start | integer | Ball count before the pitch. |
| count.strikes.start | integer | Strike count before the pitch. |
| count.outs.start | integer | Out count before the pitch. |
| player.id | integer | Player id for action-event participant. |
| player.link | character | API relative link to the action player. |
| pitchData.strikeZoneTop | numeric | Top of the batter strike zone (feet). |
| pitchData.strikeZoneBottom | numeric | Bottom of the batter strike zone (feet). |
| details.fromCatcher | logical | Whether the event originated from the catcher. |
| pitchData.coordinates.x | numeric | Pitch x pixel coordinate (Gameday). |
| pitchData.coordinates.y | numeric | Pitch y pixel coordinate (Gameday). |
| hitData.trajectory | character | Batted ball trajectory. |
| hitData.hardness | character | Batted ball hardness. |
| hitData.location | character | Fielding position where the ball was hit. |
| hitData.coordinates.coordX | numeric | Batted ball landing x coordinate. |
| hitData.coordinates.coordY | numeric | Batted ball landing y coordinate. |
| actionPlayId | character | Identifier of an associated action play. |
| details.eventType | character | Event type slug for non-pitch actions. |
| details.runnerGoing | logical | Whether a runner was going on the pitch. |
| position.code | character | Fielding position code for the player. |
| position.name | character | Fielding position name. |
| position.type | character | Fielding position type. |
| position.abbreviation | character | Fielding position abbreviation. |
| battingOrder | character | Batting order slot. |
| atBatIndex | character | At-bat index within the game (factor). |
| result.type | character | Result type (e.g. 'atBat'). |
| result.event | character | At-bat result event (e.g. 'Strikeout'). |
| result.eventType | character | At-bat result event slug. |
| result.description | character | Narrative description of the at-bat result. |
| result.rbi | integer | Runs batted in on the at-bat. |
| result.awayScore | integer | Away score after the at-bat. |
| result.homeScore | integer | Home score after the at-bat. |
| about.atBatIndex | integer | At-bat index (numeric). |
| about.halfInning | character | Half inning ('top' or 'bottom'). |
| about.inning | integer | Inning number. |
| about.startTime | character | At-bat start timestamp (ISO 8601). |
| about.endTime | character | At-bat end timestamp (ISO 8601). |
| about.isComplete | logical | Whether the at-bat is complete. |
| about.isScoringPlay | logical | Whether the at-bat is a scoring play. |
| about.hasReview | logical | Whether the at-bat had a review. |
| about.hasOut | logical | Whether the at-bat produced an out. |
| about.captivatingIndex | integer | MLB captivating index for the play. |
| count.balls.end | integer | Ball count after the pitch. |
| count.strikes.end | integer | Strike count after the pitch. |
| count.outs.end | integer | Out count after the pitch. |
| matchup.batter.id | integer | Batter player id. |
| matchup.batter.fullName | character | Batter full name (factor). |
| matchup.batter.link | character | API relative link to the batter. |
| matchup.batSide.code | character | Batter handedness code (e.g. 'L', 'R'). |
| matchup.batSide.description | character | Batter handedness description. |
| matchup.pitcher.id | integer | Pitcher player id. |
| matchup.pitcher.fullName | character | Pitcher full name (factor). |
| matchup.pitcher.link | character | API relative link to the pitcher. |
| matchup.pitchHand.code | character | Pitcher throwing hand code (e.g. 'R'). |
| matchup.pitchHand.description | character | Pitcher throwing hand description. |
| matchup.splits.batter | character | Batter platoon split (e.g. 'vs_RHP'). |
| matchup.splits.pitcher | character | Pitcher platoon split (e.g. 'vs_LHB'). |
| matchup.splits.menOnBase | character | Men on base split (e.g. 'Empty', 'Men_On'). |
| batted.ball.result | factor | Categorized batted ball result. |
| home_team | character | Home team name. |
| home_level_id | integer | Home team level/sport id (1 for MLB). |
| home_level_name | character | Home team level/sport name. |
| home_parentOrg_id | integer | Home team parent organization id (minors). |
| home_parentOrg_name | character | Home team parent organization name (minors). |
| home_league_id | integer | Home team league id. |
| home_league_name | character | Home team league name. |
| away_team | character | Away team name. |
| away_level_id | integer | Away team level/sport id (1 for MLB). |
| away_level_name | character | Away team level/sport name. |
| away_parentOrg_id | integer | Away team parent organization id (minors). |
| away_parentOrg_name | character | Away team parent organization name (minors). |
| away_league_id | integer | Away team league id. |
| away_league_name | character | Away team league name. |
| batting_team | character | Team batting on the play (factor). |
| fielding_team | character | Team fielding on the play (factor). |
| last.pitch.of.ab | character | Whether the pitch was the last of the at-bat (factor). |
| pfxId | character | Pitch f/x tracking identifier. |
| details.trailColor | character | Gameday pitch trail color rgba string. |
| details.type.code | character | Pitch type code (e.g. 'CU', 'SI'). |
| details.type.description | character | Pitch type description (e.g. 'Curveball'). |
| pitchData.startSpeed | numeric | Pitch release speed (mph). |
| pitchData.endSpeed | numeric | Pitch speed crossing the plate (mph). |
| pitchData.zone | integer | Strike zone region of the pitch. |
| pitchData.typeConfidence | numeric | Pitch type classification confidence. |
| pitchData.plateTime | numeric | Time from release to plate (seconds). |
| pitchData.extension | numeric | Pitcher release extension (feet). |
| pitchData.coordinates.aY | numeric | Pitch acceleration in y (ft/s^2). |
| pitchData.coordinates.aZ | numeric | Pitch acceleration in z (ft/s^2). |
| pitchData.coordinates.pfxX | numeric | Horizontal pitch movement (inches). |
| pitchData.coordinates.pfxZ | numeric | Vertical pitch movement (inches). |
| pitchData.coordinates.pX | numeric | Horizontal pitch location at plate (feet). |
| pitchData.coordinates.pZ | numeric | Vertical pitch location at plate (feet). |
| pitchData.coordinates.vX0 | numeric | Pitch initial velocity in x (ft/s). |
| pitchData.coordinates.vY0 | numeric | Pitch initial velocity in y (ft/s). |
| pitchData.coordinates.vZ0 | numeric | Pitch initial velocity in z (ft/s). |
| pitchData.coordinates.x0 | numeric | Pitch initial x position (feet). |
| pitchData.coordinates.y0 | numeric | Pitch initial y position (feet). |
| pitchData.coordinates.z0 | numeric | Pitch initial z position (feet). |
| pitchData.coordinates.aX | numeric | Pitch acceleration in x (ft/s^2). |
| pitchData.breaks.breakAngle | numeric | Pitch break angle (degrees). |
| pitchData.breaks.breakLength | numeric | Pitch break length (inches). |
| pitchData.breaks.breakY | numeric | Distance from plate where break is measured. |
| pitchData.breaks.spinRate | integer | Pitch spin rate (RPM). |
| pitchData.breaks.spinDirection | integer | Pitch spin direction (degrees). |
| hitData.launchSpeed | numeric | Batted ball exit velocity (mph). |
| hitData.launchAngle | numeric | Batted ball launch angle (degrees). |
| hitData.totalDistance | numeric | Batted ball total distance (feet). |
| injuryType | character | Injury type when the event is injury-related. |
| umpire.id | integer | Umpire person id for the event. |
| umpire.link | character | API relative link to the umpire. |
| details.isOut | logical | Whether the pitch/event resulted in an out. |
| pitchData.breaks.breakVertical | numeric | Total vertical break (inches). |
| pitchData.breaks.breakVerticalInduced | numeric | Induced vertical break (inches). |
| pitchData.breaks.breakHorizontal | numeric | Horizontal break (inches). |
| details.disengagementNum | integer | Pitcher disengagement number on the play. |
| isBaseRunningPlay | logical | Whether the event is a base running play. |
| isSubstitution | logical | Whether the event is a substitution. |
| replacedPlayer.id | integer | Player id replaced on a substitution. |
| replacedPlayer.link | character | API relative link to the replaced player. |
| result.isOut | logical | Whether the at-bat resulted in an out. |
| about.isTopInning | logical | Whether the play occurred in the top of the inning. |
| matchup.postOnFirst.id | integer | Runner id on first base after the play. |
| matchup.postOnFirst.fullName | character | Runner name on first base after the play. |
| matchup.postOnFirst.link | character | API relative link to the first base runner. |
| matchup.postOnSecond.id | integer | Runner id on second base after the play. |
| matchup.postOnSecond.fullName | character | Runner name on second base after the play. |
| matchup.postOnSecond.link | character | API relative link to the second base runner. |
| matchup.postOnThird.id | integer | Runner id on third base after the play. |
| matchup.postOnThird.fullName | character | Runner name on third base after the play. |
| matchup.postOnThird.link | character | API relative link to the third base runner. |
try(mlb_pbp(game_pk = 632970))try(mlb_pbp(game_pk = 632970))
Acquire pitch-by-pitch data between two timecodes for Major and Minor League games
mlb_pbp_diff(game_pk, start_timecode, end_timecode)mlb_pbp_diff(game_pk, start_timecode, end_timecode)
game_pk |
The date for which you want to find game_pk values for MLB games |
start_timecode |
The start time code for the MLB game (format: MMDDYYYY_HHMMSS) |
end_timecode |
The end time code for the MLB game (format: MMDDYYYY_HHMMSS) |
Returns a tibble that includes over 100 columns of data provided by the MLB Stats API at a pitch level between the start_timecode and end_timecode
| col_name | types | description |
| game_pk | numeric | MLB game primary key. |
| game_date | character | Game date (YYYY-MM-DD). |
| index | integer | Index of the play event within the at-bat. |
| startTime | character | Event start timestamp (ISO 8601). |
| endTime | character | Event end timestamp (ISO 8601). |
| isPitch | logical | Whether the event is a pitch. |
| type | character | Play event type (e.g. 'pitch', 'action'). |
| playId | character | Unique play event identifier (UUID). |
| pitchNumber | integer | Pitch number within the at-bat. |
| details.description | character | Pitch/event description (e.g. 'Foul', 'Ball'). |
| details.event | character | Event name for non-pitch actions. |
| details.awayScore | integer | Away score recorded at the event. |
| details.homeScore | integer | Home score recorded at the event. |
| details.isScoringPlay | logical | Whether the event is a scoring play. |
| details.hasReview | logical | Whether the event was reviewed. |
| details.code | character | Pitch/result code (e.g. 'F', 'B'). |
| details.ballColor | character | Gameday ball color rgba string. |
| details.isInPlay | logical | Whether the ball was put in play. |
| details.isStrike | logical | Whether the pitch was a strike. |
| details.isBall | logical | Whether the pitch was a ball. |
| details.call.code | character | Umpire call code. |
| details.call.description | character | Umpire call description. |
| count.balls.start | integer | Ball count before the pitch. |
| count.strikes.start | integer | Strike count before the pitch. |
| count.outs.start | integer | Out count before the pitch. |
| player.id | integer | Player id for action-event participant. |
| player.link | character | API relative link to the action player. |
| pitchData.strikeZoneTop | numeric | Top of the batter strike zone (feet). |
| pitchData.strikeZoneBottom | numeric | Bottom of the batter strike zone (feet). |
| details.fromCatcher | logical | Whether the event originated from the catcher. |
| pitchData.coordinates.x | numeric | Pitch x pixel coordinate (Gameday). |
| pitchData.coordinates.y | numeric | Pitch y pixel coordinate (Gameday). |
| hitData.trajectory | character | Batted ball trajectory. |
| hitData.hardness | character | Batted ball hardness. |
| hitData.location | character | Fielding position where the ball was hit. |
| hitData.coordinates.coordX | numeric | Batted ball landing x coordinate. |
| hitData.coordinates.coordY | numeric | Batted ball landing y coordinate. |
| actionPlayId | character | Identifier of an associated action play. |
| details.eventType | character | Event type slug for non-pitch actions. |
| details.runnerGoing | logical | Whether a runner was going on the pitch. |
| position.code | character | Fielding position code for the player. |
| position.name | character | Fielding position name. |
| position.type | character | Fielding position type. |
| position.abbreviation | character | Fielding position abbreviation. |
| battingOrder | character | Batting order slot. |
| atBatIndex | character | At-bat index within the game (factor). |
| result.type | character | Result type (e.g. 'atBat'). |
| result.event | character | At-bat result event. |
| result.eventType | character | At-bat result event slug. |
| result.description | character | Narrative description of the at-bat result. |
| result.rbi | integer | Runs batted in on the at-bat. |
| result.awayScore | integer | Away score after the at-bat. |
| result.homeScore | integer | Home score after the at-bat. |
| about.atBatIndex | integer | At-bat index (numeric). |
| about.halfInning | character | Half inning ('top' or 'bottom'). |
| about.inning | integer | Inning number. |
| about.startTime | character | At-bat start timestamp (ISO 8601). |
| about.endTime | character | At-bat end timestamp (ISO 8601). |
| about.isComplete | logical | Whether the at-bat is complete. |
| about.isScoringPlay | logical | Whether the at-bat is a scoring play. |
| about.hasReview | logical | Whether the at-bat had a review. |
| about.hasOut | logical | Whether the at-bat produced an out. |
| about.captivatingIndex | integer | MLB captivating index for the play. |
| count.balls.end | integer | Ball count after the pitch. |
| count.strikes.end | integer | Strike count after the pitch. |
| count.outs.end | integer | Out count after the pitch. |
| matchup.batter.id | integer | Batter player id. |
| matchup.batter.fullName | character | Batter full name (factor). |
| matchup.batter.link | character | API relative link to the batter. |
| matchup.batSide.code | character | Batter handedness code (e.g. 'L', 'R'). |
| matchup.batSide.description | character | Batter handedness description. |
| matchup.pitcher.id | integer | Pitcher player id. |
| matchup.pitcher.fullName | character | Pitcher full name (factor). |
| matchup.pitcher.link | character | API relative link to the pitcher. |
| matchup.pitchHand.code | character | Pitcher throwing hand code (e.g. 'R'). |
| matchup.pitchHand.description | character | Pitcher throwing hand description. |
| matchup.splits.batter | character | Batter platoon split (e.g. 'vs_RHP'). |
| matchup.splits.pitcher | character | Pitcher platoon split (e.g. 'vs_RHB'). |
| matchup.splits.menOnBase | character | Men on base split (e.g. 'Men_On'). |
| batted.ball.result | factor | Categorized batted ball result. |
| home_team | character | Home team name. |
| home_level_id | integer | Home team level/sport id (1 for MLB). |
| home_level_name | character | Home team level/sport name. |
| home_parentOrg_id | integer | Home team parent organization id (minors). |
| home_parentOrg_name | character | Home team parent organization name (minors). |
| home_league_id | integer | Home team league id. |
| home_league_name | character | Home team league name. |
| away_team | character | Away team name. |
| away_level_id | integer | Away team level/sport id (1 for MLB). |
| away_level_name | character | Away team level/sport name. |
| away_parentOrg_id | integer | Away team parent organization id (minors). |
| away_parentOrg_name | character | Away team parent organization name (minors). |
| away_league_id | integer | Away team league id. |
| away_league_name | character | Away team league name. |
| batting_team | character | Team batting on the play (factor). |
| fielding_team | character | Team fielding on the play (factor). |
| last.pitch.of.ab | character | Whether the pitch was the last of the at-bat (factor). |
| pfxId | character | Pitch f/x tracking identifier. |
| details.trailColor | character | Gameday pitch trail color rgba string. |
| details.type.code | character | Pitch type code (e.g. 'SI', 'CH'). |
| details.type.description | character | Pitch type description (e.g. 'Sinker', 'Changeup'). |
| pitchData.startSpeed | numeric | Pitch release speed (mph). |
| pitchData.endSpeed | numeric | Pitch speed crossing the plate (mph). |
| pitchData.zone | integer | Strike zone region of the pitch. |
| pitchData.typeConfidence | numeric | Pitch type classification confidence. |
| pitchData.plateTime | numeric | Time from release to plate (seconds). |
| pitchData.extension | numeric | Pitcher release extension (feet). |
| pitchData.coordinates.aY | numeric | Pitch acceleration in y (ft/s^2). |
| pitchData.coordinates.aZ | numeric | Pitch acceleration in z (ft/s^2). |
| pitchData.coordinates.pfxX | numeric | Horizontal pitch movement (inches). |
| pitchData.coordinates.pfxZ | numeric | Vertical pitch movement (inches). |
| pitchData.coordinates.pX | numeric | Horizontal pitch location at plate (feet). |
| pitchData.coordinates.pZ | numeric | Vertical pitch location at plate (feet). |
| pitchData.coordinates.vX0 | numeric | Pitch initial velocity in x (ft/s). |
| pitchData.coordinates.vY0 | numeric | Pitch initial velocity in y (ft/s). |
| pitchData.coordinates.vZ0 | numeric | Pitch initial velocity in z (ft/s). |
| pitchData.coordinates.x0 | numeric | Pitch initial x position (feet). |
| pitchData.coordinates.y0 | numeric | Pitch initial y position (feet). |
| pitchData.coordinates.z0 | numeric | Pitch initial z position (feet). |
| pitchData.coordinates.aX | numeric | Pitch acceleration in x (ft/s^2). |
| pitchData.breaks.breakAngle | numeric | Pitch break angle (degrees). |
| pitchData.breaks.breakLength | numeric | Pitch break length (inches). |
| pitchData.breaks.breakY | numeric | Distance from plate where break is measured. |
| pitchData.breaks.spinRate | integer | Pitch spin rate (RPM). |
| pitchData.breaks.spinDirection | integer | Pitch spin direction (degrees). |
| hitData.launchSpeed | numeric | Batted ball exit velocity (mph). |
| hitData.launchAngle | numeric | Batted ball launch angle (degrees). |
| hitData.totalDistance | numeric | Batted ball total distance (feet). |
| injuryType | character | Injury type when the event is injury-related. |
| umpire.id | integer | Umpire person id for the event. |
| umpire.link | character | API relative link to the umpire. |
| details.isOut | logical | Whether the pitch/event resulted in an out. |
| pitchData.breaks.breakVertical | numeric | Total vertical break (inches). |
| pitchData.breaks.breakVerticalInduced | numeric | Induced vertical break (inches). |
| pitchData.breaks.breakHorizontal | numeric | Horizontal break (inches). |
| details.disengagementNum | integer | Pitcher disengagement number on the play. |
| result.isOut | logical | Whether the at-bat resulted in an out. |
| about.isTopInning | logical | Whether the play occurred in the top of the inning. |
| matchup.postOnFirst.id | integer | Runner id on first base after the play. |
| matchup.postOnFirst.fullName | character | Runner name on first base after the play. |
| matchup.postOnFirst.link | character | API relative link to the first base runner. |
try(mlb_pbp_diff(game_pk = 632970, start_timecode = "20210808_231704", end_timecode = "20210808_233711"))try(mlb_pbp_diff(game_pk = 632970, start_timecode = "20210808_231704", end_timecode = "20210808_233711"))
Find Biographical Information for MLB Players
mlb_people(person_ids = NULL)mlb_people(person_ids = NULL)
person_ids |
MLBAMIDs for players of interest. Multiple IDs should be provided in a vector separated by a comma. |
Returns a tibble with the following columns:
| col_name | types | description |
| id | integer | MLB person id (MLBAMID). |
| full_name | character | Player full name. |
| link | character | API relative link to the player. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Player primary jersey number. |
| birth_date | character | Player birth date (YYYY-MM-DD). |
| current_age | integer | Player current age in years. |
| birth_city | character | Player birth city. |
| birth_state_province | character | Player birth state or province. |
| birth_country | character | Player birth country. |
| height | character | Player height (e.g. "6' 2\""). |
| weight | integer | Player weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Player preferred display first name. |
| use_last_name | character | Player preferred display last name. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Player short box score name. |
| nick_name | character | Player nickname. |
| gender | character | Player gender code (e.g. 'M'). |
| is_player | logical | Whether the person is classified as a player. |
| is_verified | logical | Whether the player profile is verified. |
| draft_year | integer | Year the player was drafted. |
| mlb_debut_date | character | Player MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Player name in first-last order. |
| name_slug | character | URL slug for the player (name plus id). |
| first_last_name | character | Player name in first-last order. |
| last_first_name | character | Player name in last, first order. |
| last_init_name | character | Player name as last, first initial. |
| init_last_name | character | Player name as first initial last. |
| full_fml_name | character | Player full first-middle-last name. |
| full_lfm_name | character | Player full last, first-middle name. |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| pronunciation | character | Phonetic pronunciation of the player's name. |
| last_played_date | character | Date the player last played (YYYY-MM-DD), if inactive. |
| primary_position_code | character | Primary position code. |
| primary_position_name | character | Primary position name (e.g. 'First Base'). |
| primary_position_type | character | Primary position type (e.g. 'Infielder'). |
| primary_position_abbreviation | character | Primary position abbreviation (e.g. '1B'). |
| bat_side_code | character | Batting side code (e.g. 'R'). |
| bat_side_description | character | Batting side description (e.g. 'Right'). |
| pitch_hand_code | character | Throwing hand code (e.g. 'R'). |
| pitch_hand_description | character | Throwing hand description (e.g. 'Right'). |
try(mlb_people(person_ids = 502671)) try(mlb_people(person_ids = c(502671,605151)))try(mlb_people(person_ids = 502671)) try(mlb_people(person_ids = c(502671,605151)))
Find Information About MLB Free Agents
mlb_people_free_agents(season = NULL)mlb_people_free_agents(season = NULL)
season |
Season preceding free agency |
Returns a tibble with the following columns:
| col_name | types | description |
| date_declared | character | Date the player declared free agency (YYYY-MM-DD). |
| notes | character | Notes on the signing (e.g. 'One-year contract'). |
| date_signed | character | Date the player signed a new contract (YYYY-MM-DD). |
| sort_order | integer | Display sort order for the free agent record. |
| player_id | integer | MLB player id of the free agent. |
| player_full_name | character | Free agent full name. |
| player_link | character | API relative link to the player. |
| original_team_id | integer | Team id the player left. |
| original_team_name | character | Name of the team the player left. |
| original_team_link | character | API relative link to the original team. |
| position_code | character | Player position code. |
| position_name | character | Player position name (e.g. 'Relief Pitcher'). |
| position_type | character | Player position type (e.g. 'Pitcher'). |
| position_abbreviation | character | Player position abbreviation (e.g. 'RP'). |
| new_team_id | integer | Team id the player signed with. |
| new_team_name | character | Name of the team the player signed with. |
| new_team_link | character | API relative link to the new team. |
try(mlb_people_free_agents(season = 2018))try(mlb_people_free_agents(season = 2018))
MLB Pitch Codes
mlb_pitch_codes()mlb_pitch_codes()
Returns a tibble with the following columns
| col_name | types | description |
| pitch_code | character | Single-character code identifying the pitch result. |
| pitch_description | character | Human-readable description of the pitch code. |
| swing_status | logical | Whether the code represents a swing. |
| swing_miss_status | logical | Whether the code represents a swinging strike (miss). |
| swing_contact_status | logical | Whether the code represents a swing that made contact. |
| sort_order | integer | Display sort order for the pitch code. |
| strike_status | logical | Whether the code counts as a strike. |
| ball_status | logical | Whether the code counts as a ball. |
| pitch_status | logical | Whether the code represents a pitch (vs. non-pitch event). |
| pitch_result_text | character | Display text for the pitch result. |
| bunt_attempt_status | logical | Whether the code represents a bunt attempt. |
| contact_status | logical | Whether the code represents bat-ball contact. |
try(mlb_pitch_codes())try(mlb_pitch_codes())
MLB Pitch Types
mlb_pitch_types()mlb_pitch_types()
Returns a tibble with the following columns
| col_name | types | description |
| pitch_type_code | character | Short code identifying the pitch type (e.g. 'FA'). |
| pitch_type_description | character | Full name of the pitch type (e.g. 'Fastball'). |
try(mlb_pitch_types())try(mlb_pitch_types())
Find MLB Player Game Stats
mlb_player_game_stats(person_id = NULL, game_pk = NULL)mlb_player_game_stats(person_id = NULL, game_pk = NULL)
person_id |
MLBAMIDs for player of interest. |
game_pk |
The game_pk to return game_log statistics for a specific player in a specific game and to complete the call. |
Returns a tibble with one row per stat group (fielding, hitting, pitching) for the player in the game, with the following columns:
| col_name | types | description |
| type | character | Stat type returned (e.g. 'gameLog'). |
| group | character | Stat group: fielding, hitting, or pitching. |
| caught_stealing | integer | Runners caught stealing. |
| stolen_bases | integer | Stolen bases. |
| stolen_base_percentage | character | Stolen base success rate. |
| caught_stealing_percentage | character | Caught-stealing rate (catcher fielding). |
| assists | integer | Fielding assists. |
| put_outs | integer | Fielding putouts. |
| errors | integer | Fielding errors. |
| chances | integer | Total fielding chances. |
| fielding | character | Fielding percentage. |
| passed_ball | integer | Passed balls (catcher). |
| pickoffs | integer | Pickoffs. |
| summary | character | Text summary line of the player's game. |
| games_played | integer | Games played. |
| games_started | integer | Games started. |
| fly_outs | integer | Fly-ball outs. |
| ground_outs | integer | Ground-ball outs. |
| air_outs | integer | Air outs (fly outs + line outs + pop outs). |
| runs | integer | Runs. |
| doubles | integer | Doubles. |
| triples | integer | Triples. |
| home_runs | integer | Home runs. |
| strike_outs | integer | Strikeouts. |
| base_on_balls | integer | Walks. |
| intentional_walks | integer | Intentional walks. |
| hits | integer | Hits. |
| hit_by_pitch | integer | Hit by pitch. |
| at_bats | integer | At-bats. |
| number_of_pitches | integer | Number of pitches seen or thrown. |
| innings_pitched | character | Innings pitched. |
| wins | integer | Pitcher wins. |
| losses | integer | Pitcher losses. |
| saves | integer | Saves. |
| save_opportunities | integer | Save opportunities. |
| holds | integer | Holds. |
| blown_saves | integer | Blown saves. |
| earned_runs | integer | Earned runs allowed. |
| batters_faced | integer | Batters faced. |
| outs | integer | Outs recorded. |
| games_pitched | integer | Games pitched. |
| complete_games | integer | Complete games. |
| shutouts | integer | Shutouts. |
| pitches_thrown | integer | Pitches thrown. |
| balls | integer | Balls thrown. |
| strikes | integer | Strikes thrown. |
| strike_percentage | character | Share of pitches that were strikes. |
| hit_batsmen | integer | Batters hit by pitch (pitcher). |
| balks | integer | Balks. |
| wild_pitches | integer | Wild pitches. |
| rbi | integer | Runs batted in. |
| games_finished | integer | Games finished. |
| runs_scored_per9 | character | Runs scored per nine innings. |
| home_runs_per9 | character | Home runs allowed per nine innings. |
| inherited_runners | integer | Inherited runners. |
| inherited_runners_scored | integer | Inherited runners who scored. |
| catchers_interference | integer | Catcher's interference. |
| sac_bunts | integer | Sacrifice bunts. |
| sac_flies | integer | Sacrifice flies. |
| ground_into_double_play | integer | Grounded into double plays. |
| ground_into_triple_play | integer | Grounded into triple plays. |
| plate_appearances | integer | Plate appearances. |
| total_bases | integer | Total bases. |
| left_on_base | integer | Runners left on base. |
| at_bats_per_home_run | character | At-bats per home run. |
| total_splits | integer | Number of stat splits returned. |
| type_display_name | character | Display name of the stat type. |
| group_display_name | character | Display name of the stat group. |
| player_id | numeric | MLBAM player ID supplied in the request. |
| game_pk | numeric | Game ID supplied in the request. |
try(mlb_player_game_stats(person_id = 605151, game_pk = 531368))try(mlb_player_game_stats(person_id = 605151, game_pk = 531368))
Find MLB Player Game Stats - Current Game
mlb_player_game_stats_current(person_id = NULL)mlb_player_game_stats_current(person_id = NULL)
person_id |
MLBAMIDs for player of interest. |
Returns a tibble with the following columns:
| col_name | types |
| type | character |
| group | character |
| stat_assists | integer |
| stat_put_outs | integer |
| stat_errors | integer |
| stat_chances | integer |
| stat_fielding | character |
| stat_caught_stealing | integer |
| stat_passed_ball | integer |
| stat_stolen_bases | integer |
| stat_stolen_base_percentage | character |
| stat_pickoffs | integer |
| stat_games_played | integer |
| stat_games_started | integer |
| stat_fly_outs | integer |
| stat_ground_outs | integer |
| stat_air_outs | integer |
| stat_runs | integer |
| stat_doubles | integer |
| stat_triples | integer |
| stat_home_runs | integer |
| stat_strike_outs | integer |
| stat_base_on_balls | integer |
| stat_intentional_walks | integer |
| stat_hits | integer |
| stat_hit_by_pitch | integer |
| stat_at_bats | integer |
| stat_number_of_pitches | integer |
| stat_innings_pitched | character |
| stat_wins | integer |
| stat_losses | integer |
| stat_saves | integer |
| stat_save_opportunities | integer |
| stat_holds | integer |
| stat_blown_saves | integer |
| stat_earned_runs | integer |
| stat_batters_faced | integer |
| stat_outs | integer |
| stat_games_pitched | integer |
| stat_complete_games | integer |
| stat_shutouts | integer |
| stat_pitches_thrown | integer |
| stat_balls | integer |
| stat_strikes | integer |
| stat_strike_percentage | character |
| stat_hit_batsmen | integer |
| stat_balks | integer |
| stat_wild_pitches | integer |
| stat_rbi | integer |
| stat_games_finished | integer |
| stat_runs_scored_per9 | character |
| stat_home_runs_per9 | character |
| stat_inherited_runners | integer |
| stat_inherited_runners_scored | integer |
| stat_catchers_interference | integer |
| stat_sac_bunts | integer |
| stat_sac_flies | integer |
| stat_ground_into_double_play | integer |
| stat_ground_into_triple_play | integer |
| stat_plate_appearances | integer |
| stat_total_bases | integer |
| stat_left_on_base | integer |
| stat_at_bats_per_home_run | character |
| game_type | character |
| num_teams | integer |
| stat_avg | character |
| stat_obp | character |
| stat_slg | character |
| stat_ops | character |
| stat_outs_pitched | integer |
| stat_whip | character |
| stat_ground_outs_to_airouts | character |
| stat_pitches_per_inning | character |
| stat_strikeout_walk_ratio | character |
| stat_strikeouts_per9inn | character |
| stat_walks_per9inn | character |
| stat_hits_per9inn | character |
| team_id | integer |
| team_name | character |
| team_link | character |
| opponent_id | integer |
| opponent_name | character |
| opponent_link | character |
| pitcher_id | integer |
| pitcher_full_name | character |
| pitcher_link | character |
| pitcher_first_name | character |
| pitcher_last_name | character |
| batter_id | integer |
| batter_full_name | character |
| batter_link | character |
| batter_first_name | character |
| batter_last_name | character |
| total_splits | integer |
| type_display_name | character |
| group_display_name | character |
| player_id | numeric |
| game_pk | numeric |
try(mlb_player_game_stats_current(person_id = 660271))try(mlb_player_game_stats_current(person_id = 660271))
MLB Player Status Codes
mlb_player_status_codes()mlb_player_status_codes()
Returns a tibble with the following columns
| col_name | types | description |
| player_status_code | character | Short code for the player status (e.g. 'A'). |
| player_status_description | character | Description of the player status (e.g. 'Active'). |
try(mlb_player_status_codes())try(mlb_player_status_codes())
MLB Positions
mlb_positions()mlb_positions()
Returns a tibble with the following columns
| col_name | types | description |
| position_short_name | character | Short position name (e.g. 'Pitcher'). |
| position_full_name | character | Full position name. |
| position_abbreviation | character | Position abbreviation (e.g. 'P', 'SS'). |
| position_code | character | Numeric scorekeeping position code. |
| position_type | character | Position category (e.g. 'Pitcher', 'Infielder'). |
| position_formal_name | character | Formal position name. |
| position_display_name | character | Display name for the position. |
| outfield | logical | Whether the position is an outfield position. |
| game_position | logical | Whether it is an on-field game position. |
| pitcher | logical | Whether the position is a pitcher. |
| fielder | logical | Whether the position is a fielder. |
try(mlb_positions())try(mlb_positions())
Retrieve probable starters for a given MLB game
mlb_probables(game_pk)mlb_probables(game_pk)
game_pk |
The unique game_pk identifier for the game |
Returns a tiible that includes probable starting pitchers and
the home plate umpire for the game_pk requested including the following columns:
| col_name | types | description |
| game_pk | integer | Unique game identifier. |
| game_date | character | Date of the game (YYYY-MM-DD). |
| fullName | character | Full name of the probable starting pitcher. |
| id | integer | MLBAM player ID of the probable starting pitcher. |
| team | character | Team name for the probable pitcher. |
| team_id | integer | MLBAM team ID for the probable pitcher. |
| home_plate_full_name | character | Full name of the home plate umpire. |
| home_plate_id | integer | MLBAM ID of the home plate umpire. |
try(mlb_probables(566001))try(mlb_probables(566001))
MLB Review Reasons
mlb_review_reasons()mlb_review_reasons()
Returns a tibble with the following columns
| col_name | types | description |
| review_reason_code | character | Short code for the replay review reason. |
| review_reason_description | character | Description of the review reason (e.g. 'Tag play'). |
try(mlb_review_reasons())try(mlb_review_reasons())
MLB Roster Types
mlb_roster_types()mlb_roster_types()
Returns a tibble with the following columns
| col_name | types | description |
| roster_type_description | character | Description of the roster type. |
| roster_type_lookup_name | character | Lookup name for the roster type. |
| roster_type_parameter | character | Parameter value to pass as roster_type in API calls.
|
try(mlb_roster_types())try(mlb_roster_types())
Find MLB Rosters by Roster Type
mlb_rosters(team_id = NULL, season = NULL, date = NULL, roster_type = NULL)mlb_rosters(team_id = NULL, season = NULL, date = NULL, roster_type = NULL)
team_id |
team_id to return team roster information for a particular club. |
season |
Year to return team roster information for a particular club in a specific season. |
date |
Date to return team roster and their coaching staff directorial information for a particular team. |
roster_type |
roster_type to return team directorial information for. See |
Returns a tibble with one row per roster member with the following
columns (player roster types). The coach roster type instead returns
job, job_id, and title columns in place of the position/status
columns:
| col_name | types | description |
| jersey_number | character | Player's uniform number. |
| person_id | integer | MLBAM player ID. |
| person_full_name | character | Player's full name. |
| person_link | character | API link to the player resource. |
| position_code | character | Numeric scorekeeping position code. |
| position_name | character | Full position name. |
| position_type | character | Position category (e.g. 'Infielder'). |
| position_abbreviation | character | Position abbreviation (e.g. 'SS'). |
| status_code | character | Roster status code (e.g. 'A'). |
| status_description | character | Roster status description (e.g. 'Active'). |
| link | character | API link to the team roster resource. |
| team_id | integer | MLBAM team ID. |
| roster_type | character | Roster type returned. |
| season | numeric | Season requested. |
| date | character | Date requested, or NA if not supplied. |
try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'active')) try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'coach'))try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'active')) try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'coach'))
MLB Runner Detail Types
mlb_runner_detail_types()mlb_runner_detail_types()
Returns a tibble with the following columns
| col_name | types | description |
| stat_name | character | Name of the runner detail stat (e.g. 'r_force_out'). |
try(mlb_runner_detail_types())try(mlb_runner_detail_types())
Find game_pk values for professional baseball games (major and minor leagues)
mlb_schedule(season = 2019, level_ids = "1")mlb_schedule(season = 2019, level_ids = "1")
season |
The season for which you want to find game_pk values for MLB games |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
level_ids |
A numeric vector with ids for each level where game_pks are desired. See below for a reference of level ids.
|
Returns a tibble which includes game_pk values and additional
information for games scheduled or played with the following columns:
| col_name | types | description |
| date | character | Calendar date for the schedule entry. |
| total_items | integer | Total schedule items on the date. |
| total_events | integer | Total non-game events on the date. |
| total_games | integer | Total games on the date. |
| total_games_in_progress | integer | Games currently in progress on the date. |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier (GUID). |
| link | character | API link to the game feed. |
| game_type | character | Game type code (e.g. 'R', 'S', 'W'). |
| season | character | Season the game belongs to. |
| game_date | character | Game date-time in UTC (ISO 8601). |
| official_date | character | Official game date (YYYY-MM-DD). |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator ('N', 'S', 'Y'). |
| gameday_type | character | Gameday data feed type. |
| tiebreaker | character | Whether the game is a tiebreaker. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display string for the season. |
| day_night | character | Day or night game indicator. |
| scheduled_innings | integer | Scheduled number of innings. |
| reverse_home_away_status | logical | Whether home/away teams are reversed. |
| inning_break_length | integer | Length of inning breaks in seconds. |
| games_in_series | integer | Number of games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Description of the series. |
| record_source | character | Source of the schedule record. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | Description of the if-necessary status. |
| status_abstract_game_state | character | Abstract game state (e.g. 'Final'). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state (e.g. 'Cancelled'). |
| status_status_code | character | Status code for the game. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_reason | character | Reason for the game status (e.g. 'Rain'). |
| status_abstract_game_code | character | Abstract game state code. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team's series number. |
| teams_away_team_id | integer | Away team MLBAM ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | API link to the away team. |
| teams_away_league_record_wins | integer | Away team league-record wins. |
| teams_away_league_record_losses | integer | Away team league-record losses. |
| teams_away_league_record_ties | integer | Away team league-record ties. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team's series number. |
| teams_home_team_id | integer | Home team MLBAM ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | API link to the home team. |
| teams_home_league_record_wins | integer | Home team league-record wins. |
| teams_home_league_record_losses | integer | Home team league-record losses. |
| teams_home_league_record_ties | integer | Home team league-record ties. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| venue_id | integer | MLBAM venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | API link to the venue. |
| content_link | character | API link to the game content. |
| is_tie | logical | Whether the game ended in a tie. |
| description | character | Game description (often for exhibition games). |
| teams_away_score | integer | Away team final score. |
| teams_away_is_winner | logical | Whether the away team won. |
| teams_home_score | integer | Home team final score. |
| teams_home_is_winner | logical | Whether the home team won. |
| reschedule_date | character | Reschedule date-time, if rescheduled. |
| reschedule_game_date | character | Reschedule game date, if rescheduled. |
| rescheduled_from | character | Original date-time the game was rescheduled from. |
| rescheduled_from_date | character | Original date the game was rescheduled from. |
| resume_date | character | Resume date-time, if suspended/resumed. |
| resume_game_date | character | Resume game date, if suspended/resumed. |
| resumed_from | character | Date-time the game was resumed from. |
| resumed_from_date | character | Date the game was resumed from. |
| events | list | Nested list of non-game events. |
The following IDs can be passed to the level_ids argument:
1 = MLB
11 = Triple-A
12 = Doubl-A
13 = Class A Advanced
14 = Class A
15 = Class A Short Season
5442 = Rookie Advanced
16 = Rookie
17 = Winter League
try(mlb_schedule(season = "2019"))try(mlb_schedule(season = "2019"))
mlb_schedule(): Find game_pk values for professional baseball games (major and minor leagues).
mlb_schedule_postseason(): Find game_pk values for professional baseball postseason games (major and minor leagues).
mlb_schedule_postseason_series(): Find game_pk values for professional baseball postseason series games (major and minor leagues).
mlb_schedule_games_tied(): Find game_pk values for professional baseball games (major and minor leagues) that are tied.
mlb_schedule_event_types(): MLB Schedule Event Types.
These functions retrieve MLB schedule, postseason, tied-game, and event-type information from the MLB Stats API.
MLB Schedule Event Types
mlb_schedule_event_types()mlb_schedule_event_types()
Returns a tibble with the following columns
| col_name | types | description |
| schedule_event_type_code | character | Short code for the schedule event type. |
| schedule_event_type_name | character | Name of the event type (e.g. 'All-Star Weekend Event'). |
try(mlb_schedule_event_types())try(mlb_schedule_event_types())
Find game_pk values for professional baseball games (major and minor leagues) that are tied
mlb_schedule_games_tied(season = 2021, game_type = "S")mlb_schedule_games_tied(season = 2021, game_type = "S")
season |
The season for which you want to find game_pk values for MLB games |
||||||||||||||||||||||||||
game_type |
game_type to return schedule information for all tied games in a particular game_type
|
Returns a tibble that includes game_pk values and additional information for games scheduled or played
| col_name | types | description |
| date | character | Calendar date for the schedule entry. |
| total_items | integer | Total schedule items on the date. |
| total_events | integer | Total non-game events on the date. |
| total_games | integer | Total games on the date. |
| total_games_in_progress | integer | Games currently in progress on the date. |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier (GUID). |
| link | character | API link to the game feed. |
| game_type | character | Game type code (e.g. 'R', 'S'). |
| season | character | Season the game belongs to. |
| game_date | character | Game date-time in UTC (ISO 8601). |
| official_date | character | Official game date (YYYY-MM-DD). |
| is_tie | logical | Whether the game ended in a tie. |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator ('N', 'S', 'Y'). |
| gameday_type | character | Gameday data feed type. |
| tiebreaker | character | Whether the game is a tiebreaker. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display string for the season. |
| day_night | character | Day or night game indicator. |
| scheduled_innings | integer | Scheduled number of innings. |
| reverse_home_away_status | logical | Whether home/away teams are reversed. |
| games_in_series | integer | Number of games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Description of the series. |
| record_source | character | Source of the schedule record. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | Description of the if-necessary status. |
| status_abstract_game_state | character | Abstract game state (e.g. 'Final'). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state. |
| status_status_code | character | Status code for the game. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_reason | character | Reason for the game status (e.g. 'Tied'). |
| status_abstract_game_code | character | Abstract game state code. |
| teams_away_score | integer | Away team score. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team's series number. |
| teams_away_team_id | integer | Away team MLBAM ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | API link to the away team. |
| teams_away_league_record_wins | integer | Away team league-record wins. |
| teams_away_league_record_losses | integer | Away team league-record losses. |
| teams_away_league_record_ties | integer | Away team league-record ties. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_home_score | integer | Home team score. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team's series number. |
| teams_home_team_id | integer | Home team MLBAM ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | API link to the home team. |
| teams_home_league_record_wins | integer | Home team league-record wins. |
| teams_home_league_record_losses | integer | Home team league-record losses. |
| teams_home_league_record_ties | integer | Home team league-record ties. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| venue_id | integer | MLBAM venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | API link to the venue. |
| content_link | character | API link to the game content. |
| inning_break_length | integer | Length of inning breaks in seconds. |
| events | list | Nested list of non-game events. |
try(mlb_schedule_games_tied(season = 2021))try(mlb_schedule_games_tied(season = 2021))
Find game_pk values for professional baseball postseason games (major and minor leagues)
mlb_schedule_postseason( season = 2021, game_type = NULL, series_number = NULL, sport_id = 1, team_id = NULL )mlb_schedule_postseason( season = 2021, game_type = NULL, series_number = NULL, sport_id = 1, team_id = NULL )
season |
The season for which you want to find game_pk values for MLB games |
||||||||||||||||||||||||||
game_type |
game_type to return schedule information for all tied games in a particular game_type |
||||||||||||||||||||||||||
series_number |
The Series number to return schedule information for all tied games in a particular series number |
||||||||||||||||||||||||||
sport_id |
The sport_id to return schedule information for. |
||||||||||||||||||||||||||
team_id |
The team_id to return schedule information for.
|
Returns a tibble that includes game_pk values and additional information for games scheduled or played
| col_name | types | description |
| date | character | Calendar date for the schedule entry. |
| total_items | integer | Total schedule items on the date. |
| total_events | integer | Total non-game events on the date. |
| total_games | integer | Total games on the date. |
| total_games_in_progress | integer | Games currently in progress on the date. |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier (GUID). |
| link | character | API link to the game feed. |
| game_type | character | Postseason game type code (e.g. 'F', 'D', 'W'). |
| season | character | Season the game belongs to. |
| game_date | character | Game date-time in UTC (ISO 8601). |
| official_date | character | Official game date (YYYY-MM-DD). |
| is_tie | logical | Whether the game ended in a tie. |
| is_featured_game | logical | Whether the game is a featured game. |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator ('N', 'S', 'Y'). |
| gameday_type | character | Gameday data feed type. |
| tiebreaker | character | Whether the game is a tiebreaker. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display string for the season. |
| day_night | character | Day or night game indicator. |
| description | character | Series/round description (e.g. 'AL Wild Card Game'). |
| scheduled_innings | integer | Scheduled number of innings. |
| reverse_home_away_status | logical | Whether home/away teams are reversed. |
| games_in_series | integer | Number of games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Description of the series. |
| record_source | character | Source of the schedule record. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | Description of the if-necessary status. |
| status_abstract_game_state | character | Abstract game state (e.g. 'Final'). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state. |
| status_status_code | character | Status code for the game. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_abstract_game_code | character | Abstract game state code. |
| teams_away_score | integer | Away team score. |
| teams_away_is_winner | logical | Whether the away team won. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team's series number. |
| teams_away_team_id | integer | Away team MLBAM ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | API link to the away team. |
| teams_away_league_record_wins | integer | Away team series-record wins. |
| teams_away_league_record_losses | integer | Away team series-record losses. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_home_score | integer | Home team score. |
| teams_home_is_winner | logical | Whether the home team won. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team's series number. |
| teams_home_team_id | integer | Home team MLBAM ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | API link to the home team. |
| teams_home_league_record_wins | integer | Home team series-record wins. |
| teams_home_league_record_losses | integer | Home team series-record losses. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| venue_id | integer | MLBAM venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | API link to the venue. |
| content_link | character | API link to the game content. |
| inning_break_length | integer | Length of inning breaks in seconds. |
| reschedule_date | character | Reschedule date-time, if rescheduled. |
| reschedule_game_date | character | Reschedule game date, if rescheduled. |
| status_reason | character | Reason for the game status (e.g. 'Rain'). |
| rescheduled_from | character | Original date-time the game was rescheduled from. |
| rescheduled_from_date | character | Original date the game was rescheduled from. |
| events | list | Nested list of non-game events. |
try(mlb_schedule_postseason(season = 2021))try(mlb_schedule_postseason(season = 2021))
Find game_pk values for professional baseball postseason series games (major and minor leagues)
mlb_schedule_postseason_series( season = 2021, game_type = NULL, series_number = NULL, sport_id = 1, team_id = NULL )mlb_schedule_postseason_series( season = 2021, game_type = NULL, series_number = NULL, sport_id = 1, team_id = NULL )
season |
The season for which you want to find game_pk values for MLB games |
||||||||||||||||||||||||||
game_type |
game_type to return schedule information for all tied games in a particular game_type |
||||||||||||||||||||||||||
series_number |
The Series number to return schedule information for all tied games in a particular series number |
||||||||||||||||||||||||||
sport_id |
The sport_id to return schedule information for. |
||||||||||||||||||||||||||
team_id |
The team_id to return schedule information for.
|
Returns a tibble that includes game_pk values and additional information for games scheduled or played
| col_name | types | description |
| total_items | integer | Total games in the series. |
| total_games | integer | Total games in the series. |
| total_games_in_progress | integer | Games currently in progress. |
| game_pk | integer | Unique game identifier. |
| game_guid | character | Globally unique game identifier (GUID). |
| link | character | API link to the game feed. |
| game_type | character | Postseason game type code (e.g. 'W', 'L', 'D'). |
| season | character | Season the game belongs to. |
| game_date | character | Game date-time in UTC (ISO 8601). |
| official_date | character | Official game date (YYYY-MM-DD). |
| is_tie | logical | Whether the game ended in a tie. |
| is_featured_game | logical | Whether the game is a featured game. |
| game_number | integer | Game number within a doubleheader. |
| public_facing | logical | Whether the game is public-facing. |
| double_header | character | Doubleheader indicator ('N', 'S', 'Y'). |
| gameday_type | character | Gameday data feed type. |
| tiebreaker | character | Whether the game is a tiebreaker. |
| calendar_event_id | character | Calendar event identifier. |
| season_display | character | Display string for the season. |
| day_night | character | Day or night game indicator. |
| description | character | Series/game description (e.g. 'World Series Game 1'). |
| scheduled_innings | integer | Scheduled number of innings. |
| reverse_home_away_status | logical | Whether home/away teams are reversed. |
| inning_break_length | integer | Length of inning breaks in seconds. |
| games_in_series | integer | Number of games in the series. |
| series_game_number | integer | Game number within the series. |
| series_description | character | Description of the series. |
| record_source | character | Source of the schedule record. |
| if_necessary | character | Whether the game is played only if necessary. |
| if_necessary_description | character | Description of the if-necessary status. |
| status_abstract_game_state | character | Abstract game state (e.g. 'Final'). |
| status_coded_game_state | character | Coded game state. |
| status_detailed_state | character | Detailed game state. |
| status_status_code | character | Status code for the game. |
| status_start_time_tbd | logical | Whether the start time is TBD. |
| status_abstract_game_code | character | Abstract game state code. |
| teams_away_score | integer | Away team score. |
| teams_away_is_winner | logical | Whether the away team won. |
| teams_away_split_squad | logical | Whether the away team is a split squad. |
| teams_away_series_number | integer | Away team's series number. |
| teams_away_team_id | integer | Away team MLBAM ID. |
| teams_away_team_name | character | Away team name. |
| teams_away_team_link | character | API link to the away team. |
| teams_away_league_record_wins | integer | Away team series-record wins. |
| teams_away_league_record_losses | integer | Away team series-record losses. |
| teams_away_league_record_pct | character | Away team winning percentage. |
| teams_home_score | integer | Home team score. |
| teams_home_is_winner | logical | Whether the home team won. |
| teams_home_split_squad | logical | Whether the home team is a split squad. |
| teams_home_series_number | integer | Home team's series number. |
| teams_home_team_id | integer | Home team MLBAM ID. |
| teams_home_team_name | character | Home team name. |
| teams_home_team_link | character | API link to the home team. |
| teams_home_league_record_wins | integer | Home team series-record wins. |
| teams_home_league_record_losses | integer | Home team series-record losses. |
| teams_home_league_record_pct | character | Home team winning percentage. |
| venue_id | integer | MLBAM venue ID. |
| venue_name | character | Venue name. |
| venue_link | character | API link to the venue. |
| content_link | character | API link to the game content. |
| reschedule_date | character | Reschedule date-time, if rescheduled. |
| reschedule_game_date | character | Reschedule game date, if rescheduled. |
| rescheduled_from | character | Original date-time the game was rescheduled from. |
| rescheduled_from_date | character | Original date the game was rescheduled from. |
| status_reason | character | Reason for the game status (e.g. 'Rain'). |
| sort_order | integer | Sort order within the series listing. |
| series_id | character | Series identifier (e.g. 'W_1'). |
| series_sort_number | integer | Sort number for the series. |
| series_is_default | logical | Whether the series is the default series. |
| series_game_type | character | Game type code for the series. |
try(mlb_schedule_postseason_series(season = 2021, sport_id = 1))try(mlb_schedule_postseason_series(season = 2021, sport_id = 1))
Find MLB Seasons
mlb_seasons(sport_id = 1, with_game_type_dates = TRUE)mlb_seasons(sport_id = 1, with_game_type_dates = TRUE)
sport_id |
The sport_id to return season information for. |
with_game_type_dates |
with_game_type_dates to return season information |
Returns a tibble with the following columns:
| col_name | types | description |
| season_id | character | Season year identifier. |
| has_wildcard | logical | Whether the season has a wild card round. |
| pre_season_start_date | character | Pre-season start date. |
| pre_season_end_date | character | Pre-season end date. |
| season_start_date | character | Season start date. |
| spring_start_date | character | Spring training start date. |
| spring_end_date | character | Spring training end date. |
| regular_season_start_date | character | Regular season start date. |
| last_date1st_half | character | Last date of the first half. |
| all_star_date | character | All-Star Game date. |
| first_date2nd_half | character | First date of the second half. |
| regular_season_end_date | character | Regular season end date. |
| post_season_start_date | character | Post-season start date. |
| post_season_end_date | character | Post-season end date. |
| season_end_date | character | Season end date. |
| offseason_start_date | character | Off-season start date. |
| off_season_end_date | character | Off-season end date. |
| season_level_gameday_type | character | Season-level Gameday data feed type. |
| game_level_gameday_type | character | Game-level Gameday data feed type. |
| qualifier_plate_appearances | numeric | Plate appearances per team game to qualify. |
| qualifier_outs_pitched | integer | Outs pitched per team game to qualify. |
try(mlb_seasons(sport_id = 1))try(mlb_seasons(sport_id = 1))
Find MLB Seasons all
mlb_seasons_all( sport_id = 1, division_id = NULL, league_id = NULL, with_game_type_dates = TRUE )mlb_seasons_all( sport_id = 1, division_id = NULL, league_id = NULL, with_game_type_dates = TRUE )
sport_id |
The sport_id to return season information for. |
division_id |
The division_id to return season information for. |
league_id |
The league_id to return season information for. |
with_game_type_dates |
with_game_type_dates to return season information for. |
Returns a tibble with the following columns:
| col_name | types | description |
| season_id | character | Season year identifier. |
| has_wildcard | logical | Whether the season has a wild card round. |
| pre_season_start_date | character | Pre-season start date. |
| season_start_date | character | Season start date. |
| regular_season_start_date | character | Regular season start date. |
| regular_season_end_date | character | Regular season end date. |
| season_end_date | character | Season end date. |
| offseason_start_date | character | Off-season start date. |
| off_season_end_date | character | Off-season end date. |
| season_level_gameday_type | character | Season-level Gameday data feed type. |
| game_level_gameday_type | character | Game-level Gameday data feed type. |
| qualifier_plate_appearances | numeric | Plate appearances per team game to qualify. |
| qualifier_outs_pitched | integer | Outs pitched per team game to qualify. |
| post_season_start_date | character | Post-season start date. |
| post_season_end_date | character | Post-season end date. |
| last_date1st_half | character | Last date of the first half. |
| all_star_date | character | All-Star Game date. |
| first_date2nd_half | character | First date of the second half. |
| pre_season_end_date | character | Pre-season end date. |
| spring_start_date | character | Spring training start date. |
| spring_end_date | character | Spring training end date. |
try(mlb_seasons_all(sport_id = 1))try(mlb_seasons_all(sport_id = 1))
MLB Situation Codes
mlb_situation_codes()mlb_situation_codes()
Returns a tibble with the following columns
| col_name | types | description |
| situation_code | character | Code identifying the game situation. |
| sort_order | integer | Display sort order for the situation code. |
| navigation_menu | character | Navigation menu grouping (e.g. 'Game'). |
| situation_code_description | character | Description of the situation (e.g. 'Home Games'). |
| team | logical | Whether the situation applies to team stats. |
| batting | logical | Whether the situation applies to batting stats. |
| fielding | logical | Whether the situation applies to fielding stats. |
| pitching | logical | Whether the situation applies to pitching stats. |
try(mlb_situation_codes())try(mlb_situation_codes())
MLB Sky (Weather) Codes
mlb_sky()mlb_sky()
Returns a tibble with the following columns
| col_name | types | description |
| sky_code | character | Code for the sky/weather condition. |
| sky_description | character | Description of the sky condition (e.g. 'Clear'). |
try(mlb_sky())try(mlb_sky())
MLB Sport IDs
mlb_sports(sport_id = NULL)mlb_sports(sport_id = NULL)
sport_id |
The sport_id to return information for. |
Returns a tibble with the following columns
| col_name | types | description |
| sport_id | integer | MLBAM sport (level) identifier. |
| sport_code | character | Short sport code (e.g. 'mlb', 'aaa'). |
| sport_link | character | API link to the sport resource. |
| sport_name | character | Full sport/level name. |
| sport_abbreviation | character | Sport abbreviation (e.g. 'MLB'). |
| sort_order | integer | Display sort order for the sport. |
| active_status | logical | Whether the sport/level is active. |
and the following values:
| sport_id | sport_code | sport_link | sport_name | sport_abbreviation | sort_order | active_status |
| 1 | mlb | /api/v1/sports/1 | Major League Baseball | MLB | 11 | TRUE |
| 11 | aaa | /api/v1/sports/11 | Triple-A | AAA | 101 | TRUE |
| 12 | aax | /api/v1/sports/12 | Double-A | AA | 201 | TRUE |
| 13 | afa | /api/v1/sports/13 | High-A | A+ | 301 | TRUE |
| 14 | afx | /api/v1/sports/14 | Low-A | A | 401 | TRUE |
| 16 | rok | /api/v1/sports/16 | Rookie | ROK | 701 | TRUE |
| 17 | win | /api/v1/sports/17 | Winter Leagues | WIN | 1301 | TRUE |
| 8 | bbl | /api/v1/sports/8 | Organized Baseball | Pros | 1401 | TRUE |
| 21 | min | /api/v1/sports/21 | Minor League Baseball | Minors | 1402 | TRUE |
| 23 | ind | /api/v1/sports/23 | Independent Leagues | IND | 2101 | TRUE |
| 51 | int | /api/v1/sports/51 | International Baseball | INT | 3501 | TRUE |
| 508 | nat | /api/v1/sports/508 | International Baseball (Collegiate) | INTC | 3502 | TRUE |
| 509 | nae | /api/v1/sports/509 | International Baseball (18 and under) | 18U | 3503 | TRUE |
| 510 | nas | /api/v1/sports/510 | International Baseball (16 and under) | 16U | 3505 | TRUE |
| 22 | bbc | /api/v1/sports/22 | College Baseball | College | 5101 | TRUE |
| 586 | hsb | /api/v1/sports/586 | High School Baseball | H.S. | 6201 | TRUE |
try(mlb_sports())try(mlb_sports())
MLB Sport IDs Information
mlb_sports_info(sport_id = 1)mlb_sports_info(sport_id = 1)
sport_id |
The sport_id to return information for. |
Returns a tibble with the following columns
| col_name | types | description |
| sport_id | integer | MLBAM sport (level) identifier. |
| sport_code | character | Short sport code (e.g. 'mlb', 'aaa'). |
| sport_link | character | API link to the sport resource. |
| sport_name | character | Full sport/level name. |
| sport_abbreviation | character | Sport abbreviation (e.g. 'MLB'). |
| sort_order | integer | Display sort order for the sport. |
| active_status | logical | Whether the sport/level is active. |
try(mlb_sports_info(sport_id = 1))try(mlb_sports_info(sport_id = 1))
MLB Sport Players
mlb_sports_players(sport_id = 1, season = 2021)mlb_sports_players(sport_id = 1, season = 2021)
sport_id |
The sport_id to return information for. |
season |
The season to return information for. |
Returns a tibble with the following columns:
| col_name | types | description |
| player_id | integer | MLBAM player ID. |
| full_name | character | Player full name. |
| link | character | API link to the player resource. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Primary uniform number. |
| birth_date | character | Date of birth (YYYY-MM-DD). |
| current_age | integer | Current age in years. |
| birth_city | character | City of birth. |
| birth_country | character | Country of birth. |
| height | character | Listed height (feet and inches). |
| weight | integer | Listed weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Preferred first name for display. |
| use_last_name | character | Preferred last name for display. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Name as shown in box scores. |
| nick_name | character | Player nickname. |
| gender | character | Player gender code. |
| is_player | logical | Whether the person is a player. |
| is_verified | logical | Whether the profile is verified. |
| pronunciation | character | Phonetic pronunciation of the name. |
| mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Name in first-last order. |
| name_slug | character | URL slug for the player. |
| first_last_name | character | First and last name display. |
| last_first_name | character | Last, first name display. |
| last_init_name | character | Last name with first initial. |
| init_last_name | character | First initial with last name. |
| full_fml_name | character | Full first-middle-last name. |
| full_lfm_name | character | Full last-first-middle name. |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| birth_state_province | character | State or province of birth. |
| draft_year | integer | Year the player was drafted. |
| name_matrilineal | character | Matrilineal (maternal) surname. |
| last_played_date | character | Date of last MLB appearance. |
| name_title | character | Name title prefix. |
| name_suffix | character | Name suffix (e.g., Jr., III). |
| death_date | character | Date of death (YYYY-MM-DD). |
| death_city | character | City of death. |
| death_country | character | Country of death. |
| current_team_id | integer | Current team MLBAM ID. |
| current_team_name | character | Current team name. |
| current_team_link | character | API link to the current team. |
| primary_position_code | character | Primary position code. |
| primary_position_name | character | Primary position name. |
| primary_position_type | character | Primary position type. |
| primary_position_abbreviation | character | Primary position abbreviation. |
| bat_side_code | character | Batting side code (L/R/S). |
| bat_side_description | character | Batting side description. |
| pitch_hand_code | character | Throwing hand code (L/R). |
| pitch_hand_description | character | Throwing hand description. |
try(mlb_sports_players(sport_id = 1, season = 2021))try(mlb_sports_players(sport_id = 1, season = 2021))
MLB Standings
mlb_standings( season = NULL, date = NULL, standings_type = NULL, league_id = NULL )mlb_standings( season = NULL, date = NULL, standings_type = NULL, league_id = NULL )
season |
Year(s) to return to return standings information for. |
date |
Date to return to return standings information for. |
standings_type |
The standings_type(s) to return standings information for. Description of all standings_types
|
league_id |
The league_id(s) to return standings information for. |
Returns a tibble with the following columns
| col_name | types | description |
| standings_type | character | Type of standings returned (e.g., regularSeason). |
| last_updated | character | Timestamp the standings record was last updated. |
| team_records_season | character | Season for the team record. |
| team_records_clinch_indicator | character | Clinch status indicator code. |
| team_records_division_rank | character | Rank within the division. |
| team_records_league_rank | character | Rank within the league. |
| team_records_sport_rank | character | Rank across the sport. |
| team_records_games_played | integer | Games played. |
| team_records_games_back | character | Games back of the division leader. |
| team_records_wild_card_games_back | character | Games back of the wild card. |
| team_records_league_games_back | character | Games back within the league. |
| team_records_spring_league_games_back | character | Games back within the spring league. |
| team_records_sport_games_back | character | Games back across the sport. |
| team_records_division_games_back | character | Games back within the division. |
| team_records_conference_games_back | character | Games back within the conference. |
| team_records_last_updated | character | Timestamp the team record was last updated. |
| team_records_runs_allowed | integer | Total runs allowed. |
| team_records_runs_scored | integer | Total runs scored. |
| team_records_division_champ | logical | Whether the team clinched the division. |
| team_records_division_leader | logical | Whether the team leads its division. |
| team_records_has_wildcard | logical | Whether the team holds a wild card spot. |
| team_records_clinched | logical | Whether the team has clinched a playoff berth. |
| team_records_elimination_number | character | Overall elimination number. |
| team_records_elimination_number_sport | character | Elimination number across the sport. |
| team_records_elimination_number_league | character | Elimination number within the league. |
| team_records_elimination_number_division | character | Elimination number within the division. |
| team_records_elimination_number_conference | character | Elimination number within the conference. |
| team_records_wild_card_elimination_number | character | Wild card elimination number. |
| team_records_magic_number | character | Magic number to clinch. |
| team_records_wins | integer | Total wins. |
| team_records_losses | integer | Total losses. |
| team_records_run_differential | integer | Run differential (runs scored minus allowed). |
| team_records_winning_percentage | character | Winning percentage. |
| team_records_wild_card_rank | character | Rank in the wild card race. |
| team_records_wild_card_leader | logical | Whether the team leads the wild card race. |
| team_records_team_id | integer | Team MLBAM ID. |
| team_records_team_name | character | Team name. |
| team_records_team_link | character | API link to the team. |
| team_records_streak_streak_code | character | Current streak code (e.g., W3, L1). |
| team_records_streak_streak_type | character | Streak type (wins or losses). |
| team_records_streak_streak_number | integer | Length of the current streak. |
| team_records_league_record_wins | integer | Wins in league play. |
| team_records_league_record_losses | integer | Losses in league play. |
| team_records_league_record_ties | integer | Ties in league play. |
| team_records_league_record_pct | character | League play winning percentage. |
| team_records_records_split_records | list | Nested split records (home/away/etc.). |
| team_records_records_division_records | list | Nested records by division. |
| team_records_records_overall_records | list | Nested overall records. |
| team_records_records_league_records | list | Nested records by league. |
| team_records_records_expected_records | list | Nested expected (Pythagorean) records. |
| league_id | integer | League MLBAM ID. |
| league_link | character | API link to the league. |
| division_id | integer | Division MLBAM ID. |
| division_link | character | API link to the division. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| round_robin_status | character | Round robin status indicator. |
try(mlb_standings(season = 2021, league_id = 103))try(mlb_standings(season = 2021, league_id = 103))
MLB Standings Types
mlb_standings_types()mlb_standings_types()
Returns a tibble with the following columns
| col_name | types | description |
| standings_type_name | character | Standings type identifier (e.g., wildCard). |
| standings_type_description | character | Human-readable description of the type. |
try(mlb_standings_types())try(mlb_standings_types())
MLB Stat Groups
mlb_stat_groups()mlb_stat_groups()
Returns a tibble with the following columns
| col_name | types | description |
| stat_group_name | character | Stat group display name (e.g., hitting). |
try(mlb_stat_groups())try(mlb_stat_groups())
MLB Stat Types
mlb_stat_types()mlb_stat_types()
Returns a tibble with the following columns
| col_name | types | description |
| stat_type_name | character | Stat type display name (e.g., projected). |
try(mlb_stat_types())try(mlb_stat_types())
MLB Stats
mlb_stats( stat_type = NULL, player_pool = NULL, game_type = NULL, team_id = NULL, position = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_ids = NULL, sort_stat = NULL, order = NULL, limit = 1000, offset = NULL )mlb_stats( stat_type = NULL, player_pool = NULL, game_type = NULL, team_id = NULL, position = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_ids = NULL, sort_stat = NULL, order = NULL, limit = 1000, offset = NULL )
stat_type |
Stat type to return statistics for. |
player_pool |
There are 4 different types of player pools to return statistics for a particular player pool across a sport. Acceptable values include: All, Qualified, Rookies, or Qualified_rookies |
game_type |
Game type to return information for a particular statistic in a particular game type. |
team_id |
Team ID to return information and ranking for a particular statistic for a particular team. |
position |
Position to return statistics for a given position. Default to "Qualified" player pool Acceptable values include:
|
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
league_id |
League ID to return statistics for a given league. Default to "Qualified" player pool. |
sport_ids |
The sport_id(s) to return information and ranking information for. |
sort_stat |
Sort return based on stat. |
order |
Order return based on either desc or asc. |
limit |
A limit to limit return to a particular number of records. |
offset |
An offset to returns i+1 as the first record in the set of players. |
Returns a tibble with the following columns
| col_name | types | description |
| total_splits | integer | Total number of splits in the response. |
| season | character | Season year for the statistic. |
| num_teams | integer | Number of teams the player appeared for. |
| rank | integer | Rank of the player for the sorted statistic. |
| age | integer | Player age during the season. |
| games_played | integer | Games played. |
| ground_outs | integer | Ground outs. |
| air_outs | integer | Air outs (fly outs). |
| runs | integer | Runs scored. |
| doubles | integer | Doubles. |
| triples | integer | Triples. |
| home_runs | integer | Home runs. |
| strike_outs | integer | Strikeouts. |
| base_on_balls | integer | Walks (bases on balls). |
| intentional_walks | integer | Intentional walks. |
| hits | integer | Hits. |
| hit_by_pitch | integer | Times hit by pitch. |
| avg | character | Batting average. |
| at_bats | integer | At bats. |
| obp | character | On-base percentage. |
| slg | character | Slugging percentage. |
| ops | character | On-base plus slugging. |
| caught_stealing | integer | Times caught stealing. |
| stolen_bases | integer | Stolen bases. |
| stolen_base_percentage | character | Stolen base success percentage. |
| caught_stealing_percentage | character | Caught stealing percentage. |
| ground_into_double_play | integer | Grounded into double plays. |
| number_of_pitches | integer | Total pitches seen. |
| plate_appearances | integer | Plate appearances. |
| total_bases | integer | Total bases. |
| rbi | integer | Runs batted in. |
| left_on_base | integer | Runners left on base. |
| sac_bunts | integer | Sacrifice bunts. |
| sac_flies | integer | Sacrifice flies. |
| babip | character | Batting average on balls in play. |
| ground_outs_to_airouts | character | Ratio of ground outs to air outs. |
| catchers_interference | integer | Times reached on catcher's interference. |
| at_bats_per_home_run | character | At bats per home run. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| player_id | integer | Player MLBAM ID. |
| player_full_name | character | Player full name. |
| player_link | character | API link to the player. |
| player_first_name | character | Player first name. |
| player_last_name | character | Player last name. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_abbreviation | character | Sport abbreviation (e.g., MLB). |
| position_code | character | Primary position code. |
| position_name | character | Primary position name. |
| position_type | character | Primary position type. |
| position_abbreviation | character | Primary position abbreviation. |
| splits_tied_with_offset | list | Players tied at the offset boundary. |
| splits_tied_with_limit | list | Players tied at the limit boundary. |
| player_pool | character | Player pool used (e.g., QUALIFIED). |
| type_display_name | character | Stat type display name. |
| group_display_name | character | Stat group display name. |
try(mlb_stats(stat_type = 'season', stat_group = 'hitting', season = 2021))try(mlb_stats(stat_type = 'season', stat_group = 'hitting', season = 2021))
mlb_stats(): MLB Stats.
mlb_stats_leaders(): MLB Stats Leaders.
mlb_stats_streaks(): MLB Stats Streaks.
mlb_stat_groups(): MLB Stat Groups.
mlb_stat_types(): MLB Stat Types.
mlb_baseball_stats(): MLB Baseball Stats.
These functions retrieve MLB statistics, leaders, streaks, stat groups, stat types, and baseball stat metadata from the MLB Stats API.
MLB Stats Leaders
mlb_stats_leaders( leader_categories = NULL, player_pool = NULL, leader_game_types = NULL, sit_codes = NULL, position = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_id = NULL, start_date = NULL, end_date = NULL, stat_type = NULL, limit = 1000 )mlb_stats_leaders( leader_categories = NULL, player_pool = NULL, leader_game_types = NULL, sit_codes = NULL, position = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_id = NULL, start_date = NULL, end_date = NULL, stat_type = NULL, limit = 1000 )
leader_categories |
League leader category to return information and ranking for a particular statistic. |
player_pool |
There are 4 different types of player pools to return statistics for a particular player pool across a sport. Acceptable values include: All, Qualified, Rookies, or Qualified_rookies |
leader_game_types |
Game type to return information and ranking for a particular statistic in a particular game type. |
sit_codes |
Situation code to return information and ranking for a particular statistic in a particular game type. |
position |
Position to return statistics for a given position. Default to "Qualified" player pool Acceptable values include:
|
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
league_id |
League ID to return statistics for a given league. Default to "Qualified" player pool. |
sport_id |
The sport_id to return information and ranking information for. |
start_date |
Start date to return information and ranking for a particular statistic for a particular date range. Format: MM/DD/YYYY start_date must be coupled with end_date and byDateRange stat_type |
end_date |
End date to return information and ranking for a particular statistic for a particular date range. Format: MM/DD/YYYY end_date must be coupled with start_date and byDateRange stat_type |
stat_type |
The stat_type to return information and ranking for a particular statistic for a particular stat type. |
limit |
A limit to limit return to a particular number of records. |
Returns a tibble with the following columns
| col_name | types | description |
| leader_category | character | Statistical leader category (e.g., homeRuns). |
| rank | integer | Rank within the leaderboard. |
| value | character | Statistic value for the leader. |
| season | character | Season year. |
| num_teams | integer | Number of teams the player appeared for. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| person_id | integer | Player MLBAM ID. |
| person_full_name | character | Player full name. |
| person_link | character | API link to the player. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_abbreviation | character | Sport abbreviation (e.g., MLB). |
| stat_group | character | Stat group (e.g., hitting). |
| total_splits | integer | Total number of splits in the leaderboard. |
| game_type_id | character | Game type code (e.g., R for regular season). |
| game_type_description | character | Game type description. |
try(mlb_stats_leaders(leader_categories='homeRuns',sport_id=1, season = 2021))try(mlb_stats_leaders(leader_categories='homeRuns',sport_id=1, season = 2021))
MLB Team Affiliates
mlb_team_affiliates(team_ids = NULL, sport_ids = NULL, season = NULL)mlb_team_affiliates(team_ids = NULL, sport_ids = NULL, season = NULL)
team_ids |
The team_id(s) to return affiliates data for. |
sport_ids |
The sport_id to return team affiliates information for. |
season |
The season to return team affiliates data for the particular season. |
Returns a tibble with the following columns
| col_name | types | description |
| all_star_status | character | All-star status flag. |
| team_id | integer | Team MLBAM ID. |
| team_full_name | character | Full team name. |
| link | character | API link to the team. |
| season | integer | Season year. |
| team_code | character | Internal team code. |
| file_code | character | File code abbreviation. |
| team_abbreviation | character | Team abbreviation. |
| team_name | character | Short team name. |
| location_name | character | Team location (city). |
| first_year_of_play | character | First year the franchise played. |
| short_name | character | Short display name. |
| franchise_name | character | Franchise name. |
| club_name | character | Club name. |
| active | logical | Whether the team is active. |
| parent_org_name | character | Parent organization name. |
| parent_org_id | integer | Parent organization MLBAM ID. |
| spring_league_id | integer | Spring league MLBAM ID. |
| spring_league_name | character | Spring league name. |
| spring_league_link | character | API link to the spring league. |
| spring_league_abbreviation | character | Spring league abbreviation. |
| venue_id | integer | Home venue MLBAM ID. |
| venue_name | character | Home venue name. |
| venue_link | character | API link to the venue. |
| spring_venue_id | integer | Spring training venue MLBAM ID. |
| spring_venue_link | character | API link to the spring venue. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| division_id | integer | Division MLBAM ID. |
| division_name | character | Division name. |
| division_link | character | API link to the division. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_name | character | Sport name (e.g., Major League Baseball). |
try(mlb_team_affiliates(team_ids = 147))try(mlb_team_affiliates(team_ids = 147))
MLB Team Alumni
mlb_team_alumni(team_id = NULL, stat_group = NULL, season = NULL)mlb_team_alumni(team_id = NULL, stat_group = NULL, season = NULL)
team_id |
Team ID to return information and ranking for a particular statistic for a particular team. |
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
Returns a tibble with the following columns
| col_name | types | description |
| player_id | integer | MLBAM player ID. |
| player_full_name | character | Player full name. |
| link | character | API link to the player resource. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| primary_number | character | Primary uniform number. |
| birth_date | character | Date of birth (YYYY-MM-DD). |
| current_age | integer | Current age in years. |
| birth_city | character | City of birth. |
| birth_country | character | Country of birth. |
| height | character | Listed height (feet and inches). |
| weight | integer | Listed weight in pounds. |
| active | logical | Whether the player is currently active. |
| use_name | character | Preferred first name for display. |
| use_last_name | character | Preferred last name for display. |
| middle_name | character | Player middle name. |
| boxscore_name | character | Name as shown in box scores. |
| nick_name | character | Player nickname. |
| gender | character | Player gender code. |
| name_matrilineal | character | Matrilineal (maternal) surname. |
| is_player | logical | Whether the person is a player. |
| is_verified | logical | Whether the profile is verified. |
| pronunciation | character | Phonetic pronunciation of the name. |
| last_played_date | character | Date of last MLB appearance. |
| mlb_debut_date | character | MLB debut date (YYYY-MM-DD). |
| name_first_last | character | Name in first-last order. |
| name_slug | character | URL slug for the player. |
| first_last_name | character | First and last name display. |
| last_first_name | character | Last, first name display. |
| last_init_name | character | Last name with first initial. |
| init_last_name | character | First initial with last name. |
| full_fml_name | character | Full first-middle-last name. |
| full_lfm_name | character | Full last-first-middle name. |
| strike_zone_top | numeric | Top of the player's strike zone (feet). |
| strike_zone_bottom | numeric | Bottom of the player's strike zone (feet). |
| alumni_last_season | character | Last season the player was with the team. |
| birth_state_province | character | State or province of birth. |
| draft_year | integer | Year the player was drafted. |
| primary_position_code | character | Primary position code. |
| primary_position_name | character | Primary position name. |
| primary_position_type | character | Primary position type. |
| primary_position_abbreviation | character | Primary position abbreviation. |
| bat_side_code | character | Batting side code (L/R/S). |
| bat_side_description | character | Batting side description. |
| pitch_hand_code | character | Throwing hand code (L/R). |
| pitch_hand_description | character | Throwing hand description. |
try(mlb_team_alumni(team_id = 137, stat_group = 'hitting', season = 2021))try(mlb_team_alumni(team_id = 137, stat_group = 'hitting', season = 2021))
MLB Team Coaches
mlb_team_coaches(team_id = NULL, date = NULL, season = NULL)mlb_team_coaches(team_id = NULL, date = NULL, season = NULL)
team_id |
Team ID to return team coach information for. |
date |
Date to return team coach information for. |
season |
Year to return team coach information for. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Coach uniform number. |
| job | character | Job name (e.g., Manager). |
| job_id | character | Job code identifier. |
| title | character | Full coaching title. |
| person_id | integer | Coach MLBAM person ID. |
| person_full_name | character | Coach full name. |
| person_link | character | API link to the coach. |
try(mlb_team_coaches(team_id = 137, season = 2021))try(mlb_team_coaches(team_id = 137, season = 2021))
mlb_teams(): MLB Teams.
mlb_team_info(): MLB Team Info.
mlb_team_affiliates(): MLB Team Affiliates.
mlb_team_alumni(): MLB Team Alumni.
mlb_team_coaches(): MLB Team Coaches.
mlb_team_history(): MLB Teams History.
mlb_team_leaders(): MLB Team Leaders.
mlb_team_personnel(): MLB Team Personnel.
mlb_team_stats(): MLB Team Individual Stats.
mlb_teams_stats(): MLB Teams Stats.
mlb_teams_stats_leaders(): MLB Teams Stats Leaders.
These functions retrieve MLB team, affiliate, alumni, coach, history, leader, personnel, and stats information from the MLB Stats API.
MLB Teams History
mlb_team_history(team_ids = NULL, start_season = NULL, end_season = NULL)mlb_team_history(team_ids = NULL, start_season = NULL, end_season = NULL)
team_ids |
The team_id(s) to return historical data for. |
start_season |
The start_season to return historical data for from the given year to present. |
end_season |
The end_season to return historical data for from the the creation to the given year. |
Returns a tibble with the following columns
| col_name | types | description |
| all_star_status | character | All-star status flag. |
| team_id | integer | Team MLBAM ID. |
| team_full_name | character | Full team name. |
| link | character | API link to the team. |
| season | integer | Season year for the historical record. |
| team_code | character | Internal team code. |
| file_code | character | File code abbreviation. |
| team_abbreviation | character | Team abbreviation. |
| team_name | character | Short team name. |
| location_name | character | Team location (city). |
| first_year_of_play | character | First year the franchise played. |
| short_name | character | Short display name. |
| franchise_name | character | Franchise name. |
| club_name | character | Club name. |
| active | logical | Whether the team is active. |
| venue_id | integer | Home venue MLBAM ID for that season. |
| venue_name | character | Home venue name for that season. |
| venue_link | character | API link to the venue. |
| spring_venue_id | integer | Spring training venue MLBAM ID. |
| spring_venue_link | character | API link to the spring venue. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_name | character | Sport name (e.g., Major League Baseball). |
try(mlb_team_history(team_ids = 147))try(mlb_team_history(team_ids = 147))
MLB Team Info
mlb_team_info(team_id = NULL, season = NULL, sport_id = NULL)mlb_team_info(team_id = NULL, season = NULL, sport_id = NULL)
team_id |
The team_id to return team data for. |
season |
The season to return team data for the given year. |
sport_id |
The sport_id to return a directory of team data for a particular club in a sport. |
Returns a tibble with the following columns
| col_name | types | description |
| all_star_status | character | All-star status flag. |
| team_id | integer | Team MLBAM ID. |
| team_full_name | character | Full team name. |
| link | character | API link to the team. |
| season | integer | Season year. |
| team_code | character | Internal team code. |
| file_code | character | File code abbreviation. |
| team_abbreviation | character | Team abbreviation. |
| team_name | character | Short team name. |
| location_name | character | Team location (city). |
| first_year_of_play | character | First year the franchise played. |
| short_name | character | Short display name. |
| franchise_name | character | Franchise name. |
| club_name | character | Club name. |
| active | logical | Whether the team is active. |
| spring_league_id | integer | Spring league MLBAM ID. |
| spring_league_name | character | Spring league name. |
| spring_league_link | character | API link to the spring league. |
| spring_league_abbreviation | character | Spring league abbreviation. |
| venue_id | integer | Home venue MLBAM ID. |
| venue_name | character | Home venue name. |
| venue_link | character | API link to the venue. |
| spring_venue_id | integer | Spring training venue MLBAM ID. |
| spring_venue_link | character | API link to the spring venue. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| division_id | integer | Division MLBAM ID. |
| division_name | character | Division name. |
| division_link | character | API link to the division. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_name | character | Sport name (e.g., Major League Baseball). |
try(mlb_team_info(team_id = 147))try(mlb_team_info(team_id = 147))
MLB Team Leaders
mlb_team_leaders( team_id = NULL, leader_categories = NULL, leader_game_types = NULL, season = NULL, limit = 1000 )mlb_team_leaders( team_id = NULL, leader_categories = NULL, leader_game_types = NULL, season = NULL, limit = 1000 )
team_id |
Team ID to return team leader information for. |
leader_categories |
Team leader category to return information and ranking for a particular statistic. |
leader_game_types |
Game type to return information and ranking for a particular statistic in a particular game type. |
season |
Season to return team leader information for. |
limit |
A limit to limit return to a particular number of records. |
Returns a tibble with the following columns
| col_name | types | description |
| leader_category | character | Team leader category (e.g., homeRuns). |
| rank | integer | Rank within the team leaderboard. |
| value | character | Statistic value for the leader. |
| season | character | Season year. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| person_id | integer | Player MLBAM ID. |
| person_full_name | character | Player full name. |
| person_link | character | API link to the player. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_abbreviation | character | Sport abbreviation (e.g., MLB). |
| stat_group | character | Stat group (e.g., hitting). |
| total_splits | integer | Total number of splits in the leaderboard. |
| game_type_id | character | Game type code (e.g., R for regular season). |
| game_type_description | character | Game type description. |
try(mlb_team_leaders(team_id = 137, leader_categories = "homeRuns", season = 2021))try(mlb_team_leaders(team_id = 137, leader_categories = "homeRuns", season = 2021))
MLB Team Personnel
mlb_team_personnel(team_id = NULL, date = NULL)mlb_team_personnel(team_id = NULL, date = NULL)
team_id |
Team ID to return team coach information for. |
date |
Date to return team coach information for. |
Returns a tibble with the following columns
| col_name | types | description |
| jersey_number | character | Personnel uniform number. |
| job | character | Job name (e.g., Special Assistant). |
| job_id | character | Job code identifier. |
| title | character | Full personnel title. |
| person_id | integer | Personnel MLBAM person ID. |
| person_full_name | character | Personnel full name. |
| person_link | character | API link to the person. |
try(mlb_team_personnel(team_id = 137, date = "08/28/2016"))try(mlb_team_personnel(team_id = 137, date = "08/28/2016"))
MLB Team Individual Stats
mlb_team_stats( team_id = NULL, stat_type = NULL, game_type = NULL, stat_group = NULL, season = NULL, sport_ids = NULL )mlb_team_stats( team_id = NULL, stat_type = NULL, game_type = NULL, stat_group = NULL, season = NULL, sport_ids = NULL )
team_id |
Team ID to return information and ranking for a particular statistic for a particular team. |
stat_type |
Stat type to return statistics for. |
game_type |
Game type to return information for a particular statistic in a particular game type. |
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
sport_ids |
The sport_id(s) to return information and ranking information for. |
Returns a tibble with the following columns
| col_name | types | description |
| season | character | Season year for the statistic. |
| games_played | integer | Games played. |
| ground_outs | integer | Ground outs. |
| air_outs | integer | Air outs (fly outs). |
| runs | integer | Runs scored. |
| doubles | integer | Doubles. |
| triples | integer | Triples. |
| home_runs | integer | Home runs. |
| strike_outs | integer | Strikeouts. |
| base_on_balls | integer | Walks (bases on balls). |
| intentional_walks | integer | Intentional walks. |
| hits | integer | Hits. |
| hit_by_pitch | integer | Times hit by pitch. |
| avg | character | Batting average. |
| at_bats | integer | At bats. |
| obp | character | On-base percentage. |
| slg | character | Slugging percentage. |
| ops | character | On-base plus slugging. |
| caught_stealing | integer | Times caught stealing. |
| stolen_bases | integer | Stolen bases. |
| stolen_base_percentage | character | Stolen base success percentage. |
| caught_stealing_percentage | character | Caught stealing percentage. |
| ground_into_double_play | integer | Grounded into double plays. |
| number_of_pitches | integer | Total pitches seen. |
| plate_appearances | integer | Plate appearances. |
| total_bases | integer | Total bases. |
| rbi | integer | Runs batted in. |
| left_on_base | integer | Runners left on base. |
| sac_bunts | integer | Sacrifice bunts. |
| sac_flies | integer | Sacrifice flies. |
| babip | character | Batting average on balls in play. |
| ground_outs_to_airouts | character | Ratio of ground outs to air outs. |
| catchers_interference | integer | Times reached on catcher's interference. |
| at_bats_per_home_run | character | At bats per home run. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| type_display_name | character | Stat type display name. |
| group_display_name | character | Stat group display name. |
try(mlb_team_stats(team_id = 137, stat_type = 'season', stat_group = 'hitting', season = 2021))try(mlb_team_stats(team_id = 137, stat_type = 'season', stat_group = 'hitting', season = 2021))
MLB Teams
mlb_teams( season = NULL, active_status = NULL, all_star_statuses = NULL, league_ids = NULL, sport_ids = NULL, game_type = NULL )mlb_teams( season = NULL, active_status = NULL, all_star_statuses = NULL, league_ids = NULL, sport_ids = NULL, game_type = NULL )
season |
Year to return to return team information for. |
active_status |
The active statuses to populate teams for a given season. |
all_star_statuses |
The all-star statuses to populate teams for a given season. |
league_ids |
The league_id(s) to return team information for. |
sport_ids |
The sport_id(s) to return team information for. |
game_type |
The game_type to return team information for. |
Returns a tibble with the following columns
| col_name | types | description |
| all_star_status | character | All-star status flag. |
| team_id | integer | Team MLBAM ID. |
| team_full_name | character | Full team name. |
| link | character | API link to the team. |
| season | integer | Season year. |
| team_code | character | Internal team code. |
| file_code | character | File code abbreviation. |
| team_abbreviation | character | Team abbreviation. |
| team_name | character | Short team name. |
| location_name | character | Team location (city). |
| first_year_of_play | character | First year the franchise played. |
| short_name | character | Short display name. |
| franchise_name | character | Franchise name. |
| club_name | character | Club name. |
| active | logical | Whether the team is active. |
| spring_league_id | integer | Spring league MLBAM ID. |
| spring_league_name | character | Spring league name. |
| spring_league_link | character | API link to the spring league. |
| spring_league_abbreviation | character | Spring league abbreviation. |
| venue_id | integer | Home venue MLBAM ID. |
| venue_name | character | Home venue name. |
| venue_link | character | API link to the venue. |
| spring_venue_id | integer | Spring training venue MLBAM ID. |
| spring_venue_link | character | API link to the spring venue. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| division_id | integer | Division MLBAM ID. |
| division_name | character | Division name. |
| division_link | character | API link to the division. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_name | character | Sport name (e.g., Major League Baseball). |
try(mlb_teams(season = 2021, sport_ids = c(1)))try(mlb_teams(season = 2021, sport_ids = c(1)))
MLB Teams Stats
mlb_teams_stats( stat_type = NULL, game_type = NULL, stat_group = NULL, season = NULL, sport_ids = NULL, sort_stat = NULL, order = NULL )mlb_teams_stats( stat_type = NULL, game_type = NULL, stat_group = NULL, season = NULL, sport_ids = NULL, sort_stat = NULL, order = NULL )
stat_type |
Stat type to return statistics for. |
game_type |
Game type to return information for a particular statistic in a particular game type. |
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
sport_ids |
The sport_id(s) to return information and ranking information for. |
sort_stat |
Sort return based on stat. |
order |
Order return based on either desc or asc. |
Returns a tibble with the following columns
| col_name | types | description |
| total_splits | integer | Total number of splits in the response. |
| season | character | Season year for the statistic. |
| rank | integer | Rank of the team for the sorted statistic. |
| games_played | integer | Games played. |
| ground_outs | integer | Ground outs. |
| air_outs | integer | Air outs (fly outs). |
| runs | integer | Runs scored. |
| doubles | integer | Doubles. |
| triples | integer | Triples. |
| home_runs | integer | Home runs. |
| strike_outs | integer | Strikeouts. |
| base_on_balls | integer | Walks (bases on balls). |
| intentional_walks | integer | Intentional walks. |
| hits | integer | Hits. |
| hit_by_pitch | integer | Times hit by pitch. |
| avg | character | Batting average. |
| at_bats | integer | At bats. |
| obp | character | On-base percentage. |
| slg | character | Slugging percentage. |
| ops | character | On-base plus slugging. |
| caught_stealing | integer | Times caught stealing. |
| stolen_bases | integer | Stolen bases. |
| stolen_base_percentage | character | Stolen base success percentage. |
| caught_stealing_percentage | character | Caught stealing percentage. |
| ground_into_double_play | integer | Grounded into double plays. |
| number_of_pitches | integer | Total pitches seen. |
| plate_appearances | integer | Plate appearances. |
| total_bases | integer | Total bases. |
| rbi | integer | Runs batted in. |
| left_on_base | integer | Runners left on base. |
| sac_bunts | integer | Sacrifice bunts. |
| sac_flies | integer | Sacrifice flies. |
| babip | character | Batting average on balls in play. |
| ground_outs_to_airouts | character | Ratio of ground outs to air outs. |
| catchers_interference | integer | Times reached on catcher's interference. |
| at_bats_per_home_run | character | At bats per home run. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| splits_tied_with_offset | list | Teams tied at the offset boundary. |
| splits_tied_with_limit | list | Teams tied at the limit boundary. |
| type_display_name | character | Stat type display name. |
| group_display_name | character | Stat group display name. |
try(mlb_teams_stats(stat_type = 'season', stat_group = 'hitting', season = 2021))try(mlb_teams_stats(stat_type = 'season', stat_group = 'hitting', season = 2021))
MLB Teams Stats Leaders
mlb_teams_stats_leaders( leader_categories = NULL, leader_game_types = NULL, sit_codes = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_id = NULL, start_date = NULL, end_date = NULL, stat_type = NULL, limit = 1000 )mlb_teams_stats_leaders( leader_categories = NULL, leader_game_types = NULL, sit_codes = NULL, stat_group = NULL, season = NULL, league_id = NULL, sport_id = NULL, start_date = NULL, end_date = NULL, stat_type = NULL, limit = 1000 )
leader_categories |
League leader category to return information and ranking for a particular statistic. |
leader_game_types |
Game type to return information and ranking for a particular statistic in a particular game type. |
sit_codes |
Situation code to return information and ranking for a particular statistic in a particular game type. |
stat_group |
Stat group to return information and ranking for a particular statistic in a particular group. |
season |
Year to return information and ranking for a particular statistic in a given year. |
league_id |
League ID to return statistics for a given league. Default to "Qualified" player pool. |
sport_id |
The sport_id to return information and ranking information for. |
start_date |
Start date to return information and ranking for a particular statistic for a particular date range. Format: MM/DD/YYYY start_date must be coupled with end_date and byDateRange stat_type |
end_date |
End date to return information and ranking for a particular statistic for a particular date range. Format: MM/DD/YYYY end_date must be coupled with start_date and byDateRange stat_type |
stat_type |
The stat_type to return information and ranking for a particular statistic for a particular stat type. |
limit |
A limit to limit return to a particular number of records. |
Returns a tibble with the following columns
| col_name | types | description |
| leader_category | character | Team leader category (e.g., homeRuns). |
| rank | integer | Rank within the team leaderboard. |
| value | character | Statistic value for the team. |
| season | character | Season year. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| stat_group | character | Stat group (e.g., hitting). |
| total_splits | integer | Total number of splits in the leaderboard. |
| game_type_id | character | Game type code (e.g., R for regular season). |
| game_type_description | character | Game type description. |
try(mlb_teams_stats_leaders(leader_categories='homeRuns',sport_id=1, season = 2021))try(mlb_teams_stats_leaders(leader_categories='homeRuns',sport_id=1, season = 2021))
Find MLB Venues
mlb_venues(venue_ids = NULL, sport_ids = NULL, season = NULL)mlb_venues(venue_ids = NULL, sport_ids = NULL, season = NULL)
venue_ids |
Venue directorial information based venue_id. |
sport_ids |
The sport_id(s) for which to return venue directorial information. |
season |
Year for which to return venue directorial information for a given season. |
Returns a tibble with the following columns:
| col_name | types | description |
| venue_id | integer | Venue MLBAM ID. |
| venue_name | character | Venue name. |
| venue_link | character | API link to the venue. |
| active | logical | Whether the venue is active. |
| season | character | Season the venue record applies to. |
try(mlb_venues()) try(mlb_venues(venue_ids = 4781)) try(mlb_venues(sport_ids = 1))try(mlb_venues()) try(mlb_venues(venue_ids = 4781)) try(mlb_venues(sport_ids = 1))
MLB Wind Direction Codes
mlb_wind_direction_codes()mlb_wind_direction_codes()
Returns a tibble with the following columns
| col_name | types | description |
| wind_direction_code | character | Wind direction code (e.g., In From CF). |
| wind_direction_description | character | Wind direction description. |
try(mlb_wind_direction_codes())try(mlb_wind_direction_codes())
Most Recent MLB Season
most_recent_mlb_season()most_recent_mlb_season()
An integer indicating the year of the most recent season of Major League Baseball
Most Recent NCAA Baseball Season
most_recent_ncaa_baseball_season()most_recent_ncaa_baseball_season()
An integer indicating the year of the most recent season of NCAA baseball
ncaa_team_player_stats(): This function allows the user to obtain batting or pitching statistics for any school affiliated with the NCAA at the division I, II, or III levels. The function acquires data from the NCAA's website (stats.ncaa.org) and returns a tibble.
ncaa_pbp(): Get Play-By-Play Data for NCAA Baseball Games.
ncaa_roster(): Get NCAA Baseball Rosters.
ncaa_game_logs(): Get NCAA Baseball Game Logs.
ncaa_lineups(): Get NCAA Baseball Game Lineups.
ncaa_park_factor(): Get Park Effects for NCAA Baseball Teams.
ncaa_schedule_info(): Get Schedule and Results for NCAA Baseball Teams.
ncaa_school_id_lu(): Lookup NCAA School IDs (Division I, II, and III)
ncaa_teams(): Lookup NCAA Teams by Division (I, II, and III) and Season
ncaa_team_player_stats(team_id = 255, year = 2013, type = "batting")
x <- ncaa_schedule_info(736, 2021)$game_info_url[2] ncaa_pbp(game_info_url = x)
ncaa_roster(team_id = 104, year = 2021)
ncaa_game_logs(player_id = 2113782, year = 2021, type = "pitching", span = "game")
ncaa_lineups(game_info_url="https://stats.ncaa.org/game/index/4587474?org_id=528",year=2018)
ncaa_park_factor(team_id = 736, years = c(2017:2019), type = "conference")
ncaa_schedule_info(team_id = 736, year = 2021)
ncaa_school_id_lu("VAN")
ncaa_teams(year = 2023, division = 1)
(legacy) Get NCAA Baseball Rosters
(legacy) Get NCAA Baseball Rosters
ncaa_baseball_roster(team_id = NULL, year, ...) get_ncaa_baseball_roster(team_id = NULL, year, ...)ncaa_baseball_roster(team_id = NULL, year, ...) get_ncaa_baseball_roster(team_id = NULL, year, ...)
team_id |
NCAA id for a school |
year |
The year of interest |
... |
Additional arguments passed to an underlying function like httr. |
A data frame containing roster information, including IDs and urls for each player (if available)
A data frame containing roster information, including IDs and urls for each player (if available)
Get NCAA Baseball Game Logs
ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)
player_id |
A player's unique id. Can be found using the get_ncaa_baseball_roster function. |
year |
The year of interest. |
type |
The kind of statistics you want to return. Current options are 'batting' or 'pitching'. |
span |
The span of time; can either be 'game' for game logs in a season, or 'career' which returns seasonal stats for a player's career. |
... |
Additional arguments passed to an underlying function like httr. |
A data frame containing player and school information as well as game by game statistics
| col_name | types |
| player_id | numeric |
| player_name | character |
| Date | character |
| Opponent | character |
| Result | character |
| App | numeric |
| G | numeric |
| GS | numeric |
| IP | numeric |
| CG | numeric |
| H | numeric |
| R | numeric |
| ER | numeric |
| BB | numeric |
| SO | numeric |
| SHO | numeric |
| BF | numeric |
| P-OAB | numeric |
| 2B-A | numeric |
| 3B-A | numeric |
| Bk | numeric |
| HR-A | numeric |
| WP | numeric |
| HB | numeric |
| IBB | numeric |
| Inh Run | numeric |
| Inh Run Score | numeric |
| SHA | numeric |
| SFA | numeric |
| Pitches | numeric |
| GO | numeric |
| FO | numeric |
| W | numeric |
| L | numeric |
| SV | numeric |
| OrdAppeared | numeric |
| KL | numeric |
| pickoffs | character |
try(ncaa_game_logs(player_id = 2649785, year = 2023, type = "pitching", span = "game")) try(ncaa_game_logs(player_id = 2477974, year = 2023, type = "pitching", span = "career")) try(ncaa_game_logs(player_id = 2680961, year = 2023, type = "batting", span = "game")) try(ncaa_game_logs(player_id = 2486588, year = 2023, type = "batting", span = "career"))try(ncaa_game_logs(player_id = 2649785, year = 2023, type = "pitching", span = "game")) try(ncaa_game_logs(player_id = 2477974, year = 2023, type = "pitching", span = "career")) try(ncaa_game_logs(player_id = 2680961, year = 2023, type = "batting", span = "game")) try(ncaa_game_logs(player_id = 2486588, year = 2023, type = "batting", span = "career"))
game_info_urlRetrieve lineups for a given NCAA game via its game_info_url
ncaa_lineups(game_info_url = NULL, ...)ncaa_lineups(game_info_url = NULL, ...)
game_info_url |
The unique game info url |
... |
Additional arguments passed to an underlying function like httr. |
Returns a tibble of each school's starting lineup and starting pitcher
| col_name | types |
| year | numeric |
| player_name | character |
| position | character |
| slug | character |
| batting_order | character |
| team_name | character |
| sub | numeric |
| attendance | character |
| game_date | character |
| location | character |
| player_id | integer |
| team_id | numeric |
| team_url | character |
| conference_id | numeric |
| conference | character |
| division | numeric |
| season_id | numeric |
try(ncaa_lineups(game_info_url="https://stats.ncaa.org/contests/2167178/box_score")) try(ncaa_lineups(game_info_url="https://stats.ncaa.org/game/index/4587474?org_id=528"))try(ncaa_lineups(game_info_url="https://stats.ncaa.org/contests/2167178/box_score")) try(ncaa_lineups(game_info_url="https://stats.ncaa.org/game/index/4587474?org_id=528"))
Get Park Effects for NCAA Baseball Teams
ncaa_park_factor(team_id, years, type = "conference", ...)ncaa_park_factor(team_id, years, type = "conference", ...)
team_id |
The team's unique NCAA id. |
years |
The season or seasons (i.e. use 2016 for the 2015-2016 season, etc., limited to just 2013-2023 seasons). |
type |
default is conference. the conference parameter adjusts for the conference the school plays in, the division parameter calculates based on the division the school plays in 1,2,or 3. Defaults to 'conference'. |
... |
Additional arguments passed to an underlying function like httr. |
try(ncaa_park_factor(team_id = 736, years = c(2018:2019), type = "conference"))
A data frame with the following fields: school, home_game, away_game, runs_scored_home, runs_allowed_home, run_scored_away, runs_allowed_away, base_pf (base park factor), home_game_adj (an adjustment for the percentage of home games played) final_pf (park factor after adjustments)
| col_name | types |
| school | character |
| home_game | numeric |
| away_game | numeric |
| runs_scored_home | numeric |
| runs_allowed_home | numeric |
| runs_scored_away | numeric |
| runs_allowed_away | numeric |
| base_pf | numeric |
| home_game_adj | numeric |
| final_pf | numeric |
Get Play-By-Play Data for NCAA Baseball Games
ncaa_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... )ncaa_pbp( game_info_url = NA_character_, game_pbp_url = NA_character_, raw_html_to_disk = FALSE, raw_html_path = "/", read_from_file = FALSE, file = NA_character_, ... )
game_info_url |
The url for the game's boxscore data. This can be found using the ncaa_schedule_info function. |
game_pbp_url |
The url for the game's play-by-play data. This can be found using the ncaa_schedule_info function. |
raw_html_to_disk |
Write raw html to disk (saves as |
raw_html_path |
Directory path to write raw html |
read_from_file |
Read from raw html on disk |
file |
File with full path to read raw html |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with play-by-play data for an individual game.
| col_name | types |
| game_date | character |
| location | character |
| attendance | logical |
| inning | character |
| inning_top_bot | character |
| score | character |
| batting | character |
| fielding | character |
| description | character |
| game_pbp_url | character |
| game_pbp_id | integer |
try(ncaa_pbp(game_info_url = "https://stats.ncaa.org/contests/2167178/box_score"))try(ncaa_pbp(game_info_url = "https://stats.ncaa.org/contests/2167178/box_score"))
Get NCAA Baseball Rosters
ncaa_roster(team_id = NULL, year, ...)ncaa_roster(team_id = NULL, year, ...)
team_id |
NCAA id for a school |
year |
The year of interest |
... |
Additional arguments passed to an underlying function like httr. |
A data frame containing roster information, including IDs and urls for each player (if available)
| col_name | types |
| player_name | character |
| class | character |
| player_id | character |
| season | numeric |
| number | character |
| position | character |
| player_url | character |
| team_name | character |
| conference | character |
| team_id | numeric |
| division | numeric |
| conference_id | numeric |
try(ncaa_roster(team_id = 104, year = 2023))try(ncaa_roster(team_id = 104, year = 2023))
Get Schedule and Results for NCAA Baseball Teams
ncaa_schedule_info(team_id = NULL, year = NULL, pbp_links = FALSE, ...)ncaa_schedule_info(team_id = NULL, year = NULL, pbp_links = FALSE, ...)
team_id |
The team's unique NCAA id. |
year |
The season (i.e. use 2016 for the 2015-2016 season, etc.) |
pbp_links |
Logical parameter to run process for scraping play_by_play urls for each game |
... |
Additional arguments passed to an underlying function like httr. |
try(ncaa_schedule_info(team_id = 736, year = 2019))
A data frame with the following fields: date, opponent, result, score, innings (if more than regulation), and the url for the game itself.
| col_name | types |
| year | integer |
| season_id | integer |
| date | character |
| home_team | character |
| home_team_id | integer |
| home_team_conference | character |
| home_team_conference_id | integer |
| home_team_slug | character |
| home_team_division | integer |
| away_team | character |
| away_team_id | integer |
| away_team_conference | character |
| away_team_conference_id | integer |
| away_team_slug | character |
| away_team_division | integer |
| neutral_site | character |
| result | character |
| score | character |
| innings | character |
| slug | character |
| game_info_url | character |
| contest_id | integer |
This function allows the user to look up the team_id needed
for the ncaa_team_player_stats() function.
ncaa_school_id_lu(team_name = NULL)ncaa_school_id_lu(team_name = NULL)
team_name |
A string that will be searched for in the names of the teams. |
Returns a tibble with school identification data: team_id, team_name, team_url, conference, conference_id, division, year, and season_id
| col_name | types |
| team_id | numeric |
| team_name | character |
| team_url | character |
| conference_id | numeric |
| conference | character |
| division | numeric |
| year | numeric |
| season_id | numeric |
try(ncaa_school_id_lu("Van"))try(ncaa_school_id_lu("Van"))
(legacy) Scrape NCAA baseball Team Player Stats (Division I, II, and III)
ncaa_scrape( team_id, year = most_recent_ncaa_baseball_season(), type = "batting", ... )ncaa_scrape( team_id, year = most_recent_ncaa_baseball_season(), type = "batting", ... )
team_id |
The numerical ID that the NCAA website uses to identify a team |
year |
The season for which data should be returned, in the form of "YYYY". Years currently available: 2013-2017. |
type |
A string indicating whether to return "batting" or "pitching" statistics |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with the following variables
| col_name | types |
| year | integer |
| team_name | character |
| team_id | numeric |
| conference_id | integer |
| conference | character |
| division | numeric |
| player_id | integer |
| player_url | character |
| player_name | character |
| Yr | character |
| Pos | character |
| Jersey | character |
| GP | numeric |
| GS | numeric |
| BA | numeric |
| OBPct | numeric |
| SlgPct | numeric |
| R | numeric |
| AB | numeric |
| H | numeric |
| 2B | numeric |
| 3B | numeric |
| TB | numeric |
| HR | numeric |
| RBI | numeric |
| BB | numeric |
| HBP | numeric |
| SF | numeric |
| SH | numeric |
| K | numeric |
| DP | numeric |
| CS | numeric |
| Picked | numeric |
| SB | numeric |
| RBI2out | numeric |
This function allows the user to obtain batting or pitching statistics for any school affiliated with the NCAA at the division I, II, or III levels. The function acquires data from the NCAA's website (stats.ncaa.org) and returns a tibble.
ncaa_team_player_stats( team_id, year = most_recent_ncaa_baseball_season(), type = "batting", ... )ncaa_team_player_stats( team_id, year = most_recent_ncaa_baseball_season(), type = "batting", ... )
team_id |
The numerical ID that the NCAA website uses to identify a team |
year |
The season for which data should be returned, in the form of "YYYY". Years currently available: 2013-2017. |
type |
A string indicating whether to return "batting" or "pitching" statistics |
... |
Additional arguments passed to an underlying function like httr. |
A data frame with the following variables
| col_name | types |
| year | integer |
| team_name | character |
| team_id | numeric |
| conference_id | integer |
| conference | character |
| division | numeric |
| player_id | integer |
| player_url | character |
| player_name | character |
| Yr | character |
| Pos | character |
| Jersey | character |
| GP | numeric |
| GS | numeric |
| BA | numeric |
| OBPct | numeric |
| SlgPct | numeric |
| R | numeric |
| AB | numeric |
| H | numeric |
| 2B | numeric |
| 3B | numeric |
| TB | numeric |
| HR | numeric |
| RBI | numeric |
| BB | numeric |
| HBP | numeric |
| SF | numeric |
| SH | numeric |
| K | numeric |
| DP | numeric |
| CS | numeric |
| Picked | numeric |
| SB | numeric |
| RBI2out | numeric |
try(ncaa_team_player_stats(team_id = 234, year = 2023, type = "batting"))try(ncaa_team_player_stats(team_id = 234, year = 2023, type = "batting"))
This function allows the user to obtain NCAA teams by year and division
ncaa_teams(year = most_recent_ncaa_baseball_season(), division = 1, ...)ncaa_teams(year = most_recent_ncaa_baseball_season(), division = 1, ...)
year |
The season for which data should be returned, in the form of "YYYY". Years currently available: 2002 onward. |
division |
Division - 1, 2, 3 |
... |
Additional arguments passed to an underlying function like httr. |
ncaa_teams(2023, 1)
A data frame with the following variables
| col_name | types | description |
| team_id | character | Franchise team id (legacy /team/{id}/... urls). |
| team_name | character | Team display name. |
| team_url | character | Relative team url from stats.ncaa.org. |
| conference_id | character | Conference identifier. |
| conference | character | Conference name. |
| division | numeric | NCAA division (1, 2, 3). |
| year | numeric | Season (4-digit year). |
| season_id | character | Season id (legacy urls); join key to season ids. |
| season_team_id | character | Season-team id (modern /teams/{id} urls).
|
(legacy) Scrape Pitcher Game Logs from FanGraphs
pitcher_game_logs_fg(playerid, year)pitcher_game_logs_fg(playerid, year)
playerid |
This is the playerid used by FanGraphs for a given player |
year |
The season for which game logs should be returned (use the YYYY format) |
A data frame of pitcher game logs.
This function allows you to query the Chadwick Bureau's public register of baseball players and the various IDs associated with them in different systems of record.
playerid_lookup(last_name = NULL, first_name = NULL)playerid_lookup(last_name = NULL, first_name = NULL)
last_name |
A text string used to return results for players with that string in their last name. |
first_name |
A text string used to return results for players with that string in their first name. |
A data frame of baseball players and the various IDs associated with them in different systems of record.
| col_name | types | description |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| given_name | character | Player full given (legal) name. |
| name_suffix | character | Name suffix (e.g. Jr., Sr., III). |
| nick_name | character | Player nickname. |
| birth_year | integer | Year of birth. |
| mlb_played_first | integer | First MLB season as a player. |
| mlbam_id | integer | MLB Advanced Media (MLBAM) player ID. |
| retrosheet_id | character | Retrosheet player ID. |
| bbref_id | character | Baseball-Reference player ID. |
| fangraphs_id | integer | FanGraphs player ID. |
try(playerid_lookup("Garcia", "Karim"))try(playerid_lookup("Garcia", "Karim"))
This function allows you to query the Chadwick Bureau's public register of baseball players and the various IDs associated with them in different systems of record.
playername_lookup(id)playername_lookup(id)
id |
An integer or character string representing a player ID in a baseball database, cross-referenced through the Chadwick Bureau's public register of baseball players. |
A data frame of baseball players and the various IDs associated with them in different systems of record.
| col_name | types | description |
| name_first | character | Player first name. |
| name_last | character | Player last name. |
| name_given | character | Player full given (legal) name. |
| name_suffix | character | Name suffix (e.g. Jr., Sr., III). |
| name_nick | character | Player nickname. |
| birth_year | integer | Year of birth. |
| mlb_played_first | integer | First MLB season as a player. |
| key_mlbam | integer | MLB Advanced Media (MLBAM) player ID. |
| key_retro | character | Retrosheet player ID. |
| key_bbref | character | Baseball-Reference player ID. |
| key_fangraphs | integer | FanGraphs player ID. |
try(playername_lookup(4885)) try(playername_lookup("kaaihki01"))try(playername_lookup(4885)) try(playername_lookup("kaaihki01"))
This is a helper function for all statcast_search() functions.
The function processes the initial csv payload acquired from
Baseball Savant to ensure consistency in formatting across downloads
process_statcast_payload(payload)process_statcast_payload(payload)
payload |
payload from a Baseball Savant request |
A tibble with the processed Statcast data coerced to the correct types.
This function requires the use of the Chadwick CLI. Follow
the directions at the repository for installation of the CLI release for your platform.
Specifically from the Chadwick CLI tools, this function requires the cwevent application to be available from the command line.
For unix platform users: the retrosheet_data() function uses the system() interface under the hood.
For Windows and other platform users: the retrosheet_data() function interacts with the cwevent application
using the shell() interface under the hood.
retrosheet_data( path_to_directory = NULL, years_to_acquire = most_recent_mlb_season() - 1, sequence_years = FALSE )retrosheet_data( path_to_directory = NULL, years_to_acquire = most_recent_mlb_season() - 1, sequence_years = FALSE )
path_to_directory |
(default: NULL) A file path that if set, either:
|
years_to_acquire |
(format: YYYY) The seasons to collect. Single, multiple, and
sequential years can be passed. If passing multiple years, enclose in a
vector (i.e. c(2017,2018)). Defaults to |
sequence_years |
(logical, default: FALSE): If the seasons passed in the years_to_acquire parameter should be sequenced so that the function returns all years including and between the vector passed, set the argument to TRUE. Defaults to FALSE. |
retrosheet_data(path_to_directory = NULL,
years_to_acquire = most_recent_mlb_season()-1,
sequence_years = FALSE)
If path_to_directory is not set (default), the process will return a named list
of tibbles: 'events' and 'rosters' for each season provided to years_to_acquire
If path_to_directory is set, will also write two csv files to the unzipped directory: 1) a combined csv
of the event data for a given year and 2) a combined csv of each team's
roster for each year provided to years_to_acquire
These functions allow a user to generate run expectancy and related measures and variables from Baseball Savant data. Measures and variables will be added to the data frame.
run_expectancy_code(df, level = "plate appearance")run_expectancy_code(df, level = "plate appearance")
df |
A data frame generated from Baseball Savant. |
level |
Whether you want run expectancy calculated at the plate appearance or pitch level. Defaults to plate appearance. |
Returns the input Baseball Savant data frame (the same Statcast
pitch-level columns produced by statcast_search() – see that function's
return value for the full column-by-column reference) with run-expectancy
columns appended. The appended columns are:
| col_name | types | description |
| final_pitch_game | numeric | 1 if the row is the last pitch of the game, 0 otherwise. |
| final_pitch_at_bat | numeric | 1 if the row is the last pitch of the plate appearance, 0 otherwise. |
| runs_scored_on_pitch | numeric | Runs that scored on the pitch (parsed from the play description, plus the batter on a home run). |
| bat_score_after | numeric | Batting team score after the pitch. |
| final_pitch_inning | numeric | 1 if the row is the last pitch of the half-inning, 0 otherwise. |
| bat_score_start_inning | numeric | Batting team score at the start of the half-inning. |
| bat_score_end_inning | numeric | Batting team score at the end of the half-inning. |
| cum_runs_in_inning | numeric | Cumulative runs scored in the half-inning up to the pitch. |
| runs_to_end_inning | numeric | Runs scored from the current state to the end of the half-inning. |
| count_base_out_state | character | Count, outs, and base-occupancy state string (pitch-level run expectancy). |
| avg_re | numeric | Average run expectancy for the current base-out (or count-base-out) state. |
| next_count_base_out_state | character | Base-out (or count-base-out) state of the following event. |
| next_avg_re | numeric | Average run expectancy for the next state (0 at the end of an inning). |
| change_re | numeric | Change in run expectancy between the current and next state. |
| re24 | numeric | RE24: change in run expectancy plus runs scored on the pitch. |
At the plate-appearance level the analogous state columns are named
base_out_state and next_base_out_state.
try({ df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15", playerid = 621043, player_type = 'batter') run_expectancy_code(df, level = "plate appearances") })try({ df <- statcast_search(start_date = "2016-04-06", end_date = "2016-04-15", playerid = 621043, player_type = 'batter') run_expectancy_code(df, level = "plate appearances") })
(legacy) Lookup NCAA baseball school IDs (Division I, II, and III)
school_id_lu(team_name = NULL)school_id_lu(team_name = NULL)
team_name |
A string that will be searched for in the names of the teams. |
Returns a tibble with school identification data: team_id, team_name, team_url, conference, conference_id, division, year, and season_id
(legacy) Query Baseball Savant Leaderboards
scrape_savant_leaderboards( leaderboard = "exit_velocity_barrels", year = 2020, abs = 50, min_pa = "q", min_pitches = 100, min_throws = 100, min_field = "q", min_run = 0, player_type = "batter", fielding_type = "player", oaa_position = "", oaa_roles = "", team = "", arsenal_type = "n_", run_type = "raw", min2b = 5, min3b = 0, position = "", bats = "", hand = "" )scrape_savant_leaderboards( leaderboard = "exit_velocity_barrels", year = 2020, abs = 50, min_pa = "q", min_pitches = 100, min_throws = 100, min_field = "q", min_run = 0, player_type = "batter", fielding_type = "player", oaa_position = "", oaa_roles = "", team = "", arsenal_type = "n_", run_type = "raw", min2b = 5, min3b = 0, position = "", bats = "", hand = "" )
leaderboard |
The type of leaderboard to retrieve, input as a string. Current options include exit_velocity_barrels, expected_statistics, pitch_arsenal, outs_above_average, directional_oaa, catch_probability, pop_time, sprint_speed, and running_splits_90_ft, arm_strength. |
year |
The season for which you want data. |
abs |
The minimum number of batted balls. Applies only to exit_velocity_barrels leaderboards. |
min_pa |
Minimum number of plate appearances. Can be a number or 'q' for qualified batters. |
min_pitches |
Minimum number of pitches thrown. |
min_throws |
Minimum number of throwing opportunities. |
min_field |
Minimum number of fieding opportunities. |
min_run |
Minimum number of running opportunities. |
player_type |
One of either 'batter' or pitcher. For the expected_statistics leaderboard, 'batter-team' and 'pitcher-team' are also available. |
fielding_type |
One of either 'player' or 'team'. |
oaa_position |
Can be either the number position of a player or 'if' or 'of' for position categories. |
oaa_roles |
Can be either the number position of a player or 'if' or 'of' for position categories. |
team |
An abbreviation for a team. Can be left blank. |
arsenal_type |
One of either 'n_', 'avg_spin', or 'avg_speed'. |
run_type |
One of either 'percent' or 'raw'. |
min2b |
The minimum number of throwing attempts to second base. |
min3b |
The minimum number of throwing attempts to third base. |
position |
The numeric position of the player. For DH use 10. Can be left blank. |
bats |
The handedness of the batter. One of 'R' or 'L'. Can be left blank. |
hand |
The handedness of the pitcher. One of 'R' or 'L'. Can be left blank. |
Returns a tibble of Statcast leaderboard data.
(legacy) Query Statcast by Date Range and Players
scrape_statcast_savant( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant.Date( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant.default( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant_batter(start_date, end_date, batterid = NULL, ...) scrape_statcast_savant_batter_all(start_date, end_date, batterid = NULL, ...) scrape_statcast_savant_pitcher(start_date, end_date, pitcherid = NULL, ...) scrape_statcast_savant_pitcher_all(start_date, end_date, pitcherid = NULL, ...)scrape_statcast_savant( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant.Date( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant.default( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) scrape_statcast_savant_batter(start_date, end_date, batterid = NULL, ...) scrape_statcast_savant_batter_all(start_date, end_date, batterid = NULL, ...) scrape_statcast_savant_pitcher(start_date, end_date, pitcherid = NULL, ...) scrape_statcast_savant_pitcher_all(start_date, end_date, pitcherid = NULL, ...)
start_date |
Date of first game for which you want data. Format must be in YYYY-MM-DD format. |
end_date |
Date of last game for which you want data. Format must be in YYYY-MM-DD format. |
playerid |
The MLBAM ID for the player whose data you want to query. |
player_type |
The player type. Can be |
... |
currently ignored |
batterid |
The MLBAM ID for the batter whose data you want to query. |
pitcherid |
The MLBAM ID for the pitcher whose data you want to query. |
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
Returns a tibble with Statcast data.
sptrc_team_active_payroll(): Scrape Team Active Payroll Breakdown from Spotrac.
sptrc_league_payrolls(): Scrape League Payroll Breakdowns from Spotrac.
These functions retrieve team and league payroll breakdowns from Spotrac.
This function allows you to scrape each team's payroll from Spotrac.
sptrc_league_payrolls(year = most_recent_mlb_season())sptrc_league_payrolls(year = most_recent_mlb_season())
year |
Year to load |
A data frame of contract data.
| col_name | types | description |
| year | character | Payroll season. |
| team | character | Full team name. |
| team_abbr | character | Team abbreviation. |
| rank | numeric | League rank by total payroll allocations. |
| record | character | Team win-loss record for the season. |
| avg_age_team | character | Roster-weighted average age of the team. |
| total_payroll_allocations | numeric | Total payroll allocations across all roster statuses (USD). |
| active_26_man | numeric | Payroll allocated to the active 26-man roster (USD). |
| injured | numeric | Payroll allocated to players on the injured list (USD). |
| retained | numeric | Retained salary owed to players no longer on the roster (USD). |
| buried | numeric | Payroll for players assigned to the minors ("buried" contracts) (USD). |
Column names after rank mirror Spotrac's current league-payroll table and
may change as Spotrac updates its layout.
try(sptrc_league_payrolls(year = most_recent_mlb_season()))try(sptrc_league_payrolls(year = most_recent_mlb_season()))
This function allows you to scrape a team's active payroll from Spotrac.
sptrc_team_active_payroll(team_abbr, year = most_recent_mlb_season())sptrc_team_active_payroll(team_abbr, year = most_recent_mlb_season())
team_abbr |
Team abbreviation |
year |
Year to load |
A data frame of contract data.
| col_name | types | description |
| year | numeric | Payroll season. |
| team | character | Team abbreviation supplied to the function. |
| player_name | character | Player name. |
| roster_status | character | Payroll table the row came from: Active, IL, or Retained Salary. |
| pos | character | Player position. |
| exp | character | Years of MLB service experience. |
| options_minor | character | Remaining minor-league option years. |
| status | character | Contract status (e.g. signed, arbitration, pre-arbitration). |
| payroll_salary | numeric | Salary counted against the team payroll (USD). |
| payroll_salary_adjusted | numeric | Payroll salary adjusted for prorated and retained amounts (USD). |
| base_salary | numeric | Player base salary for the season (USD). |
| signing_bonus | numeric | Signing bonus allocated to the season (USD). |
| waiver_options | character | Waiver and option flags reported by Spotrac. |
Columns after roster_status mirror Spotrac's current payroll table and may
change as Spotrac updates its layout.
try(sptrc_team_active_payroll(team_abbr = "BAL", year = most_recent_mlb_season()))try(sptrc_team_active_payroll(team_abbr = "BAL", year = most_recent_mlb_season()))
(legacy) Scrape MLB Standings on a Given Date
standings_on_date_bref(date, division, from = FALSE)standings_on_date_bref(date, division, from = FALSE)
date |
a date object |
division |
One or more of AL East, AL Central, AL West, AL Overall, NL East, NL Central, NL West, and NL Overall |
from |
a logical indicating whether you want standings up to and including the date (FALSE, default) or rather standings for games played after the date |
Returns a tibble of MLB standings
statcast_search(): Query Statcast by Date Range and Players.
statcast_search_batters(): Query Statcast Batters by Date Range and Player.
statcast_search_pitchers(): Query Statcast Pitchers by Date Range and Player.
statcast_leaderboards(): Query Baseball Savant Leaderboards.
statcast_search(start_date = "2016-04-06",
end_date = "2016-04-15",
player_type = 'batter')
## The above is equivalent to:
statcast_search_batters(start_date = "2016-04-06",
end_date = "2016-04-15",
batterid = NULL)
statcast_search(start_date = "2016-04-06",
end_date = "2016-04-15",
player_type = 'pitcher')
## The above is equivalent to:
statcast_search_pitchers(start_date = "2016-04-06",
end_date = "2016-04-15",
pitcherid = NULL)
correa <- statcast_search(start_date = "2016-04-06",
end_date = "2016-04-15",
playerid = 621043,
player_type = 'batter')
## The above is equivalent to:
correa <- statcast_search_batters(start_date = "2016-04-06",
end_date = "2016-04-15",
batterid = 621043)
noah <- statcast_search(start_date = "2016-04-06",
end_date = "2016-04-15",
playerid = 592789,
player_type = 'pitcher')
## The above is equivalent to:
noah <- statcast_search_pitchers(start_date = "2016-04-06",
end_date = "2016-04-15",
pitcherid = 592789)
statcast_leaderboards(leaderboard = "exit_velocity_barrels", year = 2021)
Statcast Label Imputation
statcast_imputestatcast_impute
An object of class data.frame with 44 rows and 4 columns.
This function allows you to read leaderboard data from BaseballSavant directly into R as data frame.
statcast_leaderboards( leaderboard = "exit_velocity_barrels", year = 2020, abs = 50, min_pa = "q", min_pitches = 100, min_throws = 100, min_field = "q", min_run = 0, player_type = "batter", fielding_type = "player", oaa_position = "", oaa_roles = "", team = "", arsenal_type = "n_", run_type = "raw", min2b = 5, min3b = 0, position = "", bats = "", hand = "" )statcast_leaderboards( leaderboard = "exit_velocity_barrels", year = 2020, abs = 50, min_pa = "q", min_pitches = 100, min_throws = 100, min_field = "q", min_run = 0, player_type = "batter", fielding_type = "player", oaa_position = "", oaa_roles = "", team = "", arsenal_type = "n_", run_type = "raw", min2b = 5, min3b = 0, position = "", bats = "", hand = "" )
leaderboard |
The type of leaderboard to retrieve, input as a string. Current options include exit_velocity_barrels, expected_statistics, pitch_arsenal, outs_above_average, directional_oaa, catch_probability, pop_time, sprint_speed, and running_splits_90_ft, arm_strength. |
year |
The season for which you want data. |
abs |
The minimum number of batted balls. Applies only to exit_velocity_barrels leaderboards. |
min_pa |
Minimum number of plate appearances. Can be a number or 'q' for qualified batters. |
min_pitches |
Minimum number of pitches thrown. |
min_throws |
Minimum number of throwing opportunities. |
min_field |
Minimum number of fieding opportunities. |
min_run |
Minimum number of running opportunities. |
player_type |
One of either 'batter' or pitcher. For the expected_statistics leaderboard, 'batter-team' and 'pitcher-team' are also available. |
fielding_type |
One of either 'player' or 'team'. |
oaa_position |
Can be either the number position of a player or 'if' or 'of' for position categories. |
oaa_roles |
Can be either the number position of a player or 'if' or 'of' for position categories. |
team |
An abbreviation for a team. Can be left blank. |
arsenal_type |
One of either 'n_', 'avg_spin', or 'avg_speed'. |
run_type |
One of either 'percent' or 'raw'. |
min2b |
The minimum number of throwing attempts to second base. |
min3b |
The minimum number of throwing attempts to third base. |
position |
The numeric position of the player. For DH use 10. Can be left blank. |
bats |
The handedness of the batter. One of 'R' or 'L'. Can be left blank. |
hand |
The handedness of the pitcher. One of 'R' or 'L'. Can be left blank. |
oaa_roles argument: 30 = 1B - Straight Up 31 = 1B - Towards 1B/2B Hole 32 = 1B - Close to Line 40 = 2B - Straight Up 41 = 2B - Shaded Towards 2B Bag 42 = 2B - Towards 1B/2B Hole 43 = 2B - Behind First Basemen 46 = 2B - Up the Middle 60 = SS - Straight Up 61 = SS - Towards 3B/SS Hole 62 = SS - Shaded Towards 2B Bag 64 = SS - Up the Middle 50 = 3B - Straight Up 51 = 3B - Close to Line 52 = 3B - Towards 3B/SS Hole 77 = LF - Close to Line 71 = LF - Leaning Left 70 = LF - Straight Up 72 = LF - Leaning Right 78 = LF - LF Gap 87 = CF - LF Gap 81 = CF - Leaning Left 82 = CF - Leaning Right 89 = CF - RF Gap 98 = RF - RF Gap 91 = RF - Leaning Left 90 = RF - Straight Up 92 = RF - Leaning Right 99 = RF - Close to Line
Returns a tibble of Statcast leaderboard data with the following columns (for leaderboard: 'exit_velocity_barrels'):
| col_name | types | description |
| year | numeric | Leaderboard season. |
| last_name, first_name | character | Player name as "Last, First". |
| player_id | integer | MLBAM player ID. |
| attempts | integer | Number of batted-ball events (attempts). |
| avg_hit_angle | numeric | Average launch angle on batted balls (degrees). |
| anglesweetspotpercent | numeric | Share of batted balls hit in the 8-32 degree sweet-spot range (percent). |
| max_hit_speed | numeric | Maximum exit velocity recorded (mph). |
| avg_hit_speed | numeric | Average exit velocity on batted balls (mph). |
| ev50 | numeric | Average of the top 50% of hardest-hit batted balls by exit velocity (mph). |
| fbld | numeric | Average exit velocity on fly balls and line drives (mph). |
| gb | numeric | Average exit velocity on ground balls (mph). |
| max_distance | integer | Maximum batted-ball distance (feet). |
| avg_distance | integer | Average batted-ball distance (feet). |
| avg_hr_distance | integer | Average home-run distance (feet). |
| ev95plus | integer | Number of batted balls hit at 95+ mph. |
| ev95percent | numeric | Share of batted balls hit at 95+ mph (percent). |
| barrels | integer | Number of barreled batted balls. |
| brl_percent | numeric | Barrels per batted-ball event (percent). |
| brl_pa | numeric | Barrels per plate appearance (percent). |
try(statcast_leaderboards(leaderboard = "expected_statistics", year = 2018)) try(statcast_leaderboards(leaderboard = "arm_strength", year = 2020))try(statcast_leaderboards(leaderboard = "expected_statistics", year = 2018)) try(statcast_leaderboards(leaderboard = "arm_strength", year = 2020))
This function allows you to query Statcast data as provided on https://baseballsavant.mlb.com
statcast_search( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) statcast_search.default( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) statcast_search_batters(start_date, end_date, batterid = NULL, ...) statcast_search_pitchers(start_date, end_date, pitcherid = NULL, ...)statcast_search( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) statcast_search.default( start_date = Sys.Date() - 1, end_date = Sys.Date(), playerid = NULL, player_type = "batter", ... ) statcast_search_batters(start_date, end_date, batterid = NULL, ...) statcast_search_pitchers(start_date, end_date, pitcherid = NULL, ...)
start_date |
Date of first game for which you want data. Format must be in YYYY-MM-DD format. |
end_date |
Date of last game for which you want data. Format must be in YYYY-MM-DD format. |
playerid |
The MLBAM ID for the player whose data you want to query. |
player_type |
The player type. Can be |
... |
currently ignored |
batterid |
The MLBAM ID for the batter whose data you want to query. |
pitcherid |
The MLBAM ID for the pitcher whose data you want to query. |
Returns a tibble with Statcast data with the following columns:
| col_name | types | description |
| pitch_type | character | Abbreviation of the pitch type thrown (e.g. FF, SL, CH). |
| game_date | Date | Date the game was played. |
| release_speed | numeric | Pitch velocity out of the hand (mph). |
| release_pos_x | numeric | Horizontal release position of the ball, catcher's perspective (feet). |
| release_pos_z | numeric | Vertical release position of the ball, catcher's perspective (feet). |
| player_name | character | Pitcher (or batter, by query) name, Last, First. |
| batter | numeric | MLBAM ID for the batter. |
| pitcher | numeric | MLBAM ID for the pitcher. |
| events | character | Plate-appearance outcome (e.g. single, strikeout, home_run). |
| description | character | Pitch-level result description (e.g. ball, called_strike, hit_into_play). |
| spin_dir | logical | Deprecated spin direction field, no longer populated. |
| spin_rate_deprecated | logical | Deprecated legacy spin-rate field, no longer populated. |
| break_angle_deprecated | logical | Deprecated legacy break-angle field, no longer populated. |
| break_length_deprecated | logical | Deprecated legacy break-length field, no longer populated. |
| zone | numeric | Strike-zone region the pitch crossed (1-14 Gameday zone). |
| des | character | Full text description of the play. |
| game_type | character | Type of game: R (regular), PO/F/D/L/W (postseason), S (spring). |
| stand | character | Side of the plate the batter is standing (L or R). |
| p_throws | character | Hand the pitcher throws with (L or R). |
| home_team | character | Home team abbreviation. |
| away_team | character | Away team abbreviation. |
| type | character | Pitch result code: B (ball), S (strike), X (in play). |
| hit_location | integer | Fielder position number that fielded the ball. |
| bb_type | character | Batted-ball type (ground_ball, line_drive, fly_ball, popup). |
| balls | integer | Ball count before the pitch. |
| strikes | integer | Strike count before the pitch. |
| game_year | integer | Season year of the game. |
| pfx_x | numeric | Horizontal pitch movement from the catcher's perspective (feet). |
| pfx_z | numeric | Vertical pitch movement from the catcher's perspective (feet). |
| plate_x | numeric | Horizontal position of the pitch crossing the plate (feet from center). |
| plate_z | numeric | Vertical position of the pitch crossing the plate (feet above ground). |
| on_3b | numeric | MLBAM ID of the runner on third base, if any. |
| on_2b | numeric | MLBAM ID of the runner on second base, if any. |
| on_1b | numeric | MLBAM ID of the runner on first base, if any. |
| outs_when_up | integer | Number of outs when the batter came to the plate. |
| inning | numeric | Inning number. |
| inning_topbot | character | Half of the inning (Top or Bot). |
| hc_x | numeric | Hit coordinate X on the field diagram. |
| hc_y | numeric | Hit coordinate Y on the field diagram. |
| tfs_deprecated | logical | Deprecated time-from-start field, no longer populated. |
| tfs_zulu_deprecated | logical | Deprecated Zulu time-from-start field, no longer populated. |
| umpire | logical | Deprecated umpire field, no longer populated. |
| sv_id | logical | Deprecated Sportvision/Statcast pitch identifier, no longer populated. |
| vx0 | numeric | Velocity of the pitch in the x-direction at y=50 ft (ft/s). |
| vy0 | numeric | Velocity of the pitch in the y-direction at y=50 ft (ft/s). |
| vz0 | numeric | Velocity of the pitch in the z-direction at y=50 ft (ft/s). |
| ax | numeric | Acceleration of the pitch in the x-direction at y=50 ft (ft/s^2). |
| ay | numeric | Acceleration of the pitch in the y-direction at y=50 ft (ft/s^2). |
| az | numeric | Acceleration of the pitch in the z-direction at y=50 ft (ft/s^2). |
| sz_top | numeric | Top of the batter's strike zone for the pitch (feet). |
| sz_bot | numeric | Bottom of the batter's strike zone for the pitch (feet). |
| hit_distance_sc | numeric | Statcast-measured projected distance of the batted ball (feet). |
| launch_speed | numeric | Exit velocity of the batted ball (mph). |
| launch_angle | numeric | Vertical launch angle of the batted ball (degrees). |
| effective_speed | numeric | Perceived velocity adjusted for release extension (mph). |
| release_spin_rate | numeric | Spin rate of the pitch at release (rpm). |
| release_extension | numeric | Distance toward the plate at release (feet). |
| game_pk | numeric | Unique MLB game identifier. |
| fielder_2 | numeric | MLBAM ID of the catcher. |
| fielder_3 | numeric | MLBAM ID of the first baseman. |
| fielder_4 | numeric | MLBAM ID of the second baseman. |
| fielder_5 | numeric | MLBAM ID of the third baseman. |
| fielder_6 | numeric | MLBAM ID of the shortstop. |
| fielder_7 | numeric | MLBAM ID of the left fielder. |
| fielder_8 | numeric | MLBAM ID of the center fielder. |
| fielder_9 | numeric | MLBAM ID of the right fielder. |
| release_pos_y | numeric | Release position of the ball toward the plate (feet). |
| estimated_ba_using_speedangle | numeric | Expected batting average based on exit velocity and launch angle. |
| estimated_woba_using_speedangle | numeric | Expected wOBA based on exit velocity and launch angle. |
| woba_value | numeric | wOBA value assigned to the event. |
| woba_denom | integer | wOBA denominator (plate-appearance weight) for the event. |
| babip_value | integer | BABIP value assigned to the event (0 or 1). |
| iso_value | integer | Isolated power value assigned to the event. |
| launch_speed_angle | integer | Batted-ball classification code (1-6) from exit velocity and angle. |
| at_bat_number | numeric | Sequential plate-appearance number within the game. |
| pitch_number | numeric | Pitch number within the plate appearance. |
| pitch_name | character | Full name of the pitch type (e.g. 4-Seam Fastball, Slider). |
| home_score | numeric | Home team score before the pitch. |
| away_score | numeric | Away team score before the pitch. |
| bat_score | numeric | Batting team score before the pitch. |
| fld_score | numeric | Fielding team score before the pitch. |
| post_away_score | numeric | Away team score after the pitch. |
| post_home_score | numeric | Home team score after the pitch. |
| post_bat_score | numeric | Batting team score after the pitch. |
| post_fld_score | numeric | Fielding team score after the pitch. |
| if_fielding_alignment | character | Infield defensive alignment (Standard, Strategic, Infield shift). |
| of_fielding_alignment | character | Outfield defensive alignment (Standard, Strategic, 4th outfielder). |
| spin_axis | numeric | Spin axis of the pitch as a clock-face angle (degrees). |
| delta_home_win_exp | numeric | Change in home team win expectancy on the play. |
| delta_run_exp | numeric | Change in run expectancy on the play. |
| bat_speed | numeric | Bat speed at the point of contact (mph). |
| swing_length | numeric | Length of the swing path to contact (feet). |
| estimated_slg_using_speedangle | numeric | Expected slugging based on exit velocity and launch angle. |
| delta_pitcher_run_exp | numeric | Change in run expectancy credited to the pitcher. |
| hyper_speed | numeric | Adjusted (90th-percentile) exit velocity (mph). |
| home_score_diff | integer | Home team score minus away team score before the pitch. |
| bat_score_diff | integer | Batting team score minus fielding team score before the pitch. |
| home_win_exp | numeric | Home team win expectancy before the play. |
| bat_win_exp | numeric | Batting team win expectancy before the play. |
| age_pit_legacy | integer | Pitcher age using the legacy calculation. |
| age_bat_legacy | integer | Batter age using the legacy calculation. |
| age_pit | integer | Pitcher age for the season. |
| age_bat | integer | Batter age for the season. |
| n_thruorder_pitcher | integer | Times through the order the pitcher is facing the lineup. |
| n_priorpa_thisgame_player_at_bat | integer | Number of prior plate appearances by the batter in the game. |
| pitcher_days_since_prev_game | integer | Days since the pitcher's previous game appearance. |
| batter_days_since_prev_game | integer | Days since the batter's previous game appearance. |
| pitcher_days_until_next_game | integer | Days until the pitcher's next game appearance. |
| batter_days_until_next_game | integer | Days until the batter's next game appearance. |
| api_break_z_with_gravity | numeric | Vertical pitch break including gravity (inches). |
| api_break_x_arm | numeric | Horizontal pitch break to the pitcher's arm side (inches). |
| api_break_x_batter_in | numeric | Horizontal pitch break toward/away from the batter (inches). |
| arm_angle | numeric | Pitcher's arm angle at release (degrees). |
| attack_angle | numeric | Angle of the bat's path at contact (degrees). |
| attack_direction | numeric | Horizontal direction of the swing at contact (degrees). |
| swing_path_tilt | numeric | Vertical tilt of the swing path (degrees). |
| intercept_ball_minus_batter_pos_x_inches | numeric | Horizontal offset of ball-bat intercept from batter position (inches). |
| intercept_ball_minus_batter_pos_y_inches | numeric | Depth offset of ball-bat intercept from batter position (inches). |
Returns a tibble with Statcast data.
Returns a tibble with the same Statcast pitch-level columns as
statcast_search(), filtered to the requested batter. See the
statcast_search() return value for the full column-by-column reference.
Returns a tibble with the same Statcast pitch-level columns as
statcast_search(), filtered to the requested pitcher. See the
statcast_search() return value for the full column-by-column reference.
### Harper try(statcast_search(start_date = "2022-10-06", end_date = "2022-10-16", playerid = 547180, player_type = 'batter')) ### Framber try(statcast_search(start_date = "2022-10-06", end_date = "2022-10-16", playerid = 664285, player_type = 'pitcher')) ### Daily try(statcast_search(start_date = "2022-11-04", end_date = "2022-11-06")) try({ correa <- statcast_search_batters(start_date = "2016-04-06", end_date = "2016-04-15", batterid = 621043) daily <- statcast_search_batters(start_date = "2016-04-06", end_date = "2016-04-06", batterid = NULL) }) try({ x <- statcast_search_pitchers(start_date = "2016-04-06", end_date = "2016-04-15", pitcherid = 592789) daily <- statcast_search_pitchers(start_date = "2016-04-06", end_date = "2016-04-06", pitcherid = NULL) })### Harper try(statcast_search(start_date = "2022-10-06", end_date = "2022-10-16", playerid = 547180, player_type = 'batter')) ### Framber try(statcast_search(start_date = "2022-10-06", end_date = "2022-10-16", playerid = 664285, player_type = 'pitcher')) ### Daily try(statcast_search(start_date = "2022-11-04", end_date = "2022-11-06")) try({ correa <- statcast_search_batters(start_date = "2016-04-06", end_date = "2016-04-15", batterid = 621043) daily <- statcast_search_batters(start_date = "2016-04-06", end_date = "2016-04-06", batterid = NULL) }) try({ x <- statcast_search_pitchers(start_date = "2016-04-06", end_date = "2016-04-15", pitcherid = 592789) daily <- statcast_search_pitchers(start_date = "2016-04-06", end_date = "2016-04-06", pitcherid = NULL) })
This function allows you to create stat lines of statistics for players or groups of players from raw Statcast. When calculating wOBA, the most recent year in the data frame is used for weighting.
statline_from_statcast(df, base = "pa")statline_from_statcast(df, base = "pa")
df |
A data frame of statistics that includes, at a minimum, the following columns: events, description, game_date, and type. |
base |
Tells the function what to use as the population of pitches to use for the stat line. Options include "swings", "contact", or "pa". Defaults to "pa". |
statline_from_statcast(df, base = "contact")
A tibble with the additional columns calculated using the Statcast data.
An empty tibble
stats_api_live_empty_dfstats_api_live_empty_df
An object of class tbl_df (inherits from tbl, data.frame) with 0 rows and 131 columns.
This function allows you to calculate team-level consistency in run scoring and run prevention over the course of an entire season.
team_consistency(year)team_consistency(year)
year |
Season consistency should be run for. |
try(team_consistency(year=2021))
Returns a tibble with the following columns
| col_name | types |
| Team | character |
| Con_R | numeric |
| Con_RA | numeric |
| Con_R_Ptile | numeric |
| Con_RA_Ptile | numeric |
(legacy) Scrape Team Results
team_results_bref(Tm, year)team_results_bref(Tm, year)
Tm |
The abbreviation used by Baseball-Reference.com for the team whose results you want to scrape. |
year |
Season for which you want to scrape the park factors. |
Returns a tibble of MLB team results
A Team Lookup Table
teams_lu_tableteams_lu_table
An object of class data.frame with 797 rows and 31 columns.
This function allows you to calculate wOBA for any given set of data, provided the right variables are in the data set. The function currently returns both wOBA per plate appearance on wOBA per instance of fair contact.
woba_plus(df)woba_plus(df)
df |
A data frame of statistics that includes, at a minimum, the following columns: uBB (unintentional walks), HBP (Hit By Pitch), X1B (singles), X2B (doubles), X3B (triples), HR (home runs), AB (at-bats), SH (sacrifice hits), SO (strike outs), and season. |
Returns a tibble with the wOBA factors calculated and the following columns:
| col_name | types |
| bbref_id | character |
| season | integer |
| Name | character |
| Age | numeric |
| Level | character |
| Team | character |
| G | numeric |
| PA | numeric |
| AB | numeric |
| R | numeric |
| H | numeric |
| X1B | numeric |
| X2B | numeric |
| X3B | numeric |
| HR | numeric |
| RBI | numeric |
| BB | numeric |
| IBB | numeric |
| uBB | numeric |
| SO | numeric |
| HBP | numeric |
| SH | numeric |
| SF | numeric |
| GDP | numeric |
| SB | numeric |
| CS | numeric |
| BA | numeric |
| OBP | numeric |
| SLG | numeric |
| OPS | numeric |
| wOBA | numeric |
| wOBA_CON | numeric |
try({ df <- bref_daily_batter("2015-08-01", "2015-10-03") woba_plus(df) })try({ df <- bref_daily_batter("2015-08-01", "2015-10-03") woba_plus(df) })