This project is a web application for visualizing batted ball data from
baseball games. Users can change the dataset and interactively explore hit
locations, launch angles, and exit velocities. Make sure the format of the
csv file is the same as the one provided in the
BattedBallData.csv
file.
If the CSV file is not available, and you only have the Excel file, please
run python3 excel-to-csv.py
and have the Excel file be named
BattedBallData.xlsx
and in the same directory as the python
file.
After getting the data, please run a local server. If you are using VS Code, I recommend Live Server since it is an extension. Installation steps for Live Server extension:
ext install ritwickdey.liveserver
Open the port where the local server is running, and the visualizations should appear.
After getting everything up and running, you find two visualizations that are similar:
The circles in the visualizations are the distance the ball traveled and where it lands according to the data. The color in the circle means the outcome of the play.
There is a tooltip that tells you who took the plate appearance, outcome, distance, LA, EV, and hang time. If you click on a circle, it will open the video of the play which it references.
The source code can be found here.