This is a work-in-progress R package for scraping, processing, analyzing and visualizing MLB data — including tools for pulling birthplace stats by country from Baseball Reference.
To contribute or test the package locally, follow these steps:
- In RStudio, go to
File > New Project > Version Control > Git. - Enter the repository URL: https://github.com/darh78/bbgraphsR.git
- Choose a local folder where the project will be saved.
- Click Create Project — this will open a new RStudio session with the project.
You’ll need devtools, which makes it easy to load the package without installing it:
install.packages("devtools") From within the project directory (or inside RStudio):
devtools::load_all()This simulates loading the package as if it were installed, without actually installing it. You can now call any exported functions.
# Load the package code
devtools::load_all()
# Run some functions
get_players_by_country(c("Dominican Republic", "Venezuela"))
viz_wlp_season("AL East", 2025)
viz_debut_running_total(c("Dominican Republic", "Venezuela", "Japan", "Mexico", "Puerto Rico", "Cuba" ))• This package is not yet available via CRAN or installable via library().
• Once stable, installation instructions will be updated.
Maintainer: Daniel Hernández
GitHub: @darh78