-
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
Antonio Brown's stats are wrong #90
Comments
Maybe you're missing a game somewhere? Try this: #89 Failing that, please check his stats on NFL.com's GameCenter pages. Sometimes they are wrong or off a little. |
The totals I am getting from him are for a season long query so I don't know how I could be missing games. But like I said, I've manually verified about 50 other players against nfl.com, yahoo.com and espn.com and everyone else is in sync with the nfldb query except for him. My code for querying on the season is below. Let me know if I am confused. Thanks. q = nfldb.Query(db) for pp in q.sort('passing_yds').as_aggregate(): |
I just tried deleting antonio brown from player and play_player tables, which worked. My thinking based on your #89 post that you referenced, was that afterwards running nfldb-update would merge in all his stats, but they are still missing. Do I need to reload the table from scratch or is there another way to correct this issue. Thanks. |
Uh... Deleting entries from the player and play_player tables was a very bad idea. You now have to reload every game antonio brown ever played in. Either that, or just start from scratch. I pointed to #89 so that you could try that very specific fix. I mean literally: delete that game and re-run nfldb-update. It is totally feasible for you to be missing one game or part of one game, even if the top 50 players are exactly correct. For example, they may not have participated in that game. Finally, as I said before, the data is not perfect. There is nothing you can do about that. The reason why I suggested that a game was missing was because of the stats. Namely, you're missing 7 receptions and 128 yards. That sounds like one game's worth to me. You need to do some digging to figure out where the stats have gone wrong. e.g., Look at his stats for each individual game. |
Thanks. I will reload the database from scratch and figure out what game is missing. |
Not sure it helps you much, but his stats check out OK on my PC with both import nflgame
games = nflgame.games(year=2014, week=[i for i in range(1, 18)], home='PIT', away='PIT')
plays = nflgame.combine_plays(games)
for player in plays.players().receiving():
if str(player) == 'A.Brown':
print player.stats
import nfldb
print '-'*79
def season_player_stats(full_name, season):
db = nfldb.connect()
q = nfldb.Query(db)
q.game(season_year=season, season_type='Regular', week= [i for i in range(1, 18)])
q.player(full_name=full_name)
pps = q.as_aggregate()
assert len(pps) < 2, "Make sure only one player was aggregated"
if len(pps) == 0: # No players found to aggregate
return None
return pps[0]
x = season_player_stats('Antonio Brown', 2014)
print x
|
I suspect your problem is with week 17. import nflgame
for i in range(1, 18):
game = nflgame.one(2014, i, home='PIT', away='PIT')
if game:
for player in game.max_player_stats():
if str(player) == 'A.Brown':
print '{:>2} {:<25} {:>2} {:>3}'.format(i, game, player.stats['receiving_rec'], player.stats['receiving_yds'])
|
I removed the nfldb and reloaded it and am still missing the stats. ochawkeye, I tried both your nflgame and nfldb example program. It provided the correct statistics for the nflgame example (my output matched yours), but not for the nfldb example. I'll try removing the game and running nfldb-update. |
After simply removing the game burntsushi recommended in the first place and running nfldb-update, the problem has been resolved. Is there a thread outside of #89 that I should refer to for possible missing game data so that I can go through and verify other games that may have missing data? Ochawkeye was your nfldb query correct without having to ever manually remove that game and run nfldb-update? |
No. Missing games really shouldn't happen. I just need to update the SQL file that I put up for download. |
Nope, I did not have to manually remove the game that I recall. Though if you experienced this same issue after a re-installation of Edit: BAH! I'm getting |
All of this makes sense, Thanks again for the help. |
I wrote a simple python program that creates a weekly and yearly stats representation of every player in the league and computes their fantasy points based off of these stats. I have verified about 50 of the other top 50 point scorers in the league, and all of their stats and point totals matchup with what is on yahoo, espn.com and nfl.com Antonio Brown's stats are wrong for 2013 and 2014 that I have checked so far. For instance in 2014, he had 129 receptions and 1698 yards. nfldb is returning 122 receptions and 1570 yards.
The text was updated successfully, but these errors were encountered: