A New Shiny App
As a follow-up to my recent post about 2021 home run rates, there is a new Shiny app available on my Github site designed to explore rates of batted balls over different regions of the (launch angle, exit velocity) space, find home run rates within these regions, and compare these rates with previous Statcast seasons.
The Github repository includes all of the data including Statcast data for the 2021 season.
To get the Shiny app, just download the repository as a zip file and unzip the zipped file. To run the app, launch R with this folder the current working directory. and typing in the Console WIndow.
To use this app …
- Decide on a particular time interval — the default values will be the dates of the current 2021 MLB games.
- You will see a sample of (launch angle, exit velocity) values where the color of the point indicates a home run or not.
- Brush to select a rectangular region.
- You will see a table that gives (1) the number of batted balls in that region, (2) the corresponding BIP rate, (3) the number of home runs in that region and (4) the corresponding home run rate for all Statcast seasons including 2021.
- You can save the table by pressing the “Download Table” button. A file of csv format will be stored in the output folder.
- You can continue this process for any region of interest.
For this particular region I selected (launch angle between 23.9 and 32.7 degrees and exit velocity between 95.8 and 104.7 mph), we see that the rate of balls in this region is relatively high in 2021 compared to 2019, but the rate of home runs among these batted balls is small in 2021 relative to 2019.
I encourage the interested reader to try this Shiny app out. Any suggestions for improvement or concerns can be sent to me at email@example.com