Fun with NFL Stats, Bokeh, and Pandas
j253.github.io
Fun with NFL Stats, Bokeh, and Pandas
1–10 of 28 posts
Re: Fun with NFL Stats, Bokeh, and Pandas
#2Still very interesting and insightful and lovely plots generated.
Re: Fun with NFL Stats, Bokeh, and Pandas
#3Re: Fun with NFL Stats, Bokeh, and Pandas
#4> On third down, pass attempts outnumber run attempts at almost a 4 to 1 clip. This is likely out of increased desperation to make a first down.
Running is a low variance low yardage option, passing is a high variance high yardage option. Passing on third and medium to long is an obvious dominant strategy. Pulling the goaltender in hockey or bringing the keeper forward in soccer when trailing late in games/matches serves much the same effect.
Re: Fun with NFL Stats, Bokeh, and Pandas
#5Re: Fun with NFL Stats, Bokeh, and Pandas
#6Re: Fun with NFL Stats, Bokeh, and Pandas
#7Incidentally, that report was really fun during the 2011 Broncos season. Normally when you are finding the plays with the largest WPA swings, you'd expect them to be distributed among both teams. But since Tim Tebow became starting quarterback, I searched for the top ten largest WPA swings for the rest of the season - and from what I recall, every single one of those dramatic plays was in the Broncos favor. Weird. :-)
Re: Fun with NFL Stats, Bokeh, and Pandas
#8I feel like this is a waste of bokeh's potential and matplotlib would have sufficed. I love bokeh for the interactive capability and controlling what you plot, zooming, and just overall more immersive feeling than a static 2d plot. Still very interesting and insightful and lovely plots generated.
Re: Fun with NFL Stats, Bokeh, and Pandas
#9I've always enjoyed this project for pulling nfl stats. https://github.com/BurntSushi/nflgame
Back in the day, I used nflgame along with
https://github.com/BurntSushi/nfldb
https://github.com/BurntSushi/nflvid
https://github.com/BurntSushi/nflfan
to setup a simple local web UI that allowed me to quickly search through every play and watch any single play I wanted. Video footage was available as soon as the game was over, and play info was available live as the game was playing. It was amazing.This worked because nflvid downloaded full HD NFL games from their CDN, which was unprotected at the time. (I paid for an NFL Game Pass subscription and never distributed the video footage.) They also had XML files that delineated the time at which each play started and its duration. Some ffmpeg slicing and dicing was all it took to cut up a full game and associate each clip with each play. That's all part of what nflvid does.
I hacked all of this together in my free time years ago, and I bet a lot of people would find it amazing. One wonders why the NFL doesn't build this and sell it themselves. When I used Game Pass a few years ago, you could search for plays with rudimentary criteria, but only over a single game at a time. It was artificially very limited.
Re: Fun with NFL Stats, Bokeh, and Pandas
#10I'll go with the idea that the refs are biased with their ball placement and tend to put the ball on lines [0]. Also, players/teams practice, speak, think in 5 yard increments, so that's got to bias things a bit. "We've got to get to the 35 yard line for Morten to have a chance."
[0] https://gutterstats.wordpress.com/2015/11/03/are-nfl-officia...