# Acquiring and Analyzing Baseball Data

## Documentation for package ‘baseballr’ version 1.6.0

- DESCRIPTION file
- Package NEWS
- Package README

## Help Pages

B C D E F G L M N P R S T W

## -- B --

batter_game_logs_fg | *(legacy) Scrape Batter Game Logs from FanGraphs*
bref | *Baseball Reference Functions Overview*
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*

## -- C --

chadwick | *Chadwick Bureau Register Player Lookup*
chadwick_find_lib | Check Chadwick installation
chadwick_is_installed | Check Chadwick installation
chadwick_ld_library_path | Check Chadwick installation
chadwick_path | Check Chadwick installation
chadwick_player_lu | *Download the Chadwick Bureau's public register of baseball players*
chadwick_set_ld_library_path | Check Chadwick installation
code_barrel | *Helper for determining whether a batted ball is a "barrel"*
column_structure_draft_mlb | *Column structure of the MLB Draft data*

## -- D --

daily_batter_bref | *(legacy) Scrape Batter Performance Data Over a Custom Time Frame*
daily_pitcher_bref | *(legacy) Scrape Pitcher Performance Data Over a Custom Time Frame*

## -- E --

edge_code | *Edge Code*
edge_frequency | *Edge Percentage Frequency*

## -- F --

fangraphs | *FanGraphs Functions Overview*
fg_batter_game_logs | *Scrape Batter Game Logs from FanGraphs*
fg_batter_leaders | *Scrape Batter Leaderboards from FanGraphs*
fg_bat_leaders | *(legacy) Scrape Batter Leaderboards from FanGraphs*
fg_fielder_leaders | *Scrape Fielder Leaderboards from FanGraphs*
fg_guts | *Scrape FanGraphs.com Guts!*
fg_milb_batter_game_logs | *Scrape MiLB game logs for batters from FanGraphs*
fg_milb_pitcher_game_logs | *Scrape MiLB game logs for pitchers from FanGraphs*
fg_park | *Scrape Park Factors from FanGraphs*
fg_park_hand | *Scrape Park Factors from FanGraphs*
fg_pitcher_game_logs | *Scrape Pitcher Game Logs from FanGraphs*
fg_pitcher_leaders | *Scrape Pitcher Leaderboards from FanGraphs*
fg_pitch_leaders | *(legacy) Scrape Pitcher Leaderboards from FanGraphs*
fg_team_batter | *Scrape Team Batter Leaderboards from FanGraphs*
fg_team_fielder | *Scrape Team Fielder Leaderboards from FanGraphs*
fg_team_pitcher | *Scrape Team Pitcher Leaderboards from FanGraphs*
fip_plus | *Calculate FIP and related metrics for any set of data*

## -- G --

get_batting_orders | *(legacy) Retrieve batting orders for a given MLB game*
get_chadwick_lu | *Download the Chadwick Bureau's public register of baseball players*
get_draft_mlb | *(legacy) Retrieve draft pick information by year*
get_game_info_mlb | *(legacy) Retrieve additional game information for major and minor league games*
get_game_info_sup_petti | *(legacy) Download a data frame of supplemental data about MLB games since 2008.*
get_game_pks_mlb | *(legacy) Get MLB Game Info by Date and Level*
get_ncaa_baseball_pbp | *(legacy) Get Play-By-Play Data for NCAA Baseball Games*
get_ncaa_baseball_roster | *(legacy) Get NCAA Baseball Rosters*
get_ncaa_game_logs | *(legacy) Get NCAA Baseball Game Logs*
get_ncaa_lineups | *(legacy) Retrieve lineups for a given NCAA game via its 'game_info_url'*
get_ncaa_park_factor | *(legacy) Get Park Effects for NCAA Baseball Teams*
get_ncaa_schedule_info | *(legacy) Get Schedule and Results for NCAA Baseball Teams*
get_pbp_mlb | *(legacy) Acquire pitch-by-pitch data for Major and Minor League games*
get_probables_mlb | *(legacy) Retrieve probable starters for a given MLB game*
get_retrosheet_data | *(legacy) Get, Parse, and Format Retrosheet Event and Roster Files*
get_umpire_ids_petti | *(legacy) Download a data frame of all umpires and their MLBAM IDs for games since 2008*
ggspraychart | *Generate spray charts with ggplot2*

## -- L --

label_statcast_imputed_data | *Label Statcast data as imputed*
linear_weights_savant | *Generate linear weight values for events using Baseball Savant data*
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*
load_umpire_ids | *Download a data frame of all umpires and their mlbamids for games since 2008*

## -- M --

metrics | *Metrics Functions Overview*
milb_batter_game_logs_fg | *(legacy) Scrape MiLB game logs for batters from FanGraphs*
milb_pitcher_game_logs_fg | *(legacy) Scrape MiLB game logs for pitchers from FanGraphs*
mlb | *MLB Functions Overview*
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_attendance | *MLB Attendance*
mlb_award | *MLB All-Star, Awards, Home Run Derby Functions*
mlb_awards | *MLB Awards*
mlb_awards_recipient | *MLB Award Recipients*
mlb_baseball_stats | *MLB Baseball Stats*
mlb_batting_orders | *Retrieve batting orders for a given MLB game*
mlb_conferences | *View all PCL conferences*
mlb_divisions | *MLB Divisions*
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*
mlb_event_types | *MLB Event Types*
mlb_fielder_detail_types | *MLB Fielder Detail Types*
mlb_game_changes | *Acquire time codes for Major and Minor League games*
mlb_game_content | *Retrieve additional game content for major and minor league games*
mlb_game_context_metrics | *Acquire game context metrics for Major and Minor League games*
mlb_game_info | *Retrieve additional game information for major and minor league games*
mlb_game_linescore | *Retrieve game linescores for major and minor league games*
mlb_game_pace | *Retrieve game pace metrics for major and minor league*
mlb_game_pks | *Get MLB Game Info by Date and Level*
mlb_game_status_codes | *MLB Game Status Codes*
mlb_game_timecodes | *Acquire time codes for Major and Minor League games*
mlb_game_types | *MLB Game Types*
mlb_game_wp | *Acquire win probability for Major and Minor League games*
mlb_high_low_stats | *Acquire high/low stats for Major and Minor Leagues*
mlb_high_low_types | *MLB Stat High/Low Types*
mlb_hit_trajectories | *MLB Hit Trajectories*
mlb_homerun_derby | *Retrieve Homerun Derby data*
mlb_homerun_derby_bracket | *Retrieve Homerun Derby Bracket*
mlb_homerun_derby_players | *Retrieve Homerun Derby Players*
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*
mlb_languages | *MLB API Language Options*
mlb_league | *MLB Leagues*
mlb_league_leader_types | *MLB League Leader Types*
mlb_logical_events | *MLB Logical Events*
mlb_metrics | *MLB Metrics*
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*
mlb_people | *Find Biographical Information for MLB Players*
mlb_people_free_agents | *Find Information About MLB Free Agents*
mlb_pitch_codes | *MLB Pitch Codes*
mlb_pitch_types | *MLB Pitch Types*
mlb_player_game_stats | *Find MLB Player Game Stats*
mlb_player_game_stats_current | *Find MLB Player Game Stats - Current Game*
mlb_player_status_codes | *MLB Player Status Codes*
mlb_positions | *MLB Positions*
mlb_probables | *Retrieve probable starters for a given MLB game*
mlb_review_reasons | *MLB Review Reasons*
mlb_rosters | *Find MLB Rosters by Roster Type*
mlb_roster_types | *MLB Roster Types*
mlb_runner_detail_types | *MLB Runner Detail Types*
mlb_schedule | *Find game_pk values for professional baseball games (major and minor leagues)*
mlb_schedule_event_types | *MLB Schedule Event Types*
mlb_schedule_games_tied | *Find game_pk values for professional baseball games (major and minor leagues) that are tied*
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_seasons | *Find MLB Seasons*
mlb_seasons_all | *Find MLB Seasons all*
mlb_situation_codes | *MLB Situation Codes*
mlb_sky | *MLB Sky (Weather) Codes*
mlb_sports | *MLB Sport IDs*
mlb_sports_info | *MLB Sport IDs Information*
mlb_sports_players | *MLB Sport Players*
mlb_standings | *MLB Standings*
mlb_standings_types | *MLB Standings Types*
mlb_stats | *MLB Stats*
mlb_stats_leaders | *MLB Stats Leaders*
mlb_stat_groups | *MLB Stat Groups*
mlb_stat_types | *MLB Stat Types*
mlb_teams | *MLB Teams*
mlb_teams_stats | *MLB Teams Stats*
mlb_teams_stats_leaders | *MLB Teams Stats Leaders*
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_info | *MLB Team Info*
mlb_team_leaders | *MLB Team Leaders*
mlb_team_personnel | *MLB Team Personnel*
mlb_team_stats | *MLB Team Individual Stats*
mlb_venues | *Find MLB Venues*
mlb_wind_direction_codes | *MLB Wind Direction Codes*
most_recent_mlb_season | *Most Recent MLB Season*
most_recent_ncaa_baseball_season | *Most Recent NCAA Baseball Season*

## -- N --

ncaa | *NCAA Functions Overview*
ncaa_baseball_pbp | *(legacy) Get Play-By-Play Data for NCAA Baseball Games*
ncaa_baseball_roster | *(legacy) Get NCAA Baseball Rosters*
ncaa_game_logs | *Get NCAA Baseball Game Logs*
ncaa_lineups | *Retrieve lineups for a given NCAA game via its 'game_info_url'*
ncaa_park_factor | *Get Park Effects for NCAA Baseball Teams*
ncaa_pbp | *Get Play-By-Play Data for NCAA Baseball Games*
ncaa_roster | *Get NCAA Baseball Rosters*
ncaa_schedule_info | *Get Schedule and Results for NCAA Baseball Teams*
ncaa_school_id_lu | *Lookup NCAA baseball school IDs (Division I, II, and III)*
ncaa_scrape | *(legacy) Scrape NCAA baseball Team Player Stats (Division I, II, and III)*
ncaa_teams | *Scrape NCAA baseball Teams (Division I, II, and III)*
ncaa_team_player_stats | *Scrape NCAA baseball Team Player Stats (Division I, II, and III)*

## -- P --

pitcher_game_logs_fg | *(legacy) Scrape Pitcher Game Logs from FanGraphs*
playerid_lookup | *Look up Baseball Player IDs by Player Name*
playername_lookup | *Look up Baseball Player Name by ID*
process_statcast_payload | *Process Baseball Savant CSV payload*

## -- R --

retrosheet_data | *Get, Parse, and Format Retrosheet Event and Roster Files*
run_expectancy_code | *Generate run expectancy and related measures from Baseball Savant data*

## -- S --

school_id_lu | *(legacy) Lookup NCAA baseball school IDs (Division I, II, and III)*
scrape_savant_leaderboards | *(legacy) Query Baseball Savant Leaderboards*
scrape_statcast_savant | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant.Date | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant.default | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant_batter | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant_batter_all | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant_pitcher | *(legacy) Query Statcast by Date Range and Players*
scrape_statcast_savant_pitcher_all | *(legacy) Query Statcast by Date Range and Players*
sptrc_league_payrolls | *Scrape League Payroll Breakdowns from Spotrac*
sptrc_team_active_payroll | *Scrape Team Active Payroll Breakdown from Spotrac*
standings_on_date_bref | *(legacy) Scrape MLB Standings on a Given Date*
statcast | *Statcast Functions Overview*
statcast_impute | *Statcast Label Imputation*
statcast_leaderboards | *Query Baseball Savant Leaderboards*
statcast_search | *Query Statcast by Date Range and Players*
statcast_search.default | *Query Statcast by Date Range and Players*
statcast_search_batters | *Query Statcast by Date Range and Players*
statcast_search_pitchers | *Query Statcast by Date Range and Players*
statline_from_statcast | *Create stat lines from Statcast data*
stats_api_live_empty_df | *Column structure of MLB Stats Live Game API data frame*

## -- T --

teams_lu_table | *A Team Lookup Table*
team_consistency | *Calculate Team-level Consistency*
team_results_bref | *(legacy) Scrape Team Results*

## -- W --

woba_plus | *Calculate wOBA and related metrics for any set of data*