daenuprobst / dashcoch-v2

MIT License
28 stars 12 forks source link

Fix weekly hospitalization calculation #13

Closed imsodin closed 3 years ago

imsodin commented 3 years ago

The call to backwardsResample for hospitalizations is missing a function argument (true), thus not computing the latest two samples only, which in the end results in incorrect data being displayed.

I also took the liberty to change the formatting to be consistent between these three calls, which should make it easier to spot such mistakes (not quite from the rest of the code what the "globally preferred" formatting is).

imsodin commented 3 years ago

@daenuprobst At the risk of being annoying: This is a tiny fix for a bug that displays incorrect weekly hospitalisation numbers on your great covid-info site, that's consulted by many. Please consider merging this or fixing it by any other means.