
Missoula PaddleHeads Batter Report with R shiny
Background
In 2022 summer, I was an intern for a Missoula PaddleHeads baseball team. They had started using the trackman system in the second half of the season. The trackman is a system that allows the team to obtain data on the pitch or hit. For example, the data includes spin rate, location, velocity, vertical and horizontal change, and so on. We had a player who knew how to code so he wrote a code for our team it can print out pitcher reports. I asked for the data from him and decided to make a report for batter.
Data
The dataset includes all the pitch and ball-in-play data, since I only focused on the batter in this report I did not use all the pitch, instead, I focused on more ball-in-play. The dataset is all raw data so I have to remake some data into what I need. For example, I need to define ball-in-play by filtering out all the play that was not in play.
Because the data only contained the second half of the home game which was only 24 games so the result might not be able to showcase a batter's real performance throughout the season.
R
After having my dataset all prepared, I started the coding part. My thought process was to showcase how a batter did with different kinds of pitch types, also their hitting heatmap. Also, the hardest part might be to figure out the pitch location and draw a strike zone in the plot. Next, I designed how I want it to look on R Shiny. I want users (coaches and players specifically) to be able to select which players they want to see and what type of pitch they want to know. So in the Input, you can select players and pitch types. Then Output will show you that player's heatmap and pitch types location.
Summary
This was a really fun one for me because I was able to collab with my previous work and what I was learning. Also, I showed it to some players and they do think this can help them understand their hitting habits. Therefore, I think this is a cool project and an opportunity for me to combine work and R Shiny.