BurntSushi / nflgame

An API to retrieve and read NFL Game Center JSON data. It can work with real-time data, which can be used for fantasy football.
http://pdoc.burntsushi.net/nflgame
The Unlicense
1.27k stars 413 forks source link

Jaguars acronym error week 1 2016 #339

Open naymikm opened 7 years ago

naymikm commented 7 years ago

The game.home value is 'JAC' but the game.schedule['home'] is 'JAX' The acronym used for filtering plays must be 'JAC' to work but the filter used by game must be 'JAX'. Otherwise it returns Nonetype.

games=nflgame.games(2016, week=1, home='JAX',away='JAX')
for g in games:
   print(g.home,g.away)
   print(g.schedule)

(u'JAC', u'GB')
{u'week': 1, u'meridiem': u'PM', u'gamekey': u'56905', u'season_type': u'REG', u'away': u'GB', u'year': 2016, u'month': 9, u'eid': u'2016091103', u'time': u'1:00', u'home': u'JAX', u'wday': u'Sun', u'day': 11}

games=nflgame.games(2016, week=1, home='JAX',away='JAX')
plays = nflgame.combine_plays(games)
for play in plays.filter(team='JAC'):
    print(play)

(JAC, JAC 18, Q1, 1 and 10) (14:56) T.Yeldon up the middle to JAC 24 for 6 yards (J.Ryan).
(JAC, JAC 24, Q1, 2 and 4) (14:16) (Shotgun) T.Yeldon right guard to JAC 29 for 5 yards (B.Martinez).
naymikm commented 7 years ago

Week 2 and onward 'JAX' must be used in the play filter and 'JAC' no longer works

ariannedee commented 7 years ago

You should add this to your nfldb:

insert into team values('JAX','Jacksonville', 'Jaguars');
insert into team values ('LAC', 'Los Angeles', 'Chargers');