nhlscrapi
nhlscrapi copied to clipboard
Include Misses and Blocks as cumstats
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
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.