4 ms·
Ive used this https://github.com/BurntSushi/nfldb https://github.com/BurntSushi/nfldb and this https://github.com/BurntSushi/nflgame https://github.com/BurntSus
by dirtestbird 12y ago
Ive used this https://github.com/BurntSushi/nfldb https://github.com/BurntSushi/nfldb
and this https://github.com/BurntSushi/nflgame https://github.com/BurntSushi/nflgame
to make this http://www.ffgraf.com/ http://www.ffgraf.com/
- burntsushi 12y agoAuthor here! That's a pretty nice visualization :-) I thought I'd just squeeze in a few words about nflgame/nfldb. Both offer access to the same stuff: play-by-play data back to 2009. Both can be used with live games so that they are updated in real time (well, at least as frequently as NFL.com). nflgame is responsible for pulling the JSON data and provides some rudimentary searching features. But it's slow. nfldb stores all this data for you in a relational database. It comes with a script that updates the database while games are playing so that you can get access to live data. (It will even migrate the database for you if I've made any changes to the schema.) Here's a quick example that shows how to get all of Julian Edelman's touchdown plays from last season: import nfldb db = nfldb.connect() q = nfldb.Query(db) q.game(season_year=2013, season_type='Regular') q.player(full_name='Julian Edelman').play(offense_tds=1) for g in q.as_plays(): print g Easy as pie! There's an extensive wiki (almost 20,000 words) with tons of examples and explanation: https://github.com/BurntSushi/nfldb/wiki https://github.com/BurntSushi/nfldb/wiki Other features: aggregating data, player meta data (college, height, weight, etc.) and fuzzy player name matching.