
Scrape Pitcher Performance Data Over a Custom Time Frame
Source:R/bref_daily_pitcher.R
      bref_daily_pitcher.RdThis function allows you to scrape basic pitcher statistics over a custom time frame. Data is sourced from Baseball-Reference.com.
Arguments
- 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"
Value
Returns a tibble of pitcher performance 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 | 
Examples
# \donttest{
  try(bref_daily_pitcher("2015-05-10", "2015-06-20"))
#> ── MLB Daily Pitcher data from baseball-reference.com ──────────────────
#> ℹ Data updated: 2024-04-13 21:54:16 UTC
#> # A tibble: 511 × 46
#>    bbref_id season Name    Age Level Team      G    GS     W     L    SV
#>    <chr>     <int> <chr> <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 salech01   2015 Chri…    26 Maj-… Chic…     8     8     4     2    NA
#>  2 scherma…   2015 Max …    30 Maj-… Wash…     8     8     6     2    NA
#>  3 buehrma…   2015 Mark…    36 Maj-… Toro…     8     8     3     2    NA
#>  4 klubeco…   2015 Core…    29 Maj-… Clev…     8     8     3     4    NA
#>  5 keuchda…   2015 Dall…    27 Maj-… Hous…     8     8     4     3    NA
#>  6 degroja…   2015 Jaco…    27 Maj-… New …     8     8     4     2    NA
#>  7 samarje…   2015 Jeff…    30 Maj-… Chic…     8     8     2     2    NA
#>  8 colege01   2015 Gerr…    24 Maj-… Pitt…     8     8     7     1    NA
#>  9 buchhcl…   2015 Clay…    30 Maj-… Bost…     8     8     3     2    NA
#> 10 burnea.…   2015 A.J.…    38 Maj-… Pitt…     8     8     5     2    NA
#> # ℹ 501 more rows
#> # ℹ 35 more variables: IP <dbl>, H <dbl>, R <dbl>, ER <dbl>, uBB <dbl>,
#> #   BB <dbl>, SO <dbl>, HR <dbl>, HBP <dbl>, ERA <dbl>, AB <dbl>,
#> #   X1B <dbl>, X2B <dbl>, X3B <dbl>, IBB <dbl>, GDP <dbl>, SF <dbl>,
#> #   SB <dbl>, CS <dbl>, PO <dbl>, BF <dbl>, Pit <dbl>, Str <dbl>,
#> #   StL <dbl>, StS <dbl>, GB.FB <dbl>, LD <dbl>, PU <dbl>, WHIP <dbl>,
#> #   BAbip <dbl>, SO9 <dbl>, SO.W <dbl>, SO_perc <dbl>, …
# }