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

Dev Dabbara
Posted on Dec 15, 2017

Background:
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.

Introduction:
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.

Analysis:
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

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp