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

Could not download the data #26

Closed AlemuTA closed 4 years ago

AlemuTA commented 4 years ago

Hi,

I was trying to access the data using the code below but it returns error message instead.

merged <- download_merged_data(silent = TRUE, cached = FALSE)

Error in `[<-.data.frame`(`*tmp*`, , timevar, value = "subject") : 
  replacement has 1 row, data has 0

Can you help me fixing the issue? Thanks in advance. Alemu

joachim-gassen commented 4 years ago

HI there and thanks for raising the issue. It helped me to fix a silly bug that only manifests itself when you use the parameter silent = TRUE in download_merged_data(). As I am not sure that this was the underlying cause of this issue: Can you please update the package and check whether the error disappears for you? Thanks!

AlemuTA commented 4 years ago

Hi, still it does not work. However, I'm also using the download_jhu_csse_covid19_data() function, which gives almost the same information I needed from download_merged_data() functions. Thanks for the good work.

joachim-gassen commented 4 years ago

Hi there. Turns out this is an issue in the {gtrendsR} package. I opened a PR on the repo that should fix the problem (https://github.com/PMassicotte/gtrendsR/pull/353) but we will have to wait and see what the maintainer thinks about it. If you need to pull merged data directly (not from the cache) you could install my fork of the {gtrendsR} package that contains the fix.

remotes::install_github("joachim-gassen/gtrendsR")

Use it at you own risk though as I cannot sure whether my 'fix' in the {gtrendsR} package accidentally screws up something else.

I am closing this issue as it seems to have the same underlying reason as #27. Feel free to reopen if you think that your problem is unrelated.