Closed aedobbyn closed 4 years ago
Ah sorry, I see you're already aware of that bug. I guess my trycatch suggestion still stands, though, so the main download_merged_data
can still at least partially work!
Thank you for bringing up this idea!
I agree, in general it would be good to gracefully fail on failed downloads, maybe even falling back to downloading the last cached version for the specific source.
In case of the Google trends data, it might be useful to wrap the actual gtrends
call in download_google_trends
as this is called by country and normally fails only for some but not for all countries.
If you feel like working on this, that would be great! purrr
is currently not in the dependencies lit but, hey, {tidycovid19} is super dependency heavy anyway so yet another dependency would not hurt to much I guess.
Another thing: If you are just interested in getting download_merged_data(cached = FALSE)
to work again you can also try your luck with my forked version of the {gtrendsr} package (PMassicotte/gtrendsR#353). It seems to fix the issue in {gtrendsr} and works reasonably well for me.
Cheers,
Joachim
Ah, your fork is a good solution, and also download_merged_data(cached = TRUE)
is great. Thanks for the quick response!
Hi! Thanks for the great package.
Looks to me like there's a bug in the
gtrendsR
package (ingtrendsR:::related_topics
) that's affectingdownload_google_trends_data
.Might be worth wrapping all the functions that make up
download_merged_data
in a trycatch (maybe apurrr::possibly
withotherwise
set totibble()
) so thatdownload_merged_data
can download all sources that are currently working. Happy to do that and submit a PR if you like.Let me know if you want any more info on the bug.
Created on 2020-06-14 by the reprex package (v0.3.0)