M3IT / COVID-19_Data

COVID-19 Data for Australia
Other
40 stars 80 forks source link

Number of hospitalized patients is a floating point number #9

Closed eguidotti closed 2 years ago

eguidotti commented 2 years ago

Hi Matt, hope you are doing well!

@MinerMax555 noticed that for some dates (example: 2021-01-01) the number of hospitalized people in Australia is a floating point number (20.44 on 2021-01-01).

Do you know what this floating point number means? Is it a data mistake or am I allowed to ruond it to the nearest integer?

Please see also the corresponding issue on the data hub repo:

Many thanks!

M3IT commented 2 years ago

Thanks for bringing this to my attention Emanuele.

I've looked into it and the reasons are:

For hospitalisations, in some states the numbers provided are:

So the precise number of hospitalisations isn't known, but is calculated from these 2 numbers.

For vaccines, second doses are provided by some states as % of population, so again the number is calculated.

I've fixed this by rounding all counts to the nearest integer and then coercing to integer so they stay that way downstream (and added a check). This fix is in tonight's update.

eguidotti commented 2 years ago

Hi Matt, that's awesome! I confirm it is working fine now. Thanks a lot for taking care