Skip to content

wpinvestigative/baseball_spin

Repository files navigation

[This data is published under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license]

About this story

How baseball’s war on sticky stuff is already changing the game

The Washington Post reviewed MLB footage and analyzed nearly 2 million pitches, focusing primarily on fastballs, from data provided by Baseball Prospectus since 2017 when spin rates first started being tracked reliably. Details on The Post’s methodology and summarized data through June 24 can be found within this repo.

About the data

The raw data is unavailable to post here because it comes from Baseball Prospectus and is too large to put on Github

Folders of note in this repo

https://github.com/wpinvestigative/baseball_spin/tree/main/outputs/findings

Notebooks

Explorer app

To run the app, you must have R version 3.5 or later installed first.

Via terminal

After you've installed R, In the terminal, run

R -e "install.packages('shiny', repos='https://cran.rstudio.com/')"
R -e "shiny::runGitHub('baseball_spin', 'wpinvestigative', ref="main", launch.browser=TRUE)"

Via RStudio

The application can be run locally with the following command in R Studio:

install.packages("shiny", repos="https://cran.rstudio.com/")
shiny::runGitHub("baseball_spin", "wpinvestigative", ref="main")

troubleshooting

If you have connectivity issues, you may need to preinstall some packages:

# run these lines in RStudio console

packages <- c("tidyverse", "shiny", "shinyWidgets", "lubridate", "shinythemes", "DT")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
  install.packages(setdiff(packages, rownames(installed.packages())), repos = "https://cran.us.r-project.org")  
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published