Play-by-Play Effectiveness

Check out this web app I put together to measure the effectiveness of plays and drives:
http://football.10flow.com/

Here are some interesting stats I’ve found so far:

The stats show Andy Reid’s Eagles performed poorly when down a score in the final 2 minutes. The biggest problem seems to be the terrible 34% pass success rate and a below average plays-per-drive (4.4 compared to 4.7). Two-minute drill drives ended in 11 picks (21.2%), 12 turnovers on downs (23.1%), and 10 TDs (19.2%). They ran out of the clock 9 times. Their scoring percentage was 25% compared to a league average of 33.4%. Good luck Kansas City!

The 2012 Jets stand out as a weak offense. There was a big drop in touchdowns, pass play effectiveness, and interestingly, pass play selection. The Jets passed on 57.1% of plays in 2011, compared to 52.1% this year. The loss of CB Darrelle Revis also had an impact. Opposing team’s pass success rate went from 40.8% (with 15 picks) in 2011 to 42.8% (with 9 picks) in 2012.

Finally, the Pats offense was scary-effective this year. Their touchdown rate stands out the most — 32.4% compared to league average 21.0%.

Leave a reply below or Tweet at me if you find something interesting in the stats!

4 thoughts on “Play-by-Play Effectiveness

  1. Hey, I’m getting closer to this working! Getting this error though:

    Traceback (most recent call last):
    File “/home/tanya/playbyplay/play-parser/play_parser.py”, line 69, in header = plays[0].keys()
    IndexError: list index out of range

    I’m unable to write to csv, json, or import into database. The script appears to run properly when only the database option is checked. However, I end up with an empty plays table. That’s why I tried setting csv and json filenames and then that error appeared.

  2. I just tested on a clean git clone of the repository. Here’s exactly what I did…

    $ git clone https://github.com/10flow/playbyplay.git

    $ cd playbyplay/play-parser

    Then I edited play_parser.py to write to CSV rather than the database (it’s a quicker way to test since SQLAlchemy is painfully slow). I made 3 changes:

    1. I commented lines 22-28.
    2. I un-commented line 19.
    3. I changed line 14 to:
    output_csv_filename = ‘test.csv’

    Then I ran the script:

    $ ./play-parser.py

    Sure enough that produced a huge ‘test.csv’ file with the parsed plays.

    (I’m on Ubuntu 12.04 with Python 2.7.3.)

  3. Strange, followed those steps exactly and still getting “Traceback (most recent call last):
    File “/home/tanya/playbyplay/play-parser/play_parser.py”, line 69, in
    header = plays[0].keys()
    IndexError: list index out of range”

  4. Didn’t change anything, but today I fired up Ubuntu, activated the virtualenv, ran play_parser.py and it worked like a charm writing to a CSV.

    Next I wanted to write to the db and ran into this error: File “play_parser.py”, line 79, in
    if create_table:
    NameError: name ‘create_table’ is not defined

    I just un-commented line 79 because I didn’t find much from google, and that also worked.

    Thanks again for this!

Leave a Reply to Scott Sawyer Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>