Posted on 08/30/2012 at 12:45am
As a programmer and a fantasy football addict, I am embarassed by the means through which we must expend ourselves to get data in a machine readable form. This lack of open source software cripples the community with sub-standard tools, and most importantly, detracts from some really cool and fun things that could be done with easily available statistics. Many tools are either out-dated or broken, or if they work, they are closed source and often cost money.
Yesterday I started work on a new library package that I hope will start to improve this sorry state of affairs.
Since game statistics never change after a game has been played, the JSON data is automatically cached and saved to disk if the game is no longer being played. The next time statistics for that game are queried, the data will be read from disk. (nflgame comes preloaded with data from every game in the pre- and regular season since 2009.)
The API for nflgame is small and hopefully easy to use—even for those without much or any experience programming.
Let’s start off with a quick teaser to showcase some of nflgame’s power.
Who lead the league in rushing between weeks 10 and 14 of the 2010 regular season?
I won’t make you hunt down the answer. Here’s five lines of code that lists the top ten rushers in weeks 10-14 of the 2009 season:
>>> import nflgame >>> games = nflgame.games(2010, week=[10, 11, 12, 13, 14]) >>> players = nflgame.combine(games) >>> for p in players.rushing().sort("rushing_yds").limit(10): ... print p, p.rushing_yds ... ... M.Jones-Drew 632 M.Turner 480 A.Foster 466 F.Jackson 462 K.Moreno 462 J.Charles 458 P.Hillis 426 C.Johnson 416 S.Jackson 405 B.Green-Ellis 401
Back to basics
If you are a beginning programmer (or don’t have any experience programming), I strongly urge you to read my Tutorial for non programmers: Installation and examples. What follows is a condensed version of the tutorial that might be a bit too confusing for those without programming experience.
nflgame is designed around three core concepts: games, players and lists of players (that are implemented as Python generators). Games can be selected based on season, week and team. Players in each game can then be accessed by name, statistical categories (i.e., passing, rushing, defense, etc.), or even statistical values—such as finding all players in a list with at least one receiving touchdown.
Games can be selected one at a time:
>>> import nflgame >>> buf_at_ne = nflgame.one(2011, 17, "NE", "BUF")
Or in bulk (every game in the 2009 season):
>>> import nflgame >>> season09 = nflgame.games(2009)
Each game comes with its own
players attribute that holds player statistics
for every player that participated in the game. Additionally, games have
clock that report meta-information about the game itself.
So to get every player with at least one passing statistic in a game:
>>> import nflgame >>> game = nflgame.one(2011, 17, "NE", "BUF") >>> print game.players.passing() [B.Hoyer, T.Brady, R.Fitzpatrick]
And the same thing can be done with rushing, receiving, defense, kicking, etc.,
by simply replacing
passing with one of the aforementioned.
Each player comes with his own grouping of statistics. To extend upon the previous example, consider printing out some passing statistics associated with each passer in the game:
>>> for p in game.players.passing(): ... print p, p.passing_cmp, p.passing_att, p.passing_yds ... ... B.Hoyer 1 1 22 T.Brady 23 35 338 R.Fitzpatrick 29 46 307
Filtering, sorting and combining—oh my!
No data API would be complete without a means of filtering the data according to its values.
To find all players on the home team of the current game:
>>> print game.players.filter(home=True) [B.Hoyer, T.Brady, B.Green-Ellis, A.Hernandez, J.Edelman, S.Ridley, D.Woodhead, R.Gronkowski, W.Welker, S.Gostkowski, Z.Mesko, M.Slater, K.Arrington, M.Anderson, J.Mayo, A.Molden, N.Jones, P. Chung, B.Deaderick, D.Fletcher, D.McCourty, V.Wilfork, N.Koutouvides, R.Ninkovich, K.Love, L.Polite, B.Spikes, S.Moore]
In this case, New England is the home team, so only players on the Patriots are returned.
A more advanced use of
filter is to use predicates to determine whether a
particular stat should be filtered or not. For example, here we look at every
player in the game on the home team with at least one interception:
>>> print game.players.defense().filter(home=True, defense_int=lambda x: x >= 1) [A.Molden, D.McCourty, S.Moore]
Any player list can be sorted according to a statistical field. For example, we might want to see a list of rushing leaders in the game by yards:
>>> for p in game.players.rushing().sort("rushing_yds"): >>> ... print p, p.rushing_att, p.rushing_yds >>> ... >>> ... S.Ridley 15 81 C.Spiller 13 60 R.Fitzpatrick 5 36 A.Hernandez 2 26 B.Green-Ellis 7 22 J.Edelman 1 6 G.Wilson 1 6 D.Woodhead 1 5 T.Choice 1 4 B.Hoyer 3 -2
Player statistics for the same player from different games can be combined to represent statistics from multiple games. Additionally, player generators can be concatenated. This combination allows one to construct searchable player generators of any makeup: from only games in a certain week, to all games in a season (or multiple seasons!).
For example, to find the top ten rushing leaders from week 2 of the 2009 season, we simply select all games from that week, combine the games into a single player list, and use our familiar searching methods exemplified above to get our answer:
>>> week2 = nflgame.games(2009, 2) >>> players = nflgame.combine(week2) >>> for p in players.rushing().sort("rushing_yds").limit(10): ... print p, p.rushing_att, p.rushing_yds, p.rushing_tds ... ... F.Gore 16 207 2 C.Johnson 16 197 2 F.Jackson 28 163 0 C.Benson 29 141 0 R.Brown 24 136 2 M.Barber 18 124 1 M.Turner 28 105 1 S.Jackson 17 104 0 F.Jones 7 96 1 A.Peterson 15 92 1
What if you wanted to see who passed for the most touchdowns in the first five weeks of the 2011 season?
>>> games1_5 = nflgame.games(2011, week=[1, 2, 3, 4, 5]) >>> players = nflgame.combine(games1_5) >>> for p in players.passing().sort("passing_tds").limit(10): ... print p, p.passing_tds ... ... T.Brady 13 A.Rodgers 12 M.Stafford 11 D.Brees 10 R.Fitzpatrick 9 M.Hasselbeck 8 E.Manning 8 K.Orton 8 J.Flacco 7 M.Schaub 7
Or how about the receiving leaders for the entire 2009 season?
>>> season2009 = nflgame.games(2009) >>> players = nflgame.combine(season2009) >>> for p in players.receiving().sort("receiving_yds").limit(15): ... print p, p.receiving_yds, p.receiving_rec, p.receiving_tds ... ... A.Johnson 1504 95 9 W.Welker 1336 122 4 S.Holmes 1243 78 4 R.Wayne 1243 95 10 M.Austin 1230 74 11 S.Rice 1200 78 6 R.Moss 1189 78 13 S.Smith 1163 97 7 A.Gates 1145 78 7 D.Jackson 1120 60 9 H.Ward 1106 87 6 V.Jackson 1097 63 9 G.Jennings 1091 66 4 R.White 1087 79 10 B.Marshall 1081 93 10
Finally, with any of the above examples, you can export the statistics to a CSV file that can be read by Excel. For example, to export the entire 2011 season in just a single line:
For the short-term, I’d really like to come up with an easy and elegant way of providing alerts (emails and texts) for your fantasy football team. For example, whenever a player on your team—or your opponent’s team—scores a lot of points like a touchdown or a field goal. I did something like this last year using a cobbled together hack-job that I’m ashamed of, and it was a lot of fun. (I did screen scraping on the ESPN fantasy web site for all the statistics.)
The real problem here is keeping your roster up to date. It’s pretty easy if you’re using Yahoo because of their Fantasy Sports API, but I don’t think any other league web site offers such amenities.
In the long-term, nflgame could certainly be the statistical back-bone for fantasy football league software. But I don’t think that’s on my personal radar any time soon.
I am aware of phpFFL, which purports to be open source fantasy football league software—but development seems to have stalled. (It also looks like they are screen scraping CBS Sports for statistics, which I really want to avoid.) Plus, I vowed a long time ago never to take up another serious project in PHP again. I value my mental health too highly.
- Tutorial for non programmers: Installation and examples
- PyPI package page
- github project page
- Archlinux user repository package page
Add a Comment
Posted on 12/04/2013 at 8:23pm
bvvjncmph, http://cialisukinfo.com/ Generic cialis coupon code, rCUTLrH, http://aetickets.net/Lozol.html Lozol 25 mg, xUZCyHA, http://cashforcarsau.com/ Cash For Cars, IDySWOQ, http://bodybuilding-advice.com/ BodyBuilding, RUnQXye, http://mnformula1.com/ Garcinia Cambogia Fruit Extract, EPuEyIk, http://lightninghybrids.com/ Cialis, XIEWxwa.
Posted on 12/04/2013 at 8:22pm
ifldkcmph, http://www.thompkinsmarketing.com/ Xanax anxiety, sErrmvp.
Posted on 12/04/2013 at 12:17pm
esfjrcmph, http://sfuas.org/ Garcinia cambogia as extract 600 mg, zckdhis.
Posted on 12/04/2013 at 12:16pm
pingjcmph, http://uk-engagement-rings.co.uk/ Engagement Rings, OcMRgdX, http://gcwsa.org/ Club casino online, ZkjnfCg, http://eyesonpixel.com/ Cash For Cars Melbourne, YBnrlih, http://lotterybloguk.com/ Camelot lottery results, jpVBjWp, http://mattrjacoby.com/Caverta.html Side effects of caverta, uFNJfQW, http://www.herrealworld.com/ Is ambien generic, ClRkwMt.
Posted on 12/04/2013 at 4:10am
cwcjwcmph, http://eastbaysectionarrl.org/ Online casino usa european roulette, GDxZOdu, http://www.esomeprazolepricer.com/ Buy esomeprazole, PMvqpCq, http://adexisstorage.com/bluehost/ Bluehost Wordpress, EDnzltB, http://www.watertherapists.com Buy Ativan, IQVsviT, http://www.klonopinweb.com/ Klonopin interact with 5-htp, ILlZPiY, http://lausdhss.org/ Online blackjack training, rSBkgxU.
Posted on 12/04/2013 at 4:09am
agsspcmph, http://naturalsexdrug.com/ Perform brute force instant download, kJketAJ.
Posted on 12/03/2013 at 8:40pm
rmraqcmph, http://revistafarsa.net/overplay/ Overplay Vpn Review, NQLweaO.
Posted on 12/03/2013 at 8:39pm
xxcdmcmph, http://alwaysasap.com/ Maxoderm videos, LIzKuFv, http://www.thebabcockagency.net/ Carisoprodol, KKoyAeN, http://extenzereview.ca/ Extenze Plus, hkCFmtD, http://hghusers.com/ Tmj human growth hormone, AmlbbYU, http://frpropecia.com/ Cialis prescription not required, PdDMMMS, http://asizegenetics.com/ Buy sizegenetics, wRruWuc.
Posted on 12/03/2013 at 12:55pm
qnndzcmph, http://bonussurcasinoenligne.com/ bonus casino, DuIsHcZ, http://oncasinobonus.com/ casino online, ImzTsNn, http://www.mvballtech.com/ Ambien purchase, GAJfmSQ, http://buyviagragoldusa.com/ Gold viagra 3000mg, oRBJWjO, http://great-hosts.com/inmotion-hosting/ Inmotion Hosting Reviews, vjQDxlL, http://levitra-treatment.com/ Levitra cha, eopcGPB.
Posted on 12/03/2013 at 12:54pm
hayancmph, http://learnaboutsemenax.com/ Semenax dosage, gjFyINo.
Posted on 12/02/2013 at 9:39pm
jmokzcmph, http://www.googleappscalifornia.com/ Vigrx and cons, kaBoluD, http://www.americanroadprinting.com/ Buy valium with no prescription overseas, LmFNTpJ, http://propeciaeffekt.com/ Subaction showcomments propecia smile blog, FJZJSai, http://www.greatlakesdmdg.org/ Adipex, ZCufIDc, http://arabidopsis2007.com/ Vigrx reviews, ENYLNOP, http://richwhite.org/ Cheat codes for facebook market street, LzQlhTJ.
Posted on 12/02/2013 at 9:39pm
bhghycmph, http://xanderland.org/ No Win No Fee Solicitors, uHnuBbF.
Posted on 12/02/2013 at 1:26pm
dwavtcmph, http://www.bennersbasement.com/ Buy phentermine 37.5 no prescription, nbWGLck.
Posted on 12/02/2013 at 1:25pm
vaosncmph, http://signals-superfi.com/ Can you buy phen 375 otc?, hAGNZkW, http://kamagraapoiar.com/ Order kamagra bank cheque, kBsVtQM, http://dapoxetineadvice.com/ Dapoxetine hydrochloride order, QIHSDUM, http://raspberryketonesmax123.com/ Raspberry Ketones Max, SvzbJbX, http://sizegeneticblog.com/ Size Genetics, tBfBnqy, http://moonlight14.com/ Champix effets secondaires, OyZebGH.
Posted on 12/02/2013 at 5:22am
ngapucmph, http://www.mikecaracciolo.com/contact.asp Discount levitra, nAvujOH.
Posted on 12/01/2013 at 9:25pm
lhlapcmph, http://francebinaryoptions.fr/banc-de-binary-review/ Bancdebinary, UhwBCiZ, http://savingmedical.com/Latisse.html Latisse ingredients, VRqBQTJ, http://cialisitaliano.com/ Cialis no prescription, YPKtfRA, http://beiking.org/ Problems with viagra, AvcLgdd, http://workplacehealthchecks.com/ Phentermine buy, jetKdaA, http://www.franchisecareerconsultants.com/contact.html Ambien cr, DtzDJNm.
Posted on 12/01/2013 at 1:17pm
vckxwcmph, http://onlinecasino-nz.com/ online casino, KWAdmdL.
Posted on 11/30/2013 at 6:22pm
qircncmph, http://84sese.com/ Usb car charger for electronic cigarette passthrough, jKhjArk, http://unattachedaffairs.com/ Buy Viagra, WFCGitt, http://unattachedaffairs.com/ Europe online sale viagra, kCcxONT, http://tramadolcheckup.com/ Tramadol and xanax, yKggbqO, http://cialisstudy.com/ Cialis female, XtEhlJg, http://household6diva.com/ What makes stendra any better than viagra?, oaEcoBf.
Posted on 11/30/2013 at 1:29pm
nwxjucmph, http://onlinecasino-4aussie.com/ How to win online casino roulette, qNrOELl.
Posted on 11/29/2013 at 12:25pm
cspqhcmph, http://testingvolumepills.com/ VolumePills, capUWIk, http://slodavinir.org/ Cheapest fioricet, wbzJdap, http://www.greenapplemusicfestival.com/ Daily cialis pill, MLbVwzW, http://translatorsofamerica.com/ Maximize ambien effectivenes, mWrYcFy, http://object-x.com/ How does cialis work, evhQOTP, http://up-wide.com/ Lifessence hgh, abGigIj.
Posted on 11/29/2013 at 12:42am
untypcmph, http://levitrajust4u.com/ Does levitra make it bigger, jTHXYEj.
Posted on 11/28/2013 at 8:18am
lhxcdcmph, http://www.wssarca.org/ Provigil, EHAMUBf, http://operationgolfcoast.com/ Priligy studies, XIerhDH, http://www.josiahpress.com/ Cialis surrey bc, QOGqlbB, http://www.l-instyle.com/ Valium receptor, ufRITiR, http://www.kishindaiko.com/contact How long does xanax stay in your system, ShXCTta, http://www.l-instyle.com/ Valium effect, dhbJSsz.
Posted on 11/27/2013 at 12:37pm
lfuqqcmph, http://www.williamsongs.com/ Klonopin overdose, SvpqeJz.
Posted on 11/27/2013 at 3:07am
syctacmph, http://gursikhijeevan.com/ Vigrx plus dosage, YcPXfDb, http://electroniccigarettesbase.com/ Super electronic cigarette, AtNqxDh, http://www.sensiblystyled.com/ Ativan side effects of an overdose, eBedHto, http://closure.org/ Cialis vs viagra, LCRihzR, http://www.beautystat.com/site/faq/ How to come off ambien cr, GDrxCPH, http://www.madonejacks.com/ Xanax online, WSGpqjF.
Posted on 11/25/2013 at 10:33pm
ahndncmph, http://www.barnesvillemn.com/~bvillemn/?page_id=573 Buy Viagra, sApLQmj.
Posted on 11/25/2013 at 8:14pm
lpnewcmph, http://amahouston.net/page/2/ Levitra pen, ukfcaqe, http://www.aeadvisorsllc.com/ Provigil modafinil alternate medication, nDGrQKq, http://www.untilyoucomehome.com/ Fioricet pharmacy, swKhZbD, http://damshortfilm.org/ Levitra camkeppra, RPCUMzT, http://thebridgecollective.org/ Purchasing modafinil, GlkeUsd, http://semenaxe.com/ Semenax, WwNJDkk.
Posted on 11/25/2013 at 3:59am
Posted on 11/25/2013 at 3:52am
jrolwcmph, http://www.endlesspinball.com/ Buy xanax prescription, QOuTBVZ, http://gobigorgohomeblog.com/the-prequel Buy levitra day trippers, mDgkIOv, http://sarahsilverman.org/ Genaric cialis, AdzDQYB, http://weareautism.org/ Get discount viagra online, cMgNBHE, http://cialissuccess.com/ Discount cialis, vQkRZAI, http://www.larkenrose.com/store.html Buy levitra online viagra, YsjPtUf.
Posted on 11/25/2013 at 3:52am
qwqwvcmph, http://connectivitycom.com/ Generic for viagra, uwaYZmH.
Posted on 11/24/2013 at 7:48pm
kgrtycmph, http://icakiev.com/ Women who have tried kamagra, tSKeemR.
Posted on 11/24/2013 at 7:48pm
mowwdcmph, http://www.1hghproducts.com/ Hgh factor legal, NFfCnUF, http://myecarte.com/ Casino &, vJOjGWY, http://vapenreview.com/ Viagra kaufen, MWSnczm, http://generalsyouthfootball.com/ Won viagra lawsuits in may of 2010, iyXebkx, http://thealtahotel.com/ How valium is made, UstAibM, http://pavandbroome.com/ What year klonopin invented, stzsVkA.
Posted on 11/24/2013 at 2:24pm
qlelhcmph, http://autism.sedl.org/index.php/about-us Viagra online uk, DGHIFzU.
Posted on 11/24/2013 at 2:23pm
xutalcmph, http://7stephanddanceacademy.org/ Samsung blackjack smartphone, qUOEvAF, http://3688999.com/ 24option, gEJMfuR, http://tierraypueblo.com/ Spielautomaten k\u00f6ln, byMhxxZ, http://bashkiaprrenjas.com/ Online Blackjack, cVBheqb, http://aspauthors.com/ Bovada casino, LiqOKaG, http://hersolutionreview.co.uk/ Hersolution Reviews, euDHyLh.
Posted on 11/24/2013 at 2:42am
ltrbrcmph, http://rc-resources.com/ Semenax Reviews, cohEVyA, http://usfkappadelta.com/ Casino en linea, NyzfVSV, http://casinogamestars.com/ Roulette, CIKImVk, http://artscouncil-neky.com/ bovada, DTrZCWJ, http://112daychallenge.com/ Poker spielen kostenlos, dLljZzK, http://tahoeheavenlyvacations.com/ Garcinia Cambogia Extract, vvcGTQf.
Posted on 11/24/2013 at 1:14am
vppnncmph, http://smsrealestate.net/ machines a sous gratuites, mAmEyjw.
Posted on 11/23/2013 at 2:22pm
bqcjgcmph, http://sowingseedsofhope.org/ casino bonus, BAwkdJR, http://phallosanreview.co.uk/ Buy Phallosan, WWdIliG, http://www.ourcountrydeservesbetter.com/ Viagra for sale without a prescription, UJIllrK, http://www.hghalftimereport.com/ Gen f 20 plus reviews, DvCayFo, http://doughaslam.com/about-2/ Order fioricet, nsKQIBF, http://5uf.net/ Slots, CNkMbAL.
Posted on 11/23/2013 at 1:49pm
lfkyxcmph, http://vipiafrica.com/ Sports online gambling, bScZKaf.
Posted on 11/23/2013 at 1:02am
uzakmcmph, http://bluecatbooks.com/ Binare optionen, PnxMuKM, http://casino-revues.fr/ Casino hard rock, moNQdAm, http://pleasurebend.com/ Royal online casino, xEUaaXa, http://me-review.co.uk/ Male Edge Review, EMirWip, http://www.clevelandorchestrablog.com/ Fedex generic viagra, IcbYOyS, http://roulettespielen7.de/ Roulette, oaDhwAE.
Posted on 11/23/2013 at 1:02am
cfjnncmph, http://semenaxreview.co.uk/ Semenax Pills, UbjrswU.
Posted on 11/22/2013 at 5:26pm
zkbzvcmph, http://www.trainer-kongress-berlin.de/ How to win online casino roulette, GNxOCky.
Posted on 11/22/2013 at 5:25pm
okohhcmph, http://immo-tdor.com/ Play casino, RiuCPvE, http://www.internetcasinosonline.de/ Spielen Kostenlo, FCHZgXR, http://kanabecchamber.org/ Genf20 hgh releaser review, fYvnAZb, http://goodnewscasino.com/ Laura san giacomo pokies, QePvDev, http://240forum.com/ slot, hJFCNUg, http://maleextra-review.co.uk/ Extra Strong Male Tonic Enhancer, zAntMqY.
Posted on 11/22/2013 at 8:57am
iviqjcmph, http://phreview.co.uk/ Penishealth, ClFDRGn, http://janedoemovie.com/ Casino en ligne gratuit, gOjRkxT, http://johnnyhongkong.com/ Mobile Casino, Dwwnznr, http://shinhwayeah.com/ Australian casino online, IQBDQCc, http://rosamundesausagegrill.com/ Xanax bars, UYHpPus, http://extenzereview.co.uk/ Extenze Reviews, OibwCDz.
Posted on 11/22/2013 at 8:57am
fyrzrcmph, http://www.andyabad.com/ Order viagra online no prescription, XALlOyZ.
Posted on 11/22/2013 at 1:39am
sjiarcmph, http://autism.sedl.org/index.php/project-need Cialis super active, ePdAkvy, http://costa-rica-real-estate-for-sale.com/ Bovada online casino, XDQXarG, http://act1dancestudio.com/ I607 blackjack smartphone, AOHCHHd, http://university-acs.com/ What is the half life of ambien, JRIWazm, http://yaynepalhotels.com/ Slots, lUVmgck, http://cornerbooks.org/ Online swiss casino, HYwTAmS.
Posted on 11/22/2013 at 1:38am
inrgjcmph, http://inserm-jeunes.org/ Resort casino, goDHLZl.
Posted on 11/21/2013 at 4:58pm
bjfejcmph, http://graphic-utilities.com/ Casino gratuit, pVUvYmP, http://onlineroulette333.com/ Casino spiele download, Vpsbqfb, http://womenstherapy.org/ Viagra, DxxjZTT, http://cosimosbloomfield.com/ Bovada casino no depposit bonus, TUgEzas, http://gocrazygreen.net/ Free hcg diet recipes, VjeZcIk, http://voting101.org/ Blackjack, SYEgYuk.
Posted on 11/21/2013 at 9:12am
hfqtscmph, http://iachaser.com/ Juego de casino gratis, wTeXOSe.
Posted on 11/21/2013 at 9:12am
qtzhwcmph, http://pokieslog.com/ Giada de laurentiis pokies, kPHRSvz, http://8-software.com/ Moorhuhn online kostenlos spielen, zSMtXHO, http://volumepillsreview.co.uk/ Volume Pills Ingredients, TmGFAXR, http://sizegenetics-review.co.uk/ Size Genetics Reviews, mFDYTId, http://provestrareviews.co.uk/ What Is Provestra, FpMStKh, http://overnightsemenax.com/ Semenax, mBhwLKp.
Posted on 11/21/2013 at 2:51am
cpbzfcmph, http://staceylizette.net/ Meridia uk, Nsneovw.
Posted on 11/21/2013 at 2:51am
zuezacmph, http://idlehandsdrygoods.com/ Do electronic cigarettes really work, VgkDdXj, http://cubeq8.com/ Online Casino, MOEIejK, http://vigrxreview.co.uk/ Vigrx Review, dIPOlSW, http://cruzinsports.com/ Win online roulette, cQeqppX, http://zetaclearreview.co.uk/ Zetaclear Price, LYCnaIS, http://onlinecasino4aussie.com/ Online Casino, prsQZKz.
Posted on 11/20/2013 at 8:18pm
zvbwmcmph, http://www.ihsc-usf.com/ Cialis, XFNWdRz, http://transpride.net/ Jouer casino en ligne, xMRhXNn, http://www.long-sunday.net/volumepills.html Volume Pills, eBiakWx, http://www.ticketcitybowl.com/ Female viagra, RrOOHOb, http://onlinecasino555.co.uk/ Online casino, PNDfMzk, http://craftsdb.com/ Bovada casino, UIuPCbu.
Posted on 11/20/2013 at 8:18pm
iklrkcmph, http://bestonlinecasinoreview.de/ Online casino wagering, rpvaKnB.
Posted on 11/20/2013 at 1:02pm
xxabscmph, http://www.larkenrose.com/outside-the-cage.html Who sells levitra, CPKSWMD.
Posted on 11/20/2013 at 1:01pm
plqqjcmph, http://www.epmonthly.com/advertise/ Cialis 20mg, YgNehZt, http://www.lagenerale.fr/ Casino en Ligne, JXVjSwY, http://blackboxrecorder.net/ Pokies, IqEpxXy, http://bookiestavern.com/ Raspberry ketone synthesis, UgRvfAD, http://1dentalplans.com/ Thunderbirde slot machine volume, ygymGhP, http://tugboatproductions.com/ Online slots casino games, rmIXwYV.
Posted on 11/20/2013 at 5:57am
lgnqzcmph, http://aejmcdenver.org/ Online casino free deposit, qWNkGnI.
Posted on 11/20/2013 at 5:56am
qmkkwcmph, http://judinews.com/ Totally free casino games, yhojQjo, http://casinoonlineadvisor-it.com/ slot online, yODWovp, http://semenaxnews.com/ To buy semenax in, gZtpmTj, http://condolawyer.net/ Casino Bonus, tEszBID, http://www.precisionrafting.com/ Kamagra on line pharmacy, DKQCAtb, http://clearporesreview.co.uk/ Clearpores Acne Treatment, rKRciPY.
Posted on 11/19/2013 at 11:27pm
nypgccmph, http://jereview.co.uk/ Jes Extender Before After, XffqZBu.
Posted on 11/19/2013 at 11:27pm
vxqitcmph, http://belizevolleyball.org/ Hour payday loans, OflvwyK, http://african-mango-review.co.uk/ African Mango, uXDibcx, http://thegreencoffeediets.com/ Best time to take green coffee bean extract, LkgbBgv, http://www.shreveport-rhythm.de/ Online casino slot invaders moolah, yqVGaJu, http://prosolutionreviews.co.uk/ Pro Solution Gel, IsMFQHv, http://revuesdescasinos.com/ Bonus argent casino en ligne, AHpMSZc.
Posted on 11/19/2013 at 4:47pm
gdwbgcmph, http://www.elisabethhubert.com/ Buy viagra online safe, qWAhHei.
Posted on 11/19/2013 at 7:19am
ihjadcmph, http://maleextra-direct.net/faq.html maleextra, PowxlcO, http://nuontherapeutics.com/ Opinions of the hcg diet, tEItaWf, http://forex-reviews.co.uk/etoro-review Etoro Review, DvkRvgC, http://idtheftne.org/ buy viagra on the internet, aSFzhgr, http://wholesalefuels.com/ What does ativan do to for hypothermia, EGdBsef, http://chosencarinsurance.com/land-rover-insurance Land Rover Insurance Specialist, fOrwkwC.
Posted on 11/19/2013 at 5:40am
hgnfqcmph, http://carrentalmessage.com/BirminghamCarRental.html Birmingham Car Rental, drUimif.
Posted on 11/18/2013 at 8:12pm
kstgycmph, http://revitolscarcreamshop.net/ Revitol Scar Cream, oVUmDkG.
Posted on 11/18/2013 at 2:37pm
xcrurcmph, http://kollagenintensiv-info.com/ Kollagen Intensiv, hjSjXaA, http://watchasianpornmovies.com/ free teen asian porn, HkVABLV, http://jouercasino.e-monsite.com/ jouercasino, jTFWSiM, http://onlinecasinocenter.com/casino-deposit-options/paypal casinos that accept paypal, OOLNJuH, http://phenterminetoday.org/ Buy Phentermine, VkhshQB, http://revitol4all.com/ stretch mark cream revitol cellulite, BPsGkIs.
Posted on 11/18/2013 at 9:11am
hyfigcmph, http://hghboutique.com/genf20-genfx-and-hypergh-14x-which-to-choose.html genf20 uk, iVsKPtj.
Posted on 11/18/2013 at 12:26am
vzbvpcmph, http://truepenisenhancer.com/ vigrx, jCvtTSw.
Posted on 11/17/2013 at 3:56pm
xzloocmph, http://hotels95.com/ laughlin nevada hotels, wXYbyhJ.
Posted on 11/17/2013 at 9:08am
iedkkcmph, http://alluskincare4u.com/ Allu Skin Care, hQSBZZO, http://accessadultporn.com/DangerousDongs.html Dangerous Dongs, kpOrBnT, http://www.clipon.com/ Ativan medicinenet, LJeWDGS, http://legalhighpillsweb.com/ what pills make you high, RtUzAuV, http://percodanshoprx.com/ percodan buy, iPurSRH, http://livesexbate.com/ Chaturbate, PzMrCuR.
Posted on 11/17/2013 at 7:30am
lkuyvcmph, http://ot-magazine.com/ Twitter followers mosaic, OPUNwMG.
Posted on 11/16/2013 at 9:55pm
ncdincmph, http://bestspainlondon.co.uk Spas In London, XGwJlZc.
Posted on 11/16/2013 at 5:26pm
dqzivcmph, http://www.247anxietyblog.com/category/valium How does valium work in the brain, uuyUWuD, http://twitter.com/cherkesky Guy Cherkesky, vEUVWmd, http://iloansreview.com/treeline-credit-services-review-find-out-if-its-scam-or-real.html treeline well services, HHaZuof, http://newautoproducts.com/cleaning/winshield-wonder-special-offer-buy-1-get-1-free Winshield Wonder, fkhMknF, http://autophosts.com/hostpapa Hostpapa, pSOygwN, http://someitgreen.com/ buy greensmoke, cnUewJi.
Posted on 11/16/2013 at 12:45pm
sqjlicmph, http://webhostingreview.org/siteground siteground review, fspPgsc.
Posted on 11/16/2013 at 4:01am
trjmucmph, http://willraap.org/ Buy Ambien, bziRKIA.
Posted on 11/16/2013 at 1:58am
lxojscmph, http://binary-options-reviews.co.uk/optionbit-review Optionbit Review, xUpZRqt, http://greenpuffer4u.net/ Green Puffer, yLvqpKB, http://italiakamagraoraljelly.com/ kamagra oral jelly effects, HEncxLS, http://carrentalwheel.com/FriscoCarRental.html Frisco Car Rental, bysQDIL, http://purasilktoday.com/ purasilk reviews, FbtZQgf, http://jigsawpuzzleszone.com/ online jigsaw puzzles, VFekRDP.
Posted on 11/15/2013 at 8:45pm
uuktacmph, http://vardenafil2k.org/ vardenafil, ZhBBpNv.
Posted on 11/15/2013 at 11:43am
dfpoqcmph, http://smokelesscigarettestoday.com/ cigs red Lux ecig, SpCoEke, http://virilitypillsi.com/ Virility Pills, WEIuuRA, http://bestecigbrandsreview.com/v2-cigs.html V2Cigs Review, xGdsMCs, http://illinoisrunner.com/ Tramadol, yQLqqYD, http://1stvigrxstore.com/ vigrx oil, nmyRqJB, http://electroniccigarettespage.com/ Slim electronic cigarette, MGdtSFm.
Posted on 11/15/2013 at 4:12am
fnnsacmph, http://madinitalystore.com/ Provigil, ReNIycQ.
Posted on 11/15/2013 at 4:11am
mcmducmph, http://eazol-direct.net/ Eazol, BiLsxvW, http://casinowilt.com/WinAtOnlineBlackjack.html Win At Online Blackjack, VjxevaY, http://genf20howto.com/ Genf20, yBpZhki, http://genesismarketingpartners.com/ Is hgh a steroid, BOguamI, http://www.solec.org/ What will ambien show up as on a drug test, FXskXzc, http://breastactivesreviews.com.au Buy Breast Actives, TzQYtud.
Posted on 11/14/2013 at 8:59pm
utbhccmph, http://provestra-information.com/ Provestra, ZSBxKiC, http://maleedgei.com/ MaleEdge, vEOtbob, http://bbwdating4u.com/ BBW, ETvmxlO, http://vigrxwebs.com/ Vigrx plus australia, lNZnuCt, http://snapcarrental.com/CoronaCarRental.html Corona Car Rental, SACDjYs, http://free-reversephone.com/ reverse phone book lookup, GvAWfIs.
Posted on 11/14/2013 at 8:58pm
tykyzcmph, http://learnaboutjesextender.com/ fungerar jes extender, FhbCtBH.
Posted on 08/17/2013 at 11:05pm
I'm glad you're enjoying nflgame! But please, I strongly urge you to post further questions on nflgame's issue tracker. Comments here aren't well suited to helping that requires some back and forth. (Since you don't get any notification that I've responded.)
I've posted your question to nflgame's issue tracker and provided an answer. :-)
Posted on 08/17/2013 at 10:29am
Hi Andrew, this thing is really great. It's so much better then the VB 6 yahoo HTML box score parser I wrote a few years back. Just curious, how do you find the distances of the field goals. Our league awards 1 point per yard so a 45 yard field goal and a 25 yard field goal nets the kicker 70 points. We have a high scoring league.
I see when you output the stats for the week to a csv, it will give the kickers field goals attempted and made and there is a column called kicking_fgyds but that seems to give the long field goal. I'm hoping for the total yards of all the field goals made. Is that possible?
Again, thanks for this…it's really great.
Posted on 10/05/2012 at 12:49am
This is really beautiful.
Such a clean API!
I'm moving some of the data into pandas to play with (preferring pandas to SQL). In any case, a huge thanks for such a great python package.
Posted on 09/20/2012 at 7:17pm
I'm a fantasy junkie as well and have some theories about how to find breakout players automatically and also assist in picking players to start/sit based on differing sets of criteria (injuries, past performance, home/away, last time played and other statistical data)..
Ah, I haven't gone down that road yet. I'm just trying to make it easier to track what's going on, since I'm in four leagues this year. What I've come up with so far is to have a live stream of all plays, and have plays involving one of my players highlighted. It's quite addicting to watch on Sunday…
I have written some code that pulls my rosters and matchup information from Yahoo and ESPN leagues. It uses YQL for Yahoo and (unfortunately) BeautifulSoup for ESPN. But it works!
Do you have twitter?
Posted on 09/20/2012 at 4:14pm
Thanks for the heads up on loading the data to a database. I'll definitely use nflgame.live to load the data into the DB and as suggested have the web app reading from that db to display the data. Gonna start ultra simple and extend it out from there.
I'm a fantasy junkie as well and have some theories about how to find breakout players automatically and also assist in picking players to start/sit based on differing sets of criteria (injuries, past performance, home/away, last time played and other statistical data).. Do you have twitter?
Posted on 09/20/2012 at 3:41pm
I'll see if I can't extend this and give us live visualization using Django.
That'd be awesome! I've done a little work on visualizing my fantasy football leagues (that I'll share soon) using Bottle (I'm really loving its simplicity). In my experience so far, I strongly urge you to load the data into a relational database and have the web-frontend pull data from there rather than nflgame explicitly. Using nflgame with more than a dozen games or so is just going to be too slow.
So basically, I'd see this having two components: 1) A background process that uses
nflgame.live (or not) to load data into a relational database and 2) a web app that reads from the database and displays the data.
It might also be worth checking out NoSQL. It might be a better approach to storing statistics.
Posted on 09/20/2012 at 3:35pm
WOW. This is about as BOSS as humanly possible. Followed you on Github and starred the project. I'll see if I can't extend this and give us live visualization using Django. Excellent Job! Looking forward to contributing.
Posted on 09/07/2012 at 4:07pm
Andrew, that's perfect. Very cool. I'll keep you posted how it works.
Posted on 09/07/2012 at 1:35pm
Also, if you post your questions on github, you should get email notifications when I respond. But you'll probably need a github account (and feel free to continue using this blog entry if you don't want to register for a github account).
Posted on 09/07/2012 at 1:32pm
One question for you: Is it possible to generate player/team statistics by filtering on individual plays?
Yes! I will warn you, I've added this functionality recently, so it may be a little raw in places. But if you're using the latest version (1.0.7), then you should be OK.
For example, if I want to find Brady's pass attempts and completions ONLY on third down plays. That would be really interesting.
Here ya go:
>>> import nflgame >>> g = nflgame.one(2011, 17, "NE", "BUF") >>> plays = g.drives.plays().filter(third_down_att=1) >>> brady = plays.players().name('T.Brady') >>> brady.formatted_stats() 'passing_att: 8, passing_incmp: 3, passing_incmp_air_yds: 35, passing_sk: 2, passing_sk_yds: -10, passing_yds: 58, passing_cmp: 5, passing_cmp_air_yds: 29, passing_int: 1, passing_tds: 1'
So on third down, Brady went 5⁄8 for 58 yards. Was sacked twice for 10 yards. Threw one pick and one TD. :-)
You can do this for an entire season too (or multiple games), but the API doesn't directly support this. I plan on adding it though. (Right now, you'd have to get all plays for each game manually, then simply add them together. Kind of how nflgame.combine works.)
Posted on 09/07/2012 at 8:36am
Well done, this is great. One question for you: Is it possible to generate player/team statistics by filtering on individual plays? For example, if I want to find Brady's pass attempts and completions ONLY on third down plays. That would be really interesting.
I'm playing around this module not for fantasy football, but for a team stats model. Definitely better than screens scraping.