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

download_merged_data(cached = F) failure #32

Closed PhilipPSimmons closed 3 years ago

PhilipPSimmons commented 3 years ago

I receive the following error when trying to download non-cached data:

Error: Column_isonot found in.data Runrlang::last_error()to see where the error occurred. In addition: Warning messages: 1: Problem withmutate()inputiso3c`. ℹ Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

ℹ Input iso3c is countrycode::countrycode(...). 2: In countrycode::countrycode(.data$Country/Region, origin = "country.name", : Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

3: Problem with mutate() input iso3c. ℹ Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

ℹ Input iso3c is countrycode::countrycode(...). 4: In countrycode::countrycode(.data$Country/Region, origin = "country.name", : Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

5: Problem with mutate() input iso3c. ℹ Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

ℹ Input iso3c is countrycode::countrycode(...). 6: In countrycode::countrycode(.data$Country/Region, origin = "country.name", : Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam

7: In countrycode::countrycode(.data$country, origin = "country.name", : Some values were not matched unambiguously: Diamond Princess, Kosovo, MS Zaandam`

joachim-gassen commented 3 years ago

Hi there. It is hard for me to decipher the error message because of the formatting. Can you please quote it as code next time? I fixed something that might have caused your issue. Can you please update devtools::install_github("joachim-gassen/tidycovid19") and check whether download_merged_data(cached = F) works for you now?

If not, could you please send me the output of devtools::session_info()? Thanks!

PhilipPSimmons commented 3 years ago

Hi, sorry about that. I updated and ran download_merged_data(cached = F) but received the error:

Error in as.Date.numeric(x) : 'origin' must be supplied

Here is the readout from session_info():

`─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── setting value
version R version 4.0.0 (2020-04-24) os CentOS Linux 7 (Core)
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/Los_Angeles
date 2020-11-03

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── package version date lib source
assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0)
backports 1.1.10 2020-09-15 [1] CRAN (R 4.0.0)
bit 1.1-15.2 2020-02-10 [2] CRAN (R 4.0.0)
bit64 0.9-7 2017-05-08 [2] CRAN (R 4.0.0)
blob 1.2.1 2020-01-20 [2] CRAN (R 4.0.0)
callr 3.4.4 2020-09-07 [1] CRAN (R 4.0.0)
cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.0)
cli 2.0.2 2020-02-28 [2] CRAN (R 4.0.0)
colorspace 1.4-1 2019-03-18 [2] CRAN (R 4.0.0)
countrycode 1.2.0 2020-05-22 [2] CRAN (R 4.0.0)
crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0)
curl 4.3 2019-12-02 [2] CRAN (R 4.0.0)
DBI 1.1.0 2019-12-15 [2] CRAN (R 4.0.0)
desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0)
devtools 2.3.0 2020-04-10 [1] CRAN (R 4.0.0)
digest 0.6.26 2020-10-17 [1] CRAN (R 4.0.0)
dplyr
1.0.2 2020-08-18 [1] CRAN (R 4.0.0)
ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0)
fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0)
fastmap 1.0.1 2019-10-08 [2] CRAN (R 4.0.0)
fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.0)
generics 0.0.2 2018-11-29 [2] CRAN (R 4.0.0)
gghighlight 0.3.0 2020-03-29 [1] CRAN (R 4.0.0)
ggplot2 3.3.2 2020-06-19 [1] CRAN (R 4.0.0)
ggrepel 0.8.2 2020-03-08 [1] CRAN (R 4.0.0)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.0)
gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.0)
hms 0.5.3 2020-01-08 [2] CRAN (R 4.0.0)
htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.0)
htmlwidgets 1.5.1 2019-10-08 [2] CRAN (R 4.0.0)
httpuv 1.5.4 2020-06-06 [1] CRAN (R 4.0.0)
httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.0)
jsonlite 1.7.1 2020-09-07 [1] CRAN (R 4.0.0)
knitr 1.29 2020-06-23 [1] CRAN (R 4.0.0)
later 1.1.0.1 2020-06-05 [1] CRAN (R 4.0.0)
lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.0)
lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.0)
lubridate 1.7.9 2020-06-08 [1] CRAN (R 4.0.0)
magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.0)
memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0)
mime 0.9 2020-02-04 [2] CRAN (R 4.0.0)
munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.0)
odbc 1.2.2 2020-01-10 [2] CRAN (R 4.0.0)
pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.0)
pins 0.4.3 2020-07-10 [1] CRAN (R 4.0.0)
pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.0)
pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0)
pkgload 1.1.0 2020-05-29 [2] CRAN (R 4.0.0)
prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.0)
processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.0)
promises 1.1.1 2020-06-09 [1] CRAN (R 4.0.0)
ps 1.3.4 2020-08-11 [1] CRAN (R 4.0.0)
purrr 0.3.4 2020-04-17 [2] CRAN (R 4.0.0)
R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.0)
rappdirs 0.3.1 2016-03-28 [1] CRAN (R 4.0.0)
rclipboard 0.1.2 2019-07-02 [1] CRAN (R 4.0.0)
Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.0)
readr 1.3.1 2018-12-21 [2] CRAN (R 4.0.0)
readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.0)
remotes 2.1.1 2020-02-15 [1] CRAN (R 4.0.0)
rlang 0.4.8 2020-10-08 [1] CRAN (R 4.0.0)
rprojroot 1.3-2 2018-01-03 [2] CRAN (R 4.0.0)
rsconnect
0.8.16 2019-12-13 [1] CRAN (R 4.0.0)
rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.0)
rvest 0.3.6 2020-07-25 [1] CRAN (R 4.0.0)
scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.0)
selectr 0.4-2 2019-11-20 [1] CRAN (R 4.0.0)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
shiny 1.5.0 2020-06-23 [1] CRAN (R 4.0.0)
shinyjs 2.0.0 2020-09-09 [1] CRAN (R 4.0.0)
shinyWidgets 0.5.3 2020-06-01 [2] CRAN (R 4.0.0)
sparkline 2.0 2016-11-12 [1] CRAN (R 4.0.0)
stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.0)
stringr 1.4.0 2019-02-10 [2] CRAN (R 4.0.0)
testthat 2.3.2 2020-03-02 [2] CRAN (R 4.0.0)
tibble 3.0.3 2020-07-10 [1] CRAN (R 4.0.0)
tidycovid19
0.0.0.9000 2020-11-03 [1] Github (joachim-gassen/tidycovid19@4a124fc) tidyr 1.1.2 2020-08-27 [1] CRAN (R 4.0.0)
tidyselect 1.1.0 2020-05-11 [2] CRAN (R 4.0.0)
usethis 1.6.1 2020-04-29 [1] CRAN (R 4.0.0)
vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.0)
withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.0)
xfun 0.15 2020-06-21 [1] CRAN (R 4.0.0)
xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.0)
xtable 1.8-4 2019-04-21 [2] CRAN (R 4.0.0)
yaml 2.2.1 2020-02-01 [2] CRAN (R 4.0.0)
zoo
1.8-8 2020-05-02 [1] CRAN (R 4.0.0)
`

joachim-gassen commented 3 years ago

Thank you! My guess is that the error is related to some temporary data inconsistencies in the ACAPS data. Can you please update your package installation and see whether it works now? You can first try to download only the ACAPS data df <- download_acaps_npi_data() to save time if it fails.

Thanks for letting me know whether it works (I need you help because I cannot reproduce the error message locally).

rmartischang commented 3 years ago

Hi,

Just for information - I had the same problem, I updated the package. Now it works :-)

Thanks again for this great work on the database !

Romain

joachim-gassen commented 3 years ago

Thank you for letting me know and apologies for my delayed response. Closing this issue now.