mponce0 / covid19.analytics

R package to obtain and analyze live data from the nCOVID19 coronavirus
https://mponce0.github.io/covid19.analytics/
GNU General Public License v2.0
34 stars 11 forks source link

The acumulate deads for some contries are wrong #3

Open carloserwin opened 4 years ago

carloserwin commented 4 years ago

Do this, for example

data <- covid19.data("ts-deaths")

x <- data[data$Country.Region == "Germany", ] y <- as.numeric(x[-(1:4)]) plot(y, type = "l")

Do you see the problem?

If not, try looking at this particular "aggregate number of deads" in these dates:

2020-04-10 2020-04-11 2767 > (cant be) 2736

This also happends for India, and I do not know if for other countries.

Regards, CE

obviously this is not correct.

mponce0 commented 4 years ago

Thanks for reporting this. I took a look at the data and the issue is in the actual data source from JHU, see

https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv

You can see the issue with the case of Germany as you noticed. I couldn't find any problems with the numbers reported for India though.

There is no much I can do other than letting the people at JHU know about this as that is the source of the data in this case.

carloserwin commented 4 years ago

Thanks!!!

For India, you can look at the mistake easily

x <- data[data$Country.Region == "India", -(1:4)] diff(as.numeric(x))

if there is a negative there must be something wrong.

Cheers! CE

mponce0 commented 4 years ago

Yes, I can see that, thanks again.

I have opened an issue with JHU/CCSEGIS, see https://github.com/CSSEGISandData/COVID-19/issues/2165

This is the list of location I found with this anomalies,

44 Prince Edward Island Canada 45 Quebec Canada 91 Cyprus 107 Finland 121 Germany 131 Iceland 132 India 142 Kazakhstan 183 Philippines 195 Serbia 198 Slovakia

In the meanwhile I will implement some checks to warn the user about this.

carloserwin commented 4 years ago

Great, thanks!

And thanks for doing that R library!!

Cheers, CE

On Mon 13 Apr 2020 at 18:29 mponce0 notifications@github.com wrote:

Yes, I can see that, thanks again.

I have opened an issue with JHU/CCSEGIS, see CSSEGISandData/COVID-19#2165 https://github.com/CSSEGISandData/COVID-19/issues/2165

This is the list of location I found with this anomalies,

44 Prince Edward Island Canada 45 Quebec Canada 91 Cyprus 107 Finland 121 Germany 131 Iceland 132 India 142 Kazakhstan 183 Philippines 195 Serbia 198 Slovakia

In the meanwhile I will implement some checks to warn the user about this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mponce0/covid19.analytics/issues/3#issuecomment-613146174, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDKNWP4RDARBB3QM7DVFF3RMON5BANCNFSM4MHIZO4Q .

mponce0 commented 4 years ago

Three new functions have been added to the package to test for data integrity and consistency:

These functions are already part of the development version of the package available in the GitHub repository and will be included in the next version of the package submitted to CRAN.

mponce0 commented 4 years ago

These functions are also part of version v1.1 available to be installed from CRAN.