Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animated MLB Plots 2025

This project creates animated .gif plots in R for the 2025 MLB season and puts them in a Shiny wrapper.

Details

This project scrapes baseball data, primarily wins and losses, over the course of the 2025 MLB season. Data from:

  • baseball-reference.com
  • teamcolorcodes.com

is used to create the final plots. As a result, there is always the possibility that the code to scrape the websites stops working.

The first plot shows a teams wins and their Pythagorean Winning Percentage over the course of the season. The second plot looks at how each teams' winning percent changed over the course of the season and how the associated confidence interval around the estimate shrank as more data became available.

Directories

  1. 01Scrape.R scrapes MLB and team color data, cleans it and saves it.
  2. 02Plot.R creates the animated .gif plots.
  3. 03Shiny.R wraps the animated plots in a Shiny app.
  4. Plots contains the plots for the Shiny app.

Further Information

A detailed write-up of this project can be found here: https://ryanpapale.github.io/mlb2025.

About

Creates animated baseball plots for the 2025 MLB seeason.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages