R-Shiny : Analyzing Play By Play Data from The 2016 NFL Season

Dev Dabbara
Posted on Dec 15, 2017

The first project of the NYC Data Science bootcamp was to create a Shiny Web App using Shiny in R. Shiny provides amazing tools and packages in order to make models, graphs and data come off more interesting to viewers through the use of interactive visualizations; allowing for users many times to feel like they're learning by themselves.

I thought a great direction to go with this project would be to analyze statistics of the previous season for a sport. And upon searching for datasets, I came across the NFL Play-By-Play Data Set for the 2016 NFL Season and thought that would be great information to work with. The NFL is relevant in almost every facet of society today with it even entering into the Civil Rights realm as well as politics very recently. But also it is the highest earning sport in terms of revenue by many billions ($13 Billion in the 2016 NFL Season) and has become a steady part of American society for the last many decades. From nerds that don't like sports, to super fans, all the way to compulsive gamblers, one can find interest in the analysis of statistics on a deeper level and finding attributes that weren't known before that correlate strongly to winning and success.

The app allows for users to mix and filter out different NFL statistics and see how they correlate to one another. Because as anyone knows with learning more about anything, but specifically with datasets, one needs to know how everything is essentially working and how each variable correlates to one another.

This correlation plot here allows for people to understand the variables more in-depth and realize what contributes most to gaining yards, and what does getting more sacks do in terms of its effect on other variables.

Once users get a better understand of the simple variables, what they are, and how each correlate, one can then dive into deeper analysis such as examining plays by formation or looking at a teams time of possession.

One direction users could go in would be to analyze plays from the 2016 NFL Season out of the Shotgun formation. Then look deeper into how many plays were passes. Here is a graph that users may see:

This graph gives a clear and great representation to the user of how many plays out of the Shotgun formation were a run, pass, or ended in no-play; meaning a penalty was accepted or play was called dead before it was completed. And users wanting to look deeper into the statistics of certain sets of plays such as this, one could also here see the average yards gained by run out of the shotgun compared to the yards gained by passing out of the Shotgun.

One can see that the average for Passes out of the Shotgun was 7.104891, and the average for runs out of the Shotgun was 5.026671. One can see with just these numbers for example, that compared to other running statistics, the Shotgun formation produces the highest runs on average due to the tendency of the defense to prepare for a pass and not rush as many players due too anticipating run.

This is just one of the many insights one could gain from the app and from taking a deeper look at sports analytics in general. Sports will continue to increase its use of data analytics and data science and it is well validated in its success. If your not on the analytics train than you might have to just watch as people revolutionize a game you thought your whole life was so simple.

About Author

Related Articles

Leave a Comment

Your email address will not be published. Required fields are marked *

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags