Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better way to find successful 2-point returns? #368

Open
benlindsay opened this issue Aug 12, 2018 · 0 comments
Open

Better way to find successful 2-point returns? #368

benlindsay opened this issue Aug 12, 2018 · 0 comments

Comments

@benlindsay
Copy link

benlindsay commented Aug 12, 2018

I'm still learning how to use this tool, and I'm trying to find the (very rare) cases of 2-point conversions or extra points where a turnover occurred and the defense returned the ball to their end zone. I can't find any combinations of stats to search for these, but I found a very clunky way to get at this that looks like this:

year = 2016
week = None
team = None
games = nflgame.games_gen(year, week, team, team)
plays = nflgame.combine_plays(games)
for p in plays:
    if ('DEFENSIVE TWO-POINT ATTEMPT' in str(p) and
        'ATTEMPT SUCCEEDS' in str(p)):
        print p

Looks like this only happened 4 times in 2016 (results look like this:)

(CLE, BAL 15, Q1) P.Murray extra point is Blocked (L.Guy), Center-C.Hughlett, Holder-B.Colquitt. DEFENSIVE TWO-POINT ATTEMPT. T.Young recovered the blocked kick. ATTEMPT SUCCEEDS.
(NO, DEN 15, Q4) W.Lutz extra point is Blocked (J.Simmons), Center-J.Drescher, Holder-T.Morstead. DEFENSIVE TWO-POINT ATTEMPT. W.Parks recovered the blocked kick. ATTEMPT SUCCEEDS. The Replay Official reviewed the runner was in bounds ruling, and the play was Upheld. The ruling on the field stands.
(ATL, KC 2, Q4) (Pass formation) TWO-POINT CONVERSION ATTEMPT. M.Ryan pass to A.Hooper is incomplete. ATTEMPT FAILS. DEFENSIVE TWO-POINT ATTEMPT. E.Berry intercepted the try attempt. ATTEMPT SUCCEEDS.
(ARI, MIA 15, Q4) C.Catanzaro extra point is Blocked (J.Phillips), Center-A.Brewer, Holder-D.Butler. DEFENSIVE TWO-POINT ATTEMPT. W.Aikens recovered the blocked kick. ATTEMPT SUCCEEDS.

and 0 in 2017, but it would still be nice to have a better way of doing this.

With this method, I also don't know how to reliably attribute the 2 point return to the right player. For example, printing p.events and p._stats for the first play looks like this:

"[{'kicking_xpmissed': 1, 'playerid': u'00-0030626', 'playername': u'P.Murray', 'team': u'CLE', 'kicking_xpa': 1, 'kicking_xpb': 1}, {'playerid': u'00-0028171', 'defense_xpblk': 1, 'playername': u'L.Guy', 'team': u'BAL'}]"
"{'defense_xpblk': 1, 'kicking_xpa': 1, 'kicking_xpb': 1, 'kicking_xpmissed': 1}"

which gives no hint about any defensive scoring happening, just a blocked extra point attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant