I've started uploading these CSVs to a public Google BigQuery dataset called [nfl], so you can run queries over them like this: SELECT off, COUNT(off) AS count FROM [nfl.2012reg] WHERE description CONTAINS "INTERCEPTED" GROUP BY off ORDER BY count DESC (This counts the number of plays that resulted in an interception by the team that threw the interception, sorted from most to fewest INTs)
Every NFL play for the past 10 years in CSV format
41–50 of 105 posts
Re: Every NFL play for the past 10 years in CSV format
#42From Line 42536 of the 2008 CSV file: 20090201_PIT@ARI,2,30,18,ARI,PIT,1,1,1,(:18) (Shotgun) K.Warner pass short middle intended for A.Boldin INTERCEPTED by J.Harrison at PIT 0. J.Harrison for 100 yards TOUCHDOWN. Super Bowl Record longest interception return yards. Penalty on ARZ-E.Brown Face Mask (15 Yards) declined. The Replay Assistant challenged the runner broke the plane ruling and the play was Upheld.,7,10,200…
You'll find that the text descriptions aren't consistently formatted. It's tough to extract structured data from all play descriptions. For example, first initial plus last name does does not uniquely identify a player. You'll need accurate roster data first, and even then there are clashes. We store play data by its structured components (players involved, play type, player roles, etc) and then derive the text descr…
Which means you can treat it a bit like a text mining program. NASA had a text mining contest in 2007 as part of the SIAM conference on data mining which was really similar - instead of football plays it was textual descriptions of aeronautics incident reports and their classification. There were several papers that came out of that (I was with a group that did one of them, using an approximate nonnegative matrix classification approach - got beat out by some ensemble approaches).
Anyway - if you'd like to do something with unstructured football play descriptions, text mining might be able to empower you to some extent without going through a full manual analysis, and those papers could be a good starting point. I think some of them ended up in a volume titled _Survey of Text Mining II_.
Re: Every NFL play for the past 10 years in CSV format
#43I've started uploading these CSVs to a public Google BigQuery dataset called [nfl], so you can run queries over them like this: SELECT off, COUNT(off) AS count FROM [nfl.2012reg] WHERE description CONTAINS "INTERCEPTED" GROUP BY off ORDER BY count DESC (This counts the number of plays that resulted in an interception by the team that threw the interception, sorted from most to fewest INTs)
I'm new to BigQuery, how do I access a public dataset? I ran the query and got the error Not Found: Dataset 578707073226:nfl
Re: Every NFL play for the past 10 years in CSV format
#44I wrote a small wrapper around the 4th down calculator on that site, which should help you figure out if your team should go for it on 4th down: http://downanddistance.herokuapp.com/
Need a bounds check or two in there. Tried setting the number of yards you need to 1 and the yards away from the endzone to 99 and it threw up a nice exception. Cool calculator though!
Re: Every NFL play for the past 10 years in CSV format
#45Re: Every NFL play for the past 10 years in CSV format
#46From Line 42536 of the 2008 CSV file: 20090201_PIT@ARI,2,30,18,ARI,PIT,1,1,1,(:18) (Shotgun) K.Warner pass short middle intended for A.Boldin INTERCEPTED by J.Harrison at PIT 0. J.Harrison for 100 yards TOUCHDOWN. Super Bowl Record longest interception return yards. Penalty on ARZ-E.Brown Face Mask (15 Yards) declined. The Replay Assistant challenged the runner broke the plane ruling and the play was Upheld.,7,10,200…
You'll find that the text descriptions aren't consistently formatted. It's tough to extract structured data from all play descriptions. For example, first initial plus last name does does not uniquely identify a player. You'll need accurate roster data first, and even then there are clashes. We store play data by its structured components (players involved, play type, player roles, etc) and then derive the text descr…
Re: Every NFL play for the past 10 years in CSV format
#47Sample description field: > 20020905_SF@NYG,1,59,20,NYG,SF,3,11,81,(14:20) (Shotgun) K.Collins pass intended for T.Barber INTERCEPTED by T.Parrish (M.Rumph) at NYG 29. T.Parrish to NYG 23 for 6 yards (T.Barber).,0,0,2002
In the comments section of the OP, someone posted this sample Excel function:
=IF(ISNUMBER(SEARCH("right tackle",J2)),"rush",IF(ISNUMBER(SEARCH("right
guard",J2)),"rush",IF(ISNUMBER(SEARCH("left
guard",J2)),"rush",IF(ISNUMBER(SEARCH("up the
middle",J2)),"rush",IF(ISNUMBER(SEARCH("left
tackle",J2)),"rush",IF(ISNUMBER(SEARCH("left
end",J2)),"rush",IF(ISNUMBER(SEARCH("right
end",J2)),"rush",IF(ISNUMBER(SEARCH("pass",J2)),"pass",IF(ISNUMBER(SEARCH("kneel",J2)),"kneel",IF(ISNUMBER(SEARCH("punt",J2)),"punt",IF(ISNUMBER(SEARCH("kicks",J2)),"kickoff",IF(ISNUMBER(SEARCH("extra
point",J2)),"extrapoint",IF(ISNUMBER(SEARCH("sacked",J2)),"sack",IF(ISNUMBER(SEARCH("PENALTY",J2)),"penalty",IF(ISNUMBER(SEARCH("field
goal",J2)),"fieldgoal",IF(ISNUMBER(SEARCH("FUMBLES",J2)),"fumble",IF(ISNUMBER(SEARCH("spiked",J2)),"spike",IF(ISNUMBER(SEARCH("scrambles",J2)),"rush","rush"))))))))))))))))))
Dear god, at what point do people finally realize that it's worth learning some simple scripting to work with text files?Re: Every NFL play for the past 10 years in CSV format
#48Re: Every NFL play for the past 10 years in CSV format
#49I've started uploading these CSVs to a public Google BigQuery dataset called [nfl], so you can run queries over them like this: SELECT off, COUNT(off) AS count FROM [nfl.2012reg] WHERE description CONTAINS "INTERCEPTED" GROUP BY off ORDER BY count DESC (This counts the number of plays that resulted in an interception by the team that threw the interception, sorted from most to fewest INTs)
Re: Every NFL play for the past 10 years in CSV format
#50btw, pro-football-reference has pbp data now too, and it probably goes back a lot further, but I think they discourage mass scraping of their site.