-
Notifications
You must be signed in to change notification settings - Fork 263
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
Noob Request - How to have Quarter show during active games #241
Comments
Have a look at #200 You could look at the last play for a particular game and import nfldb
db = nfldb.connect()
q = nfldb.Query(db)
def game_phase(g):
if g.is_playing or g.finished:
return g.plays[-1].time.phase
return None
q.game(season_year=2017, week=2, season_type='Preseason')
for pp in q.sort('start_time').as_games():
print pp.start_time, pp.home_team, pp.home_score, pp.away_score, pp.away_team, pp.finished, game_phase(pp) Oddly, despite BUF @ PHI being finished, my
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Folks,
Extremely limited programming experience so I may be asking a stupid q which if so then apologies in advance.
Looking to create a live feed scoreboard for all current games in a given week which will update as they happen.
Output should look like: start_date, home_team, home_score, away_score, away_team, quarter
I can pull everything except quarter. How to I pull a quarter of a given game and combine it to the above? I have the following working:
Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: