Package nflgame :: Module stats
[frames] | no frames]

Source Code for Module nflgame.stats

  1  """ 
  2  The stats module maps statistical category identifiers from NFL.com's 
  3  GameCenter JSON feed to a representation of what we believe that statistical 
  4  category means. This mapping has been reverse engineered with a lot of help 
  5  from reddit users rasherdk and curien. 
  6   
  7  B{Note}: We now have a data dictionary mapping statistical category id to 
  8  a description from nflgsis.com. An original copy is in the root directory 
  9  of the nflgame repository (StatIDs.html). 
 10   
 11  If you think anything here is wrong (or can figure out some of the unknowns), 
 12  please let me know by filing an issue here: 
 13  https://github.com/BurntSushi/nflgame/issues 
 14   
 15  For each statistical category identifier, we create a dict of 6 fields 
 16  describing that statistical category. The fields are cat, fields, yds, value, 
 17  desc and long. 
 18   
 19  cat specifies which statistical category the particular stat belong in. Only 
 20  statistical categories in nflgame.player.categories should be used. 
 21   
 22  fields specifies the actual statistical field corresponding to the stat. This 
 23  will manifest itself as a property on statistical objects via the API. These 
 24  fields should correspond to counters; i.e., number of receptions, rushing 
 25  attempts, tackles, etc. 
 26   
 27  yds specifies a field that contains the yardage totals relevant to the stat. 
 28  If a stat does not specify yards, this field should be blank (an empty string). 
 29   
 30  value specifies how much each statistic is worth. This is 1 in every case 
 31  except for split sacks. 
 32   
 33  desc specifies a human readable description for the statistic. It should be 
 34  concise and clear. If a statistical category is unknown, then desc should 
 35  contain a string like 'Unknown (reason for confusion)'. Valid reasons for 
 36  confusion include "data is inconsistent" or "this looks like a duplicate" all 
 37  the way to "I have no fucking clue." 
 38   
 39  long contains a verbatim description from nflgsis.com. Some of the information 
 40  clearly references legacy systems, but alas, it is included as it adds to the 
 41  context of each statistical category. 
 42  """ 
 43   
 44  categories = { 
 45      2: { 
 46          'cat': 'punting', 
 47          'fields': ['punting_blk', 'punting_cnt'], 
 48          'yds': '', 
 49          'desc': 'Punt blocked (offense)', 
 50          'long': 'Punt was blocked. A blocked punt is a punt that is touched ' 
 51                  'behind the line of scrimmage, and is recovered, or goes ' 
 52                  'out of bounds, behind the line of scrimmage. If the ' 
 53                  'impetus of the punt takes it beyond the line of scrimmage, ' 
 54                  'it is not a blocked punt.', 
 55      }, 
 56      3: { 
 57          'cat': 'team', 
 58          'fields': ['first_down', 'rushing_first_down'], 
 59          'yds': '', 
 60          'desc': '1st down (rushing)', 
 61          'long': 'A first down or TD occurred due to a rush.', 
 62      }, 
 63      4: { 
 64          'cat': 'team', 
 65          'fields': ['first_down', 'passing_first_down'], 
 66          'yds': '', 
 67          'desc': '1st down (passing)', 
 68          'long': 'A first down or TD occurred due to a pass.', 
 69      }, 
 70      5: { 
 71          'cat': 'team', 
 72          'fields': ['first_down', 'penalty_first_down'], 
 73          'yds': '', 
 74          'desc': '1st down (penalty)', 
 75          'long': 'A first down or TD occurred due to a penalty. A play can ' 
 76                  'have a first down from a pass or rush and from a penalty.', 
 77      }, 
 78      6: { 
 79          'cat': 'team', 
 80          'fields': ['third_down_att', 'third_down_conv'], 
 81          'yds': '', 
 82          'desc': '3rd down attempt converted', 
 83          'long': '3rd down play resulted in a first down or touchdown.', 
 84      }, 
 85      7: { 
 86          'cat': 'team', 
 87          'fields': ['third_down_att', 'third_down_failed'], 
 88          'yds': '', 
 89          'desc': '3rd down attempt failed', 
 90          'long': '3rd down play did not result in a first down or touchdown.', 
 91      }, 
 92      8: { 
 93          'cat': 'team', 
 94          'fields': ['fourth_down_att', 'fourth_down_conv'], 
 95          'yds': '', 
 96          'desc': '4th down attempt converted', 
 97          'long': '4th down play resulted in a first down or touchdown.', 
 98      }, 
 99      9: { 
100          'cat': 'team', 
101          'fields': ['fourth_down_att', 'fourth_down_failed'], 
102          'yds': '', 
103          'desc': '4th down attempt failed', 
104          'long': '4th down play did not result in a first down or touchdown.', 
105      }, 
106      10: { 
107          'cat': 'rushing', 
108          'fields': ['rushing_att'], 
109          'yds': 'rushing_yds', 
110          'desc': 'Rushing yards', 
111          'long': 'Rushing yards and credit for a rushing attempt.', 
112      }, 
113      11: { 
114          'cat': 'rushing', 
115          'fields': ['rushing_att', 'rushing_tds'], 
116          'yds': 'rushing_yds', 
117          'desc': 'Rushing yards, TD', 
118          'long': 'Rushing yards and credit for a rushing attempt where the ' 
119                  'result of the play was a touchdown.', 
120      }, 
121      12: { 
122          'cat': 'rushing', 
123          'fields': [], 
124          'yds': 'rushing_yds', 
125          'desc': 'Rushing yards, No rush', 
126          'long': 'Rushing yards with no rushing attempt. This will occur when ' 
127                  'the initial runner laterals to a second runner, and the ' 
128                  'second runner possesses the lateral beyond the line of ' 
129                  'scrimmage. Both players get rushing yards, but only the ' 
130                  'first player gets a rushing attempt.', 
131      }, 
132      13: { 
133          'cat': 'rushing', 
134          'fields': ['rushing_tds'], 
135          'yds': 'rushing_yds', 
136          'desc': 'Rushing yards, TD, No rush', 
137          'long': 'Rushing yards and no rushing attempt, where the result of ' 
138                  'the play was a touchdown. (See id 12.)', 
139      }, 
140      14: { 
141          'cat': 'passing', 
142          'fields': ['passing_att', 'passing_incmp'], 
143          'yds': '', 
144          'desc': 'Pass incomplete', 
145          'long': 'Pass atempt, incomplete.', 
146      }, 
147      15: { 
148          'cat': 'passing', 
149          'fields': ['passing_att', 'passing_cmp'], 
150          'yds': 'passing_yds', 
151          'desc': 'Passing yards', 
152          'long': 'Passing yards and a pass attempt completed.', 
153      }, 
154      16: { 
155          'cat': 'passing', 
156          'fields': ['passing_att', 'passing_cmp', 'passing_tds'], 
157          'yds': 'passing_yds', 
158          'desc': 'Passing yards, TD', 
159          'long': 'Passing yards and a pass attempt completed that resulted in ' 
160                  'a touchdown.', 
161      }, 
162      # 17: Passing Yards, No Pass 
163      # In SuperStat, this code was used when the initial pass receiver lateraled 
164      # to a teammate. It was later combined with the "Passing Yards" code to 
165      # determine the passer's (quarterback's) total passing yardage on the play. 
166      # This stat is not in use at this time. 
167   
168      # 18: Passing Yards, YD, No pass 
169      # Passing yards, no pass attempt, with a result of touchdown. This stat 
170      # is not in use at this time. 
171      19: { 
172          'cat': 'passing', 
173          'fields': ['passing_att', 'passing_incmp', 'passing_int'], 
174          'yds': '', 
175          'desc': 'Interception (by passer)', 
176          'long': 'Pass attempt that resulted in an interception.', 
177      }, 
178      20: { 
179          'cat': 'passing', 
180          'fields': ['passing_sk'], 
181          'yds': 'passing_sk_yds', 
182          'desc': 'Sack yards (offense)', 
183          'long': 'Number of yards lost on a pass play that resulted in a sack.', 
184      }, 
185      21: { 
186          'cat': 'receiving', 
187          'fields': ['receiving_rec'], 
188          'yds': 'receiving_yds', 
189          'desc': 'Pass reception yards', 
190          'long': 'Pass reception and yards.', 
191      }, 
192      22: { 
193          'cat': 'receiving', 
194          'fields': ['receiving_rec', 'receiving_tds'], 
195          'yds': 'receiving_yds', 
196          'desc': 'Pass reception yards, TD', 
197          'long': 'Same as previous (21), except when the play results in a ' 
198                  'touchdown.', 
199      }, 
200      23: { 
201          'cat': 'receiving', 
202          'fields': [], 
203          'yds': 'receiving_yds', 
204          'desc': 'Pass reception yards, No reception', 
205          'long': 'Pass reception yards, no pass reception. This will occur ' 
206                  'when the pass receiver laterals to a teammate. The teammate ' 
207                  'gets pass reception yards, but no credit for a pass ' 
208                  'reception.', 
209      }, 
210      24: { 
211          'cat': 'receiving', 
212          'fields': ['receiving_tds'], 
213          'yds': 'receiving_yds', 
214          'desc': 'Pass reception yards, TD, No reception', 
215          'long': 'Same as previous (23), except when the play results in a ' 
216                  'touchdown.', 
217      }, 
218      25: { 
219          'cat': 'defense', 
220          'fields': ['defense_int'], 
221          'yds': 'defense_int_yds', 
222          'desc': 'Interception yards', 
223          'long': 'Interception and return yards.', 
224      }, 
225      26: { 
226          'cat': 'defense', 
227          'fields': ['defense_int', 'defense_int_tds'], 
228          'yds': 'defense_int_yds', 
229          'desc': 'Interception yards, TD', 
230          'long': 'Same as previous (25), except when the play results in a ' 
231                  'touchdown.', 
232      }, 
233      27: { 
234          'cat': 'defense', 
235          'fields': [], 
236          'yds': 'defense_int_yds', 
237          'also': [], 
238          'desc': 'Interception yards, No interception', 
239          'long': 'Interception yards, with no credit for an interception. This ' 
240                  'will occur when the player who intercepted the pass laterals ' 
241                  'to a teammate. The teammate gets interception return yards, ' 
242                  'but no credit for a pass interception.', 
243      }, 
244      28: { 
245          'cat': 'defense', 
246          'fields': ['defense_int_tds'], 
247          'yds': 'defense_int_yds', 
248          'also': [], 
249          'desc': 'Interception yards, TD, No interception', 
250          'long': 'Same as previous (27), except when the play results in a ' 
251                  'touchdown.', 
252      }, 
253      29: { 
254          'cat': 'punting', 
255          'fields': ['punting_tot'], 
256          'yds': 'punting_yds', 
257          'desc': 'Punting yards', 
258          'long': 'Punt and length of the punt. This stat is not used if ' 
259                  'the punt results in a touchback; or the punt is received ' 
260                  'in the endzone and run out; or the punt is blocked. This ' 
261                  'stat is used exclusively of the PU_EZ, PU_TB and PU_BK ' 
262                  'stats.', 
263      }, 
264      30: { 
265          'cat': 'punting', 
266          'fields': ['punting_i20'], 
267          'yds': '', 
268          'desc': 'Punt inside 20', 
269          'long': 'This stat is recorded when the punt return ended inside the ' 
270                  'opponent\'s 20 yard line. This is not counted as a punt or ' 
271                  'towards punting yards. This stat is used solely to calculate ' 
272                  '"inside 20" stats. This stat is used in addition to either a ' 
273                  'PU or PU_EZ stat.', 
274      }, 
275      31: { 
276          'cat': 'punting', 
277          'fields': ['punting_tot'], 
278          'yds': 'punting_yds', 
279          'desc': 'Punt into endzone', 
280          'long': 'SuperStat records this stat when the punt is received in ' 
281                  'the endzone, and then run out of the endzone. If the play ' 
282                  'ends in the endzone for a touchback, the stat is not ' 
283                  'recorded. This stat is used exclusively of the PU, PU_TB and ' 
284                  'PU_BK stats.', 
285      }, 
286      32: { 
287          'cat': 'punting', 
288          'fields': ['punting_tot', 'punting_touchback'], 
289          'yds': 'punting_yds', 
290          'desc': 'Punt with touchback', 
291          'long': 'Punt and length of the punt when the play results in a ' 
292                  'touchback. This stat is used exclusively of the PU, PU_EZ ' 
293                  'and PU_BK stats.', 
294      }, 
295      33: { 
296          'cat': 'puntret', 
297          'fields': 'puntret_tot', 
298          'yds': 'puntret_yds', 
299          'desc': 'Punt return yards', 
300          'long': 'Punt return and yards.', 
301      }, 
302      34: { 
303          'cat': 'puntret', 
304          'fields': ['puntret_tot', 'puntret_tds'], 
305          'yds': 'puntret_yds', 
306          'desc': 'Punt return yards, TD', 
307          'long': 'Same as previous (33), except when the play results in a ' 
308                  'touchdown.', 
309      }, 
310      35: { 
311          'cat': 'puntret', 
312          'fields': [], 
313          'yds': 'puntret_yds', 
314          'desc': 'Punt return yards, No return', 
315          'long': 'Punt return yards with no credit for a punt return. This ' 
316                  'will occur when the player who received the punt laterals ' 
317                  'to a teammate. The teammate gets punt return yards, but no ' 
318                  'credit for a return.', 
319      }, 
320      36: { 
321          'cat': 'puntret', 
322          'fields': ['puntret_tds'], 
323          'yds': 'puntret_yds', 
324          'desc': 'Punt return yards, TD, No return', 
325          'long': 'Same as previous (35), except when the play results in a ' 
326                  'touchdown.', 
327      }, 
328      37: { 
329          'cat': 'team', 
330          'fields': ['puntret_oob'], 
331          'yds': '', 
332          'desc': 'Punt out of bounds', 
333          'long': 'Punt went out of bounds, no return on the play.', 
334      }, 
335      38: { 
336          'cat': 'team', 
337          'fields': ['puntret_downed'], 
338          'yds': '', 
339          'also': [], 
340          'value': 1, 
341          'desc': 'Punt downed (no return)', 
342          'long': 'Punt was downed by kicking team, no return on the play. ' 
343                  'The player column this stat will always be NULL.', 
344      }, 
345      39: { 
346          'cat': 'puntret', 
347          'fields': ['puntret_fair'], 
348          'yds': '', 
349          'desc': 'Punt - fair catch', 
350          'long': 'Punt resulted in a fair catch.', 
351      }, 
352      40: { 
353          'cat': 'team', 
354          'fields': ['puntret_touchback'], 
355          'yds': '', 
356          'desc': 'Punt - touchback (no return)', 
357          'long': 'Punt resulted in a touchback. This is the receiving team\'s ' 
358                  'version of code 1504/28 (32) above. Both are needed for stat ' 
359                  'calculations, especially in season cumulative analysis.', 
360      }, 
361      41: { 
362          'cat': 'kicking', 
363          'fields': ['kicking_tot'], 
364          'yds': 'kicking_yds', 
365          'desc': 'Kickoff yards', 
366          'long': 'Kickoff and length of kick.', 
367      }, 
368      42: { 
369          'cat': 'kicking', 
370          'fields': ['kicking_i20'], 
371          'yds': '', 
372          'desc': 'Kickoff inside 20', 
373          'long': 'Kickoff and length of kick, where return ended inside ' 
374                  'opponent\'s 20 yard line. This is not counted as a kick or ' 
375                  'towards kicking yards. This code is used solely to calculate ' 
376                  '"inside 20" stats. used in addition to a 1701 code.', 
377      }, 
378      43: { 
379          'cat': 'kicking', 
380          'fields': ['kicking_tot'], 
381          'yds': 'kicking_yds', 
382          'desc': 'Kickff into endzone', 
383          'long': 'SuperStat records this stat when the kickoff is received ' 
384                  'in the endzone, and then run out of the endzone. If the play ' 
385                  'ends in the endzone for a touchback, the stat is not ' 
386                  'recorded. Compare to "Punt into endzone."', 
387      }, 
388      44: { 
389          'cat': 'kicking', 
390          'fields': ['kicking_tot', 'kicking_touchback'], 
391          'yds': 'kicking_yds', 
392          'desc': 'Kickoff with touchback', 
393          'long': 'Kickoff resulted in a touchback.', 
394      }, 
395      45: { 
396          'cat': 'kickret', 
397          'fields': ['kickret_ret'], 
398          'yds': 'kickret_yds', 
399          'desc': 'Kickoff return yards', 
400          'long': 'Kickoff return and yards.', 
401      }, 
402      46: { 
403          'cat': 'kickret', 
404          'fields': ['kickret_ret', 'kickret_tds'], 
405          'yds': 'kickret_yds', 
406          'desc': 'Kickoff return yards, TD', 
407          'long': 'Same as previous (45), except when the play results in a ' 
408                  'touchdown.', 
409      }, 
410      47: { 
411          'cat': 'kickret', 
412          'fields': [], 
413          'yds': 'kickret_yds', 
414          'desc': 'Kickoff return yards, No return', 
415          'long': 'Kickoff yards with no return. This will occur when the ' 
416                  'player who is credited with the return laterals to a ' 
417                  'teammate. The teammate gets kickoff return yards, but no ' 
418                  'credit for a kickoff return.', 
419      }, 
420      48: { 
421          'cat': 'kickret', 
422          'fields': ['kickret_tds'], 
423          'yds': 'kickret_yds', 
424          'desc': 'Kickoff return yards, TD, No return', 
425          'long': 'Same as previous (47), except when the play results in a ' 
426                  'touchdown.', 
427      }, 
428      49: { 
429          'cat': 'team', 
430          'fields': ['kickret_oob'], 
431          'yds': '', 
432          'desc': 'Kickoff out of bounds', 
433          'long': 'Kicked ball went out of bounds.', 
434      }, 
435      50: { 
436          'cat': 'kickret', 
437          'fields': ['kickret_fair'], 
438          'yds': '', 
439          'desc': 'Kickoff - fair catch', 
440          'long': 'Kick resulted in a fair catch (no return).', 
441      }, 
442      51: { 
443          'cat': 'team', 
444          'fields': ['kickret_touchback'], 
445          'yds': '', 
446          'desc': 'Kickoff - touchback', 
447          'long': 'Kick resulted in a touchback. A touchback implies that ' 
448                  'there is no return.', 
449      }, 
450      52: { 
451          'cat': 'fumbles', 
452          'fields': ['fumbles_tot', 'fumbles_forced'], 
453          'yds': '', 
454          'desc': 'Fumble - forced', 
455          'long': 'Player fumbled the ball, fumble was forced by another ' 
456                  'player.', 
457      }, 
458      53: { 
459          'cat': 'fumbles', 
460          'fields': ['fumbles_tot', 'fumbles_notforced'], 
461          'yds': '', 
462          'desc': 'Fumble - not forced', 
463          'long': 'Player fumbled the ball, fumble was not forced by another ' 
464                  'player.', 
465      }, 
466      54: { 
467          'cat': 'fumbles', 
468          'fields': ['fumbles_tot', 'fumbles_oob'], 
469          'yds': '', 
470          'desc': 'Fumble - out of bounds', 
471          'long': 'Player fumbled the ball, and the ball went out of bounds.', 
472      }, 
473      55: { 
474          'cat': 'fumbles', 
475          'fields': ['fumbles_rec'], 
476          'yds': 'fumbles_rec_yds', 
477          'desc': 'Own recovery yards', 
478          'long': 'Yardage gained/lost by a player after he recovered a fumble ' 
479                  'by his own team.', 
480      }, 
481      56: { 
482          'cat': 'fumbles', 
483          'fields': ['fumbles_rec', 'fumbles_rec_tds'], 
484          'yds': 'fumbles_rec_yds', 
485          'desc': 'Own recovery yards, TD', 
486          'long': 'Same as previous (55), except when the play results in a ' 
487                  'touchdown.', 
488      }, 
489      57: { 
490          'cat': 'fumbles', 
491          'fields': [], 
492          'yds': 'fumble_rec_yds', 
493          'desc': 'Own recovery yards, No recovery', 
494          'long': 'If a player recovered a fumble by his own team, then ' 
495                  'lateraled to a teammate, the yardage gained/lost by teammate ' 
496                  'would be recorded with this stat.', 
497      }, 
498      58: { 
499          'cat': 'fumbles', 
500          'fields': ['fumble_rec_tds'], 
501          'yds': 'fumble_rec_yds', 
502          'desc': 'Own recovery yards, TD, No recovery', 
503          'long': 'Same as previous (57), except when the play results in a ' 
504                  'touchdown.', 
505      }, 
506      59: { 
507          'cat': 'defense', 
508          'fields': ['defense_frec'], 
509          'yds': 'defense_frec_yds', 
510          'desc': 'Opponent recovery yards', 
511          'long': 'Yardage gained/lost by a player after he recovered a fumble ' 
512                  'by the opposing team.', 
513      }, 
514      60: { 
515          'cat': 'defense', 
516          'fields': ['defense_frec', 'defense_frec_tds'], 
517          'yds': 'defense_frec_yds', 
518          'desc': 'Opponent recovery yards, TD', 
519          'long': 'Same as previous (59), except when the play results in a ' 
520                  'touchdown.', 
521      }, 
522      61: { 
523          'cat': 'defense', 
524          'fields': [], 
525          'yds': 'defense_frec_yds', 
526          'desc': 'Opponent recovery yards, No recovery', 
527          'long': 'If a player recovered a fumble by the opposing team, then ' 
528                  'lateraled to a teammate, the yardage gained/lost by the ' 
529                  'teammate would be recorded with this stat.', 
530      }, 
531      62: { 
532          'cat': 'defense', 
533          'fields': ['defense_frec_tds'], 
534          'yds': 'defense_frec_yds', 
535          'desc': 'Opponent recovery yards, TD, No recovery', 
536          'long': 'Same as previous, except when the play results in a ' 
537                  'touchdown.', 
538      }, 
539      # I'm not really sure what to do with these miscellaneous yards. Do they 
540      # belong in the defense category? Or should they be their own separate 
541      # category? 
542   
543      # 63: Miscellaneous yards 
544      # This is sort of a catch-all for yardage that doesn't fall into any other 
545      # category. According to Elias, it does not include loose ball yardage. 
546      # Examples are yardage on missed field goal, blocked punt. This stat is 
547      # not used to "balance the books." 
548   
549      # 64: Miscellaneous yards, TD 
550      # Same as previous (63), except when the play results in a touchdown. 
551      68: { 
552          'cat': 'team', 
553          'fields': ['timeout'], 
554          'yds': '', 
555          'desc': 'Timeout', 
556          'long': 'Team took a time out.', 
557      }, 
558      69: { 
559          'cat': 'kicking', 
560          'fields': ['kicking_fga', 'kicking_fgmissed'], 
561          'yds': 'kicking_fgmissed_yds', 
562          'desc': 'Field goal missed yards', 
563          'long': 'The length of a missed field goal.', 
564      }, 
565      70: { 
566          'cat': 'kicking', 
567          'fields': ['kicking_fga', 'kicking_fgm'], 
568          'yds': 'kicking_fgm_yds', 
569          'desc': 'Field goal yards', 
570          'long': 'The length of a successful field goal.', 
571      }, 
572      71: { 
573          'cat': 'kicking', 
574          'fields': ['kicking_fga', 'kicking_fgb'], 
575          'yds': 'kicking_fgb_yds', 
576          'desc': 'Field goal blocked (offense)', 
577          'long': 'The length of an attempted field goal that was blocked. ' 
578                  'Unlike a punt, a field goal is statistically blocked even ' 
579                  'if the ball does go beyond the line of scrimmage.', 
580      }, 
581      72: { 
582          'cat': 'kicking', 
583          'fields': ['kicking_xpa', 'kicking_xpmade'], 
584          'yds': '', 
585          'desc': 'Extra point - good', 
586          'long': 'Extra point good. SuperStat uses one code for both ' 
587                  'successful and unsuccessful extra points. I think it might ' 
588                  'be better to use 2 codes.', 
589      }, 
590      73: { 
591          'cat': 'kicking', 
592          'fields': ['kicking_xpa', 'kicking_xpmissed'], 
593          'yds': '', 
594          'desc': 'Extra point - failed', 
595          'long': 'Extra point failed.', 
596      }, 
597      74: { 
598          'cat': 'kicking', 
599          'fields': ['kicking_xpa', 'kicking_xpmissed', 'kicking_xpb'], 
600          'yds': '', 
601          'desc': 'Extra point - blocked', 
602          'long': 'Extra point blocked. Exclusive of the extra point failed ' 
603                  'stat.' 
604      }, 
605      75: { 
606          'cat': 'rushing', 
607          'fields': ['rushing_twopta', 'rushing_twoptm'], 
608          'yds': '', 
609          'desc': '2 point rush - good', 
610          'long': 'Extra points by run good (old version has 0/1 in yards ' 
611                  'for failed/good).', 
612      }, 
613      76: { 
614          'cat': 'rushing', 
615          'fields': ['rushing_twopta', 'rushing_twoptmissed'], 
616          'yds': '', 
617          'desc': '2 point rush - failed', 
618          'long': '', 
619      }, 
620      77: { 
621          'cat': 'passing', 
622          'fields': ['passing_twopta', 'passing_twoptm'], 
623          'yds': '', 
624          'desc': '2 point pass - good', 
625          'long': 'Extra points by pass good (old version has 0/1 in yards ' 
626                  'for failed/good).', 
627      }, 
628      78: { 
629          'cat': 'passing', 
630          'fields': ['passing_twopta', 'passing_twoptmissed'], 
631          'yds': '', 
632          'desc': '2 point pass - failed', 
633          'long': 'Extra point by pass failed.', 
634      }, 
635      79: { 
636          'cat': 'defense', 
637          'fields': 'defense_tkl', 
638          'yds': '', 
639          'desc': 'Solo tackle', 
640          'long': 'Tackle with no assists. Note: There are no official ' 
641                  'defensive statistics except for sacks.', 
642      }, 
643      80: { 
644          'cat': 'defense', 
645          'fields': ['defense_tkl', 'defense_tkl_primary'], 
646          'yds': '', 
647          'desc': 'Assisted tackle', 
648          'long': 'Tackle with one or more assists.', 
649      }, 
650      # 81: 1/2 tackle 
651      # Tackle split equally between two players. This stat is not in use at 
652      # this time. 
653      82: { 
654          'cat': 'defense', 
655          'fields': ['defense_ast'], 
656          'yds': '', 
657          'desc': 'Tackle assist', 
658          'long': 'Assist to a tackle.', 
659      }, 
660      83: { 
661          'cat': 'defense', 
662          'fields': ['defense_sk'], 
663          'yds': 'defense_sk_yds', 
664          'value': 1.0, 
665          'desc': 'Sack yards (defense)', 
666          'long': 'Unassisted sack.', 
667      }, 
668      84: { 
669          'cat': 'defense', 
670          'fields': ['defense_sk'], 
671          'yds': 'defense_sk_yds', 
672          'value': 0.5, 
673          'desc': '1/2 sack yards (defense)', 
674          'long': 'Sack split equally between two players.', 
675      }, 
676      85: { 
677          'cat': 'defense', 
678          'fields': ['defense_pass_def'], 
679          'yds': '', 
680          'desc': 'Pass defensed', 
681          'long': 'Incomplete pass was due primarily to the player\'s action.', 
682      }, 
683      86: { 
684          'cat': 'defense', 
685          'fields': 'defense_puntblk', 
686          'yds': '', 
687          'desc': 'Punt blocked (defense)', 
688          'long': 'Player blocked a punt.', 
689      }, 
690      87: { 
691          'cat': 'defense', 
692          'fields': ['defense_xpblk'], 
693          'yds': '', 
694          'desc': 'Extra point blocked (defense)', 
695          'long': 'Player blocked the extra point.', 
696      }, 
697      88: { 
698          'cat': 'defense', 
699          'fields': ['defense_fgblk'], 
700          'yds': '', 
701          'desc': 'Field goal blocked (defense)', 
702          'long': '', 
703      }, 
704      89: { 
705          'cat': 'defense', 
706          'fields': ['defense_safe'], 
707          'yds': '', 
708          'desc': 'Safety (defense)', 
709          'long': 'Tackle that resulted in a safety. This is in addition to ' 
710                  'a tackle.', 
711      }, 
712      # 90: 1/2 safety (defense) 
713      # This stat was used by SuperStat when a 1/2 tackle resulted in a safety. 
714      # This stat is not in use at this time. 
715      91: { 
716          'cat': 'defense', 
717          'fields': ['defense_ffum'], 
718          'yds': '', 
719          'desc': 'Forced fumble (defense)', 
720          'long': 'Player forced a fumble.', 
721      }, 
722      93: { 
723          'cat': 'penalty', 
724          'fields': ['penalty'], 
725          'yds': 'penalty_yds', 
726          'desc': 'Penalty', 
727          'long': '', 
728      }, 
729      95: { 
730          'cat': 'team', 
731          'fields': ['rush_loss'], 
732          'yds': 'rush_loss_yds', 
733          'desc': 'Tackled for a loss', 
734          'long': 'Tackled for a loss (TFL) is an offensive stat. A team is ' 
735                  'charged with a TFL if its rush ends behind the line of ' 
736                  'scrimmage, and at least one defensive player is credited ' 
737                  'with ending the rush with a tackle, or tackle assist. The ' 
738                  'stat will contain yardage.', 
739      }, 
740      # I'm not sure how to classify these... 
741   
742      # 96: Extra point - safety 
743      # If there is a fumble on an extra point attempt, and the loose ball goes 
744      # into the endzone from impetus provided by the defensive team, and 
745      # becomes dead in the endzone, the offense is awarded 1 point. 
746   
747      # 99: 2  point rush - safety 
748      # See "Extra point - safety". 
749   
750      # 100: 2  point pass - safety 
751      # See "Extra point - safety". 
752      102: { 
753          'cat': 'team', 
754          'fields': ['kickoff_downed'], 
755          'yds': '', 
756          'desc': 'Kickoff - kick downed', 
757          'long': 'SuperStat didn\'t have this code. A kickoff is "downed" when ' 
758                  'touched by an offensive player within the 10 yard free zone, ' 
759                  'and the ball is awarded to the receivers at the spot of the ' 
760                  'touch.', 
761      }, 
762      103: { 
763          'cat': 'passing', 
764          'fields': [], 
765          'yds': 'passing_sk_yds', 
766          'desc': 'Sack yards (offense), No sack', 
767          'long': 'This stat will be used when the passer fumbles, then ' 
768                  'recovers, then laterals. The receiver of the lateral gets ' 
769                  'sack yardage but no sack.', 
770      }, 
771      104: { 
772          'cat': 'receiving', 
773          'fields': ['receiving_twopta', 'receiving_twoptm'], 
774          'yds': '', 
775          'desc': '2 point pass reception - good', 
776          'long': '', 
777      }, 
778      105: { 
779          'cat': 'receiving', 
780          'fields': ['receiving_twopta', 'receiving_twoptmissed'], 
781          'yds': '', 
782          'desc': '2 point pass reception - failed', 
783          'long': '', 
784      }, 
785      106: { 
786          'cat': 'fumbles', 
787          'fields': 'fumbles_lost', 
788          'yds': '', 
789          'desc': 'Fumble - lost', 
790          'long': '', 
791      }, 
792      107: { 
793          'cat': 'kicking', 
794          'fields': ['kicking_rec'], 
795          'yds': '', 
796          'desc': 'Own kickoff recovery', 
797          'long': 'Direct recovery of own kickoff, whether or not the kickoff ' 
798                  'is onside', 
799      }, 
800      108: { 
801          'cat': 'kicking', 
802          'fields': ['kicking_rec', 'kicking_rec_tds'], 
803          'yds': '', 
804          'desc': 'Own kickoff recovery, TD', 
805          'long': 'Direct recovery in endzone of own kickoff, whether or not ' 
806                  'the kickoff is onside.', 
807      }, 
808      110: { 
809          'cat': 'defense', 
810          'fields': 'defense_qbhit', 
811          'yds': '', 
812          'desc': 'Quarterback hit', 
813          'long': 'Player knocked the quarterback to the ground, quarterback ' 
814                  'was not the ball carrier. Not available for games before ' 
815                  '2006 season.', 
816      }, 
817      111: { 
818          'cat': 'passing', 
819          'fields': [], 
820          'yds': 'passing_cmp_air_yds', 
821          'desc': 'Pass length, completion', 
822          'long': 'Length of the pass, not including the yards gained by the ' 
823                  'receiver after the catch. Unofficial stat. Not available for ' 
824                  'games before 2006 season.', 
825      }, 
826      112: { 
827          'cat': 'passing', 
828          'fields': [], 
829          'yds': 'passing_incmp_air_yds', 
830          'desc': 'Pass length, No completion', 
831          'long': 'Length of the pass, if it would have been a completion.' 
832                  'Unofficial stat. Not available for games before 2006 season.', 
833      }, 
834      113: { 
835          'cat': 'receiving', 
836          'fields': [], 
837          'yds': 'receiving_yac_yds', 
838          'desc': 'Yardage gained after the catch', 
839          'long': 'Yardage from where the ball was caught until the player\'s ' 
840                  'action was over. Unofficial stat. Not available for games ' 
841                  'before 2006 season.', 
842      }, 
843      115: { 
844          'cat': 'receiving', 
845          'fields': ['receiving_tar'], 
846          'yds': '', 
847          'desc': 'Pass target', 
848          'long': 'Player was the target of a pass attempt. Unofficial stat. ' 
849                  'Not available for games before 2009 season.', 
850      }, 
851      120: { 
852          'cat': 'defense', 
853          'fields': ['defense_tkl_loss'], 
854          'yds': '', 
855          'desc': 'Tackle for a loss', 
856          'long': 'Player tackled the runner behind the line of scrimmage. ' 
857                  'Play must have ended, player must have received a tackle ' 
858                  'stat, has to be an offensive player tackled. Unofficial ' 
859                  'stat. Not available for games before 2008 season.', 
860      }, 
861      # 201, 211, 212 and 213 are for NFL Europe. 
862      301: { 
863          'cat': 'team', 
864          'fields': 'xp_aborted', 
865          'yds': '', 
866          'desc': 'Extra point - aborted', 
867          'long': '', 
868      }, 
869      402: { 
870          'cat': 'defense', 
871          'fields': [], 
872          'yds': 'defense_tkl_loss_yds', 
873          'desc': 'Tackle for a loss yards', 
874          'long': '', 
875      }, 
876  } 
877