derek-adair / nflgame

A working snapshot of nflgame (for historic purposes). This project is no longer active.
http://nflgame.derekadair.com
The Unlicense
332 stars 100 forks source link

Get personnel by play #110

Closed Plarubato closed 4 years ago

Plarubato commented 4 years ago

Hi,

I can get players out of a play by doing:

g = nflgame.one(2019,1,'BAL','BAL')
for g in g.drives:
    for p in g.plays:
        print(p.players)

But this only gets the players involved in that play. Is there any way of getting all the players in the offensive side for each play?

I would like to calculate the personnel lineup of each play (11, 21 etc).

Thanks

ochawkeye commented 4 years ago

Afraid not, at least not from this API. You are displaying every player that nflgame is aware of in your code. If they didn't record a stat, they are not generally included in the play-by-play that is the source of nflgame's data.

Plarubato commented 4 years ago

Thanks for the clarification @ochawkeye! And thanks for getting this great API going on!