epiforecasts / NCoVUtils

Utility functions for the 2019-NCoV outbreak
https://epiforecasts.io/NCoVUtils/
Other
27 stars 13 forks source link

Error when extracting Spanish regional data #86

Closed Paul-Mee closed 4 years ago

Paul-Mee commented 4 years ago

On running get_spain_regional_cases() I get the following error - looks like a source data formatting issue

spain_cases <- NCoVUtils::get_spain_regional_cases() Warning: 3 parsing failures. row col expected actual file 1027 -- 7 columns 1 columns 'https://covid19.isciii.es/resources/serie_historica_acumulados.csv' 1028 -- 7 columns 1 columns 'https://covid19.isciii.es/resources/serie_historica_acumulados.csv' 1029 -- 7 columns 1 columns 'https://covid19.isciii.es/resources/serie_historica_acumulados.csv'

Error: Assigned data 0 must be compatible with existing data. i Error occurred for column name. x No common type for value and x .

kathsherratt commented 4 years ago

Thanks very much for flagging this Paul, I'm looking into it!

kathsherratt commented 4 years ago

Hi Paul, can you let me know what, if any, dataset is returned, and/or any more info on this?

When I run this from scratch, I am only seeing the first warning message on parsing failures. (These are annoying but expected - it's a few lines of metadata at the bottom of the csv file, which get removed in cleaning and shouldn't affect the output.)

Then for me the data are returned as expected - I don't get the last 3 lines of error messages in your post.

I've also checked the source data and I can't see any changes that would cause a failure, so not quite sure where it's going wrong.

Tagging @hamishgibbs in case he might have more insight!

seabbs commented 4 years ago

Think this has been resolved - closing for now