outbreak-info / biothings_covid19

Biothings plugin for JHU CSSE COVID-19 cases
6 stars 5 forks source link

Fix numIncrease, pctIncrease, rolling calculations where dates are missing #14

Open flaneuse opened 4 years ago

flaneuse commented 4 years ago

image

See outbreak.info/epidemiology?location=ESP&log=false&variable=confirmed_numIncrease&xVariable=date&fixedY=false

  1. For Spain, the two bad values are 4/28 and 5/2 and by my count should be 957.29 and 449.57, instead of -904 and -1828. data for the 4/28 value: 4/25: 3995 4/26: NA 4/27: NA 4/28: 2706 4/29: NA 4/30: NA 5/1: NA

  2. pctIncreases are wrong if a day is skipped. should be infinite % increase, not relative to the previous non-zero day

  3. Consider adding in explicit confirmed=0, dead=0 when values are NA.

flaneuse commented 4 years ago

temp fix from @gkarthik : exlcuded negative numIncrease values from rolling calculations