Welcome folks,
I’m Saiem Gilani, one of the authors of baseballr
, and I hope to give the community a high-quality resource for accessing men’s baseball data for statistical analysis, baseball research, and more. I am excited to show you some of what you can do with this edition of the package.
baseballr
# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
install.packages('pacman')
}::p_load_current_gh("billpetti/baseballr") pacman
There are generally speaking eight men’s baseball data sources accessible from this package:
baseballr-data
repo As of baseballr v1.0.0, a function naming convention was implemented to have the data source indicator appear at the start of the function name:
Functions that use the baseballr-data
repository will contain load_
or update_
in the function name and would be considered loading functions for the play-by-play data, team box scores, and player box scores.
Functions that use the MLB Stats API start with mlb_
by convention and should be assumed as get
functions. As of baseballr
version 1.2.0, the package exports ~88 functions covering the MLB Stats API.
Functions that use one of Baseball Savant’s Statcast APIs start with statcast_
by convention and should be assumed as get
functions. These functions allow for live access to Statcast data for the MLB games in-progress. As of baseballr
version 1.2.0, the package exports ~5 Statcast-related functions.
Functions that use Chadwick Bureau’s Public Register of Baseball Players start with chadwick_
, playerid_
, or playername_
by convention and should be assumed as get
functions. These functions allow for access to the Bureau’s public register of baseball players. As of baseballr
version 1.2.0, the package exports 3 functions sourced using the Chadwick Bureau’s public register of baseball players.
Functions that use Baseball Reference’s website start with bref_
by convention and should be assumed as get
functions. As of baseballr
version 1.2.0, the package exports ~4 functions covering Baseball Reference.
Functions that use FanGraphs’s baseball website start with fg_
by convention and should be assumed as get
functions. As of baseballr
version 1.2.0, the package exports ~11 functions covering FanGraphs.com.
Functions that use Retrosheet’s baseball data start with retrosheet_
by convention and should be assumed as get
functions. As of baseballr
version 1.2.0, the package exports 1 function for Retrosheet Data.
Functions that use the NCAA website start with ncaa_
by convention and should be assumed as get
functions. As of baseballr
version 1.2.0, the package exports ~8 function covering the NCAA Stats portal.