rki-covid-api icon indicating copy to clipboard operation
rki-covid-api copied to clipboard

History of incidences should be shifted one day

Open marcusraitner opened this issue 3 years ago • 5 comments

If you look at the Excel of the RKI the newest incidence value is for today calculated from the seven day before (starting with yesterday). However, if I look at your history (e.g. for Munich https://api.corona-zahlen.org/districts/09162/history/incidence/19) this newest incidence-value is assigned yesterday. I would appreciate, if the history could be shifted to be in line with the RKI-Table. I had the similar issue when calculating the incidences myself in my Scriptable project here: https://gist.github.com/marcusraitner/a1b633625d1016498eaaab712461dfc4

By the way, for the frozen values it is like in the RKI Table, i.e. the newest date ist today.

marcusraitner avatar May 12 '21 14:05 marcusraitner

Maybe we should switch from the arcgis API to parsing the Excel table.

marlon360 avatar May 12 '21 15:05 marlon360

Maybe we should switch from the arcgis API to parsing the Excel table.

On the one hand yes, but as I computer scientist even considering this hurts so much ;-)

marcusraitner avatar May 12 '21 15:05 marcusraitner

First of all, this sounds as a never ending story ....... :-)

If you look at the Excel of the RKI the newest incidence value is for today calculated from the seven day before (starting with yesterday).

This Excel Table is the "frozen" Exceltable! so the incidences that are published there are here the frozen-incidence witch is aligned with the excel table

However, if I look at your history (e.g. for Munich https://api.corona-zahlen.org/districts/09162/history/incidence/19) this newest incidence-value is assigned yesterday.

This incidences are the dynamicly incidences where all the late registrations for days in the past are incorporated and the incidences for the day are newly calculated!

And of corse you are right the values are calculatet today with the base values from yesterday, but isf the base values are from yesterday the calculated value is also from yesterday! published today.

And thats the case for all history values (cases, deaths, recovered ..... and so on. So my opinion is to bring the frozen incience value to 1 day less to be on line with al other history values! as i describe in #217

for me you have to read the value/date pairs always as follows: the incidence (or /cases/deaths/recovered etc.) from date is value, witch is published date+1.

If switched to sift 1 day for the incidence values this should be done at al other values too!

Rubber1Duck avatar May 12 '21 17:05 Rubber1Duck

Sorry for bringing this up once more. I think it is well captured in #217 and therefore we could close this one as duplicate. We all agree that the source of the problem is the excel of the RKI and the strange habit of reporting an incidence value for today which logically should be the incidence for yesterday. But anyway, I will work around it, though I would prefer consistency. Maybe it would also be an option to have an additional date value for the frozen, such as "publishDate" which is the date used in the Excel and then date could be consistent with the rest.

marcusraitner avatar May 12 '21 18:05 marcusraitner

such as "publishDate" which is the date used in the Excel and then date could be consistent with the rest.

The lastUpdate Date is this date you requestes for!

Rubber1Duck avatar May 12 '21 22:05 Rubber1Duck