Baseball/Animated Plots
For this project, I built a simple interactive visualization that shows the evolution of MLB teams' win totals and win percentage over the course of the 2025
regular season. In the chart on the left side, actual wins are shown as the solid line and projected wins, calculated as the total number of wins a team
would have if they maintained their current win percentage for the remainder of the season, are plotted as the dashed line.
The chart on the right displays the evolution of the team's centered win percentage over the season. Here, centered win percentage takes the team's final
win percentage as the truth and subtracts it from their current win percentage on a game-by-game basis. This aids in comparison across teams as they will all
converge to zero over the course of the season. 95% confidence intervals, indicated by the shaded region, are also included to illustrate how uncertainty around
the point estimate changes over the course of the season.
Data was scraped responsibly from Baseball-Reference. I then cleaned and structured the data in R. Finally, I created the animated plots using ggplot2 and
gganimate and wrapped the animated plots in a Shiny app for interactivity. The resulting app can be seen below.
The code to create these plots can be found here on my GitHub.