![]() ![]() The first thing I want to do is a just a create a simple bar graph to see the breakdown of play type by down. ![]() On with the analysis Looking at play type by down Unless there's some obscure rule in football I'm unaware of it'd probably require some further investigation but since this is just for fun, I'm going to ignore it. For more info, see the Python docs.įor easier reading I'll put the results in table form: Play Typeįor the most part, nothing really surprising except that there are 2 instances of 'Kickoff' on plays that actually had a down assigned. It has a dict interface with each unique item found as the keys and the number of instances found as the values. In this case I'm passing it a Pandas Series (the 'PlayType' column) and it's counting all the different instances it finds in the column and returns a Counter type. NOTE: For those who don't know, according to the Python docs, ' Counter is a dict subclass for counting hashable objects'. So let's first import Pandas and some other modules.Īll_play_types = Counter ( team_df ) The data is contained wholly within one large CSV. Where on the field do most running plays starts when it's a third down? The data.and some cleaning What's the most common type of play called on the opponent's 20 yard line on first down? What's the most common type of play called on the opponent's 20 yard line on any down? In other words, we'll be able to answer questions like My particular interest, and what I'm going to focus on in this write up, is what type of offensive play (pass, run, punt, or field goal) teams are running by down and by location on the field. There are a million different things one could do with this data, and indeed the people of Kaggle have done many things - from data cleaning to play call prediction. Thanks to them for the work and sharing the data! Motivation I originally found the CSV posted on Maksim's Kaggle page.Īfter reading a bit more I learned that they've created a really cool NFL API scraping tool called nflscrapR (written in R) that not only scrapes, cleans, parses, and outputs the CSV, but they also built expected point and win probability models for the NFL and have included this information in the CSV. The data I found was compiled by Maksim Horowitz, Ron Yurko, and Sam Ventura. I get particularly excited about sports data so I started digging into this one right away. ![]() Cruising through Kaggle last week, I found a CSV of NFL play-by-play statistics. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |