
March Madness group project
Background
This semester, our professor wanted us to have a group project about sports visualization and we could pick whatever topic we want. After discussion, we decided to do a visualization about March Madness. March Madness is a huge basketball event every year which is the NCAA college basketball playoff. We wanted to provide a graphic with some analysis so people can have a different perspective when they are watching March Madness. We split up into four groups: pre-game graphic, post-game graphic, social media, and draft prediction. I was in the group of social media and the only one in this group. My duties was to post graphic for pre and post-game, also I decided to make a graphic of the best player of the game's shot chart so people can see that player's shooting result with location in that game.
Data
All of our data are from ncaahoopR package, which made our life easier so we did not have to find and collect data by ourselves. In this package, you can get every NCAA game's data by inputting the game id. The data includes the player's performance, their location if they shoot the ball, and a lot more. For me, I was focusing on a player's shooting location so x and y locations and shooting results were the data I used.
The first thing I did was to figure out how to interpret the x and y locations in my plot. the issue I encountered was that the location did not correspond to the court I drew within R; however, this is due to different schools and teams recording the shooting location in different ways. When I utilized it for March Madness, it was really consistent because everyone who was recording was using the same measure, so I only had to change the location to match the March Madness method.
Then, because each school's abbreviation is different, I had to make a list of each school's name and abbreviation to match the abbreviation
on ESPN.
R
After having my dataset all prepared, I started the coding part. My thought process was to showcase a player's shooting location if I input their name and the game ID. So I created a function that you can easily just put the player's name and the game ID in there, and it will generate the plot by itself.
Summary
This project was really interesting because we were able to create something related to what was going on in the sports world. For me, it was also very cool to see how a player shoot their ball throughout the game by seeing the shot chart I made.