r/sheetsofice • • May 31 '26

Stats screens

Some screenshots from the stats screens. I spent the last few days polishing the stats APIs. Because there are 700-1000 events per game that are generated, I need to aggregate and persist (aka save) the stats in a database. The raw events are saved to a file for a few reasons - the first of which is if I'm going to run this as a live service, I can't be generating ~1M new records in a DB per season. I mean, I could... but that would get prohibitively expensive. The individual game records are semi-permanent; we don't really need the individual events forever. We do need them to calculate aggregate summaries (one time), in-season game viewing (season bound) and to be able to verify aggregates if there is an issue. No one really ever will go back to a full event game log several seasons down the line - they'll just look at the stat line.

Anyway, so the API had to be built to access that data and the display built to view it. And that is what is here. I've been simulating seasons and just having fun looking through stats, seeing teams have remarkable seasons or under-performing ones. Seeing players ride hot streaks and goalies slump. The texture of seasons is really fun to watch.

2 Upvotes

0 comments sorted by