The week parameter is relative to the value of the kind parameter, and may be set to a list of week numbers. In the regular season, the week parameter corresponds to the normal week numbers 1 through Similarly in the preseason, valid week numbers are 1 through 4.
In the post season, the week number corresponds to the numerical round of the playoffs. So the wild card round is week 1, the divisional round is week 2, the conference round is week 3 and the Super Bowl is week 4. The year parameter specifies the season, and not necessarily the actual year that a game was played in. For example, a Super Bowl taking place in the year actually belongs to the season.
Also, the year parameter may be set to a list of seasons just like the week parameter. A game's JSON data is only cached to disk once the game is over, so be careful with the number of times you call this while a game is going on. If started is True, then only games that have already started or are about to start in less than 5 minutes will be returned.
Note that the started parameter requires pytz to be installed. Therefore, nflgame can be used to report game statistics while a game is being played. The package comes pre-loaded with game data from every pre- and regular season game from up until August 28, Therefore, querying such data does not actually ping NFL. If you ask for data for a particular game that hasn't been cached to disk but is no longer being played, it will be automatically cached to disk so that no further downloads are required.
Given some game, the player statistics can be easily searched. For example, to find the passing leaders of a particular game:. We can filter all players on whether they had more than zero defensive interceptions, and then sort those players by the number of picks:.
Sequences of players can be added together, and their sum can then be used like any other sequence of players. For example, to get every player that played in week 10 of Every sequence of Players can be easily dumped into a file formatted as comma-separated values CSV.
Or if you want to get crazy, you could dump the statistics of every player from an entire season:. ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds. Privacy Policy Contact Us Support. All rights reserved. All other marks are property of their respective owners. Download ActivePython. Python 2.
Database Console End Users. Links Homepage PyPI nflgame recipes. Author Andrew Gallant. Imports nflgame. Lastest release version 1. It does not yet work with Python 3. Examples Finding games Games can be selected in bulk, e. Find passing leaders of a game Given some game, the player statistics can be easily searched.
For example, to find the passing leaders of a particular game: for p in game. Brady 35 23 3 R. Please try enabling it if you encounter problems. Search PyPI Search. Latest version Released: Aug 11, Navigation Project description Release history Download files. Project links Homepage.
Maintainers dwelch nczeak. McCoy 31 carries for yards and 1 TDs T. Pryor 13 carries for yards and 0 TDs S. Vereen 14 carries for yards and 0 TDs A. Peterson 18 carries for 93 yards and 2 TDs R. Bush 21 carries for 90 yards and 0 TDs Or you could find the top 5 passing plays in the same time period:!
Warning Some features may not work without JavaScript. Please try enabling it if you encounter problems. Search PyPI Search. Latest version Released: Sep 7, Navigation Project description Release history Download files. Project links Homepage. Maintainers burntsushi. McCoy 31 carries for yards and 1 TDs T. Pryor 13 carries for yards and 0 TDs S. Vereen 14 carries for yards and 0 TDs A. Peterson 18 carries for 93 yards and 2 TDs R.
Bush 21 carries for 90 yards and 0 TDs Or you could find the top 5 passing plays in the same time period:! Manning pass short left to D. Penalty on BAL-E. Dumervil, Defensive Offside, declined.
Stafford pass short middle to R. Manning pass deep left to V. Pass complete on a fly pattern. Brees pass deep left to K. Stills to ATL 9 for 67 yards R. McClain; R. Manning pass short middle to H. Nicks pushed ob at DAL 23 for 57 yards M.
0コメント