Skip to contents

This function allows you to scrape MiLB game logs for individual batters from FanGraphs.com.

Usage

fg_milb_pitcher_game_logs(playerid, year)

Arguments

playerid

The pitcher's minor league ID from FanGraphs.com.

year

The season for which game logs should be returned.

Value

Returns a tibble of Minor League pitcher game logs.

col_nametypes
player_namecharacter
minor_playeridcharacter
Datecharacter
Teamcharacter
Levelcharacter
Oppcharacter
Wnumeric
Lnumeric
ERAnumeric
Gnumeric
GSnumeric
CGnumeric
ShOnumeric
SVnumeric
IPnumeric
TBFnumeric
Hnumeric
Rnumeric
ERnumeric
HRnumeric
BBnumeric
IBBnumeric
HBPnumeric
WPnumeric
BKnumeric
SOnumeric
K/9numeric
BB/9numeric
K/BBnumeric
HR/9numeric
K%numeric
K-BB%numeric
BB%numeric
AVGnumeric
WHIPnumeric
BABIPnumeric
LOB%numeric
FIPnumeric
gamedatecharacter
dhinteger
UPIdcharacter
MLBAMIdcharacter
MinorMasterIdcharacter
RRIdcharacter
FirstNamecharacter
LastNamecharacter
firstLastNamecharacter
Heightcharacter
Weightcharacter
BirthDatecharacter
Batscharacter
Throwscharacter
Positioncharacter
BirthCitycharacter
Collegecharacter
Agecharacter

Examples

# \donttest{
  try(fg_milb_pitcher_game_logs(playerid = "sa3020682", year=2023))
#> ── MiLB Pitcher Game Logs data from FanGraphs.com ─── baseballr 1.6.0 ──
#>  Data updated: 2024-04-13 21:55:05 UTC
#> # A tibble: 20 × 58
#>    player_name  minor_playerid Date  Team  Level Opp       W     L   ERA
#>    <chr>        <chr>          <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl>
#>  1 Chase Hampt… sa3020682      2023… NYY   (AA)  COL       0     0  0   
#>  2 Chase Hampt… sa3020682      2023… NYY   (AA)  @PHI      1     0  3   
#>  3 Chase Hampt… sa3020682      2023… NYY   (AA)  NYM       0     1 11.2 
#>  4 Chase Hampt… sa3020682      2023… NYY   (AA)  @CLE      0     1  3.6 
#>  5 Chase Hampt… sa3020682      2023… NYY   (AA)  BAL       0     0  7.2 
#>  6 Chase Hampt… sa3020682      2023… NYY   (AA)  @COL      0     0  5.14
#>  7 Chase Hampt… sa3020682      2023… NYY   (AA)  @NYM      1     0  3.38
#>  8 Chase Hampt… sa3020682      2023… NYY   (AA)  PHI       0     0  3.6 
#>  9 Chase Hampt… sa3020682      2023… NYY   (AA)  @BAL      0     0  7.94
#> 10 Chase Hampt… sa3020682      2023… NYY   (AA)  TOR       0     0  1.59
#> 11 Chase Hampt… sa3020682      2023… NYY   (AA)  PIT       0     0  3   
#> 12 Chase Hampt… sa3020682      2023… NYY   (A+)  @PHI      1     0  0   
#> 13 Chase Hampt… sa3020682      2023… NYY   (A+)  BAL       0     0  2.57
#> 14 Chase Hampt… sa3020682      2023… NYY   (A+)  @WSN      0     0  3.38
#> 15 Chase Hampt… sa3020682      2023… NYY   (A+)  NYM       0     1  3.38
#> 16 Chase Hampt… sa3020682      2023… NYY   (A+)  @BAL      1     0  0   
#> 17 Chase Hampt… sa3020682      2023… NYY   (A+)  WSN       0     0  1.8 
#> 18 Chase Hampt… sa3020682      2023… NYY   (A+)  @BOS      0     0  9.64
#> 19 Chase Hampt… sa3020682      2023… NYY   (A+)  @ATL      0     0  3.86
#> 20 Chase Hampt… sa3020682      2023… NYY   (A+)  BAL       0     0  0   
#> # ℹ 49 more variables: G <dbl>, GS <dbl>, QS <dbl>, CG <dbl>,
#> #   ShO <dbl>, SV <dbl>, IP <dbl>, TBF <dbl>, H <dbl>, R <dbl>,
#> #   ER <dbl>, HR <dbl>, BB <dbl>, IBB <dbl>, HBP <dbl>, WP <dbl>,
#> #   BK <dbl>, SO <dbl>, `K/9` <dbl>, `BB/9` <dbl>, `K/BB` <dbl>,
#> #   `HR/9` <dbl>, `K%` <dbl>, `K-BB%` <dbl>, `BB%` <dbl>, AVG <dbl>,
#> #   WHIP <dbl>, BABIP <dbl>, `LOB%` <dbl>, FIP <dbl>, gamedate <chr>,
#> #   dh <int>, UPId <chr>, MLBAMId <chr>, MinorMasterId <chr>, …
# }