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

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

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI