joachim-gassen / tidycovid19

{tidycovid19}: An R Package to Download, Tidy and Visualize Covid-19 Related Data
https://joachim-gassen.github.io/tidycovid19/
Other
146 stars 44 forks source link

Error using download_oxford_npi_data() #25

Closed rivaldophilip closed 4 years ago

rivaldophilip commented 4 years ago

The Oxford COVID-19 Government Response Tracker (OxCGRT) changed its variables and variable names so the function is not working anymore. Hope that there will be an update! Thank you.

joachim-gassen commented 4 years ago

Thank you for the heads up. It seems as if the Oxford team has changed the data structure again so that the code now runs through. Can you verify that it works again for you as well?

rivaldophilip commented 4 years ago

I still having trouble running the function. It just returns:

Start downloading Oxford NPI data

Error: Column LegacyStringencyIndex not found in .data

joachim-gassen commented 4 years ago

Hi there! This indicates that you are running an old version of the package as this field is no longer referenced in the current version of the code. Can you run packageDescription("tidycovid19", field = "GithubSHA1")? It returns the SHA of your install. The current version as of the morning of June 6 is 016fede43ae5e49b592744d8e108830aaf77303d.

If you are running an old version, simply update remotes::install_github("joachim-gassen/tidycovid19") and check whether the download now works for you.

Thanks for letting me know so that I can close the issue if everything is settled.

rivaldophilip commented 4 years ago

Thank you so much! It works now. Reinstalling the package and restarting R did the trick.