RamiKrispin / coronavirus_dashboard

The Coronavirus Dashboard
https://ramikrispin.github.io/coronavirus_dashboard/
108 stars 133 forks source link

daily_confirmed takes uncleaned data (from coronavirus) so fails on "China" vs. "Mainland China" #5

Closed benstanbury closed 4 years ago

benstanbury commented 4 years ago
daily_confirmed <- coronavirus %>%
  dplyr::filter(type == "confirmed") %>%
  dplyr::mutate(country = dplyr::if_else(Country.Region == "China", 
                                         "China", 
                                         "Rest of the World"))

Otherwise runs fine. Great work btw!

RamiKrispin commented 4 years ago

Thanks @benstanbury,

You are probably using an older version. There was a change in the raw data for the country labels few days ago and it was updated on the dashboard as well - here

Best, Rami

benstanbury commented 4 years ago

That's great - thanks Rami. If I download the data direct from your Github repo then everything works perfectly. The version on the CRAN was a little out of date.

RamiKrispin commented 4 years ago

Yes, you will have to install the dev version to get the most recent version, some changes have been made in the structure of the data.

RamiKrispin commented 4 years ago

I Added function to update the data from the Github version (if available). You will have to install the Github version and run update_datasets() to check for updates