nhlscrapi icon indicating copy to clipboard operation
nhlscrapi copied to clipboard

Include Misses and Blocks as cumstats

Open FranGoitia opened this issue 8 years ago • 1 comments

Is there any way to include misses and blocks as totals asked in cum_stats ? I would like to be able to calculate the Fenwick % of a team at a particular point in a season, so I would need to have stats at raw level. Regards, Francisco

FranGoitia avatar Aug 08 '16 00:08 FranGoitia

Hey Franciso,

The easiest way to do this is to use the Fenwick cumulative stats object which tracks the totals for each game accessible via the total attribute. When you persist this game by game data, you can then add it up across whatever game selection/time period you had in mind. This is referenced in the README example.

In general, if you wanted a custom counter for each you would create your own accumulator object that can then be passed into the cum_stats parameter of Game. This can be accomplished by inheriting from TeamIncrementor. See how the existing counters are implemented here.

robhowley avatar Aug 29 '16 16:08 robhowley