reustle / covid19japan-data

https://data.covid19japan.com
MIT License
49 stars 16 forks source link

Says "Zero Active Cases" for my prefecture, but there are plenty of active cases! #90

Open theRealCowhead opened 3 years ago

theRealCowhead commented 3 years ago

The Japan Covid 19 tracker is great. Thank you all so much for all your labor there. However, I live in Mie-ken and it keeps saying we have zero active cases and shows a congratulatory champagne bottle. Yet, it also indicates a number of new cases were reported each day (more than 22 in one day, just a few days ago), which would, of course, contradict there being no active cases. I check the Japanese language site of Mie regularly, and we actually have quite a few active cases, at least 60 in the hospital alone, and 4 are critical. I'm afraid we don't deserve the champagne yet. This "Zero Active" has been going on for a week or more. I wonder why it just recently started happening?

liquidx commented 3 years ago

Thanks for reporting this, I also started noticing this too that some places we have negative counts.

We know a little why this is happening. The prefectures occassionally adjust past numbers because they undercounted, but they are not in the regular reports so we have to dig back through the news articles and documents to find out and readjust. I manually do this once in a while, but haven't done so recently as the 4th wave has some down, but now the numbers are low enough in some prefectures that it's much more obvious.

We'll need to go back through the past reports and adjust the numbers.

theRealCowhead commented 3 years ago

The current days new cases report (the number in green in parenthesis) is completely accurate. So, I think you just need a few lines of code that add those (with an appended date) to the total currentActive and another few lines that subtracts all (with an appended date) from this total after they are over 2 weeks old. I believe that is what is being done at the prefecture level, before they submit their totals for the day. They are simply subtracting all cases over 2 weeks old.

liquidx commented 3 years ago

We do actually count the current days numbers into the count, but our active cases number is actually negative, sometimes by 100+ people, that's why it looks like even though there are new cases, the active cases is 0.

I looked into this a bit more trying to figure out why we're reporting less than 0 active cases for the prefectures.

For confirmed cases, our numbers are roughly aligned to NHK's numbers. However, we use recovery numbers from MHLW. It turns out that these two sources disagree for some prefectures. This disagreement is causing the active cases number to go negative. This happens in Gifu, Mie, Nagano, Saga.

It looks like the reason for the difference is MHLW has a count called "確認中" (to be confirmed), and that number is not counted in the NHK numbers, but it is counted by MHLW. It doesn't completely explain the difference, but it is mostly that difference.

Not sure what we can do here, we trust the NHK numbers are more up to date so our daily count is accurate, but MHLW is probably more official in the long run.

See the cumulative & active numbers to see the discrepency. https://data.covid19japan.com/explore/#