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

Examples

# \donttest{
  fg_milb_pitcher_game_logs(playerid = "sa3005315", year=2021)
#> 2022-04-30 07:15:16: Invalid arguments or no MiLB pitcher game logs data available!
#>          Date Team Level  Opp W L       ERA G GS CG ShO SV  IP TBF H R
#> 2  2021-09-12  CIN (AAA)  PIT 0 1  2.250000 1  1  0   0  0 4.0  16 4 3
#> 3  2021-09-07  CIN (AAA)  PIT 0 1 13.500000 1  1  0   0  0 4.0  21 8 6
#> 4  2021-09-01  CIN (AAA)  MIL 1 0  1.800000 1  1  0   0  0 5.0  23 4 2
#> 5  2021-08-25  CIN (AAA) @PIT 1 0  0.000000 1  1  0   0  0 5.0  18 2 0
#> 6  2021-08-17  CIN (AAA)  ATL 0 1 13.499983 1  1  0   0  0 2.2  12 4 4
#> 7  2021-08-05  CIN (AAA) @MIN 1 0  0.000000 1  1  0   0  0 6.1  21 1 0
#> 8  2021-07-29  CIN (AAA) @CHC 0 1  3.000000 1  1  0   0  0 6.0  26 8 2
#> 9  2021-07-23  CIN (AAA)  STL 0 1  5.400000 1  1  0   0  0 5.0  20 4 3
#> 10 2021-07-17  CIN (AAA) @MIL 1 0  0.000000 1  1  0   0  0 5.0  19 2 0
#> 11 2021-07-11  CIN (AAA)  STL 0 0  1.800000 1  1  0   0  0 5.0  22 6 1
#> 12 2021-07-04  CIN (AAA) @MIL 0 1 11.250000 1  1  0   0  0 4.0  22 6 5
#> 13 2021-06-29  CIN (AAA) @MIL 0 1  6.230774 1  1  0   0  0 4.1  19 4 5
#> 14 2021-06-23  CIN (AAA)  PIT 1 0  0.000000 1  1  0   0  0 5.0  20 2 0
#> 15 2021-06-17  CIN (AAA) @KCR 0 1  9.000000 1  1  0   0  0 4.0  17 4 4
#> 16 2021-06-11  CIN  (AA)  MIA 1 0  0.000000 1  1  0   0  0 6.0  25 2 0
#> 17 2021-06-04  CIN  (AA) @LAA 1 0  4.049998 1  1  0   0  0 6.2  28 7 3
#> 18 2021-05-29  CIN  (AA)  CHC 0 0  2.571429 1  1  0   0  0 7.0  27 7 2
#> 19 2021-05-22  CIN  (AA) @ATL 0 0  1.687501 1  1  0   0  0 5.1  23 3 1
#> 20 2021-05-16  CIN  (AA) @TBR 1 0  0.000000 1  1  0   0  0 6.0  23 3 0
#> 21 2021-05-11  CIN  (AA) @TBR 1 0  3.600000 1  1  0   0  0 5.0  18 2 2
#> 22 2021-05-05  CIN  (AA)  LAA 1 0  1.800000 1  1  0   0  0 5.0  18 3 1
#>    ER HR BB IBB HBP WP BK SO      K/9     BB/9  K/BB      HR/9
#> 2   1  1  1   0   0  0  0  3  6.75000 2.250000  3.00  2.250000
#> 3   6  1  1   0   1  0  0  3  6.75000 2.250000  3.00  2.250000
#> 4   1  0  3   0   0  0  0  6 10.80000 5.400000  2.00  0.000000
#> 5   0  0  2   0   0  0  0  3  5.40000 3.600000  1.50  0.000000
#> 6   4  3  1   0   0  0  0  4 13.49998 3.374996  4.00 10.124987
#> 7   0  0  1   0   1  0  0 10 14.21053 1.421053 10.00  0.000000
#> 8   2  0  1   0   1  0  0  7 10.50000 1.500000  7.00  0.000000
#> 9   3  1  1   0   0  0  0  9 16.20000 1.800000  9.00  1.800000
#> 10  0  0  2   0   0  1  0  9 16.20000 3.600000  4.50  0.000000
#> 11  1  1  2   0   0  0  0  2  3.60000 3.600000  1.00  1.800000
#> 12  5  0  4   0   1  0  0  2  4.50000 9.000000  0.50  0.000000
#> 13  3  0  2   0   0  1  0  7 14.53847 4.153849  3.50  0.000000
#> 14  0  0  3   0   0  0  0  6 10.80000 5.400000  2.00  0.000000
#> 15  4  4  1   0   0  0  0  8 18.00000 2.250000  8.00  9.000000
#> 16  0  0  4   0   2  1  0  9 13.50000 6.000000  2.25  0.000000
#> 17  3  1  1   0   1  0  0 10 13.49999 1.349999 10.00  1.349999
#> 18  2  0  1   0   0  0  0  8 10.28571 1.285714  8.00  0.000000
#> 19  1  0  5   0   0  1  0  8 13.50001 8.437505  1.60  0.000000
#> 20  0  0  2   0   0  0  0 10 15.00000 3.000000  5.00  0.000000
#> 21  2  1  1   0   0  0  0  7 12.60000 1.800000  7.00  1.800000
#> 22  1  0  0   0   0  0  0  8 14.40000 0.000000  8.00  0.000000
#>            K%       K-BB%        BB%        AVG      WHIP     BABIP
#> 2  0.18750000  0.12500000 0.06250000 0.26666667 1.2500000 0.2727273
#> 3  0.14285714  0.09523809 0.04761905 0.42105263 2.2500000 0.4666667
#> 4  0.26086957  0.13043479 0.13043478 0.20000000 1.4000000 0.2857143
#> 5  0.16666667  0.05555556 0.11111111 0.12500000 0.8000000 0.1538461
#> 6  0.33333333  0.25000000 0.08333333 0.36363636 1.8749976 0.2500000
#> 7  0.47619048  0.42857143 0.04761905 0.05263158 0.3157896 0.1111111
#> 8  0.26923077  0.23076923 0.03846154 0.33333333 1.5000000 0.4705882
#> 9  0.45000000  0.40000000 0.05000000 0.21052632 1.0000000 0.3333333
#> 10 0.47368421  0.36842105 0.10526316 0.11764706 0.8000000 0.2500000
#> 11 0.09090909  0.00000000 0.09090909 0.30000000 1.6000000 0.2941177
#> 12 0.09090909 -0.09090909 0.18181818 0.35294118 2.5000000 0.4000000
#> 13 0.36842105  0.26315789 0.10526316 0.23529412 1.3846164 0.4000000
#> 14 0.30000000  0.15000000 0.15000000 0.11764706 1.0000000 0.1818182
#> 15 0.47058824  0.41176471 0.05882353 0.25000000 1.2500000 0.0000000
#> 16 0.36000000  0.20000000 0.16000000 0.10526316 1.0000000 0.2000000
#> 17 0.35714286  0.32142857 0.03571429 0.26923077 1.1999994 0.4000000
#> 18 0.29629630  0.25925926 0.03703704 0.26923077 1.1428571 0.3888889
#> 19 0.34782609  0.13043479 0.21739130 0.16666667 1.5000009 0.3000000
#> 20 0.43478261  0.34782609 0.08695652 0.14285714 0.8333333 0.2727273
#> 21 0.38888889  0.33333333 0.05555556 0.11764706 0.6000000 0.1111111
#> 22 0.44444444  0.44444444 0.00000000 0.16666667 0.6000000 0.3000000
#>         LOB%        FIP   gamedate dh
#> 2  0.5555556  5.8625366 2021-09-12  1
#> 3  0.4651163  6.6125366 2021-09-07  1
#> 4  0.7142857  2.7625366 2021-09-01  1
#> 5  1.0000000  3.3625366 2021-08-25  1
#> 6  1.0000000 16.1125203 2021-08-17  1
#> 7  1.0000000  1.1520092 2021-08-05  1
#> 8  0.8000000  2.0292033 2021-07-29  1
#> 9  0.5555556  2.9625366 2021-07-23  1
#> 10 1.0000000  0.9625366 2021-07-17  1
#> 11 1.0000000  6.3625366 2021-07-11  1
#> 12 0.5454545  6.1125366 2021-07-04  1
#> 13 0.1666667  1.5163814 2021-06-29  1
#> 14 1.0000000  2.7625366 2021-06-23  1
#> 15 1.0000000 13.1125366 2021-06-17  1
#> 16 1.0000000  3.4009687 2021-06-11  1
#> 17 0.7894737  3.2509688 2021-06-04  1
#> 18 0.7500000  1.5438259 2021-05-29  1
#> 19 0.8750000  3.2134686 2021-05-22  1
#> 20 1.0000000  1.0676354 2021-05-16  1
#> 21 0.6250000  3.8009687 2021-05-11  1
#> 22 0.6666667  0.2009687 2021-05-05  1
# }