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

Issue with Google trends... only from Israel #24

Closed yohananouaknine closed 4 years ago

yohananouaknine commented 4 years ago

Hello Joachim,

Thank u for this great job and for adding Google Trends data. I have two questions:

  1. Why there are no results for Israel (and some other countries) while from this link I can get the results? https://trends.google.fr/trends/explore?cat=16&date=2019-12-31%202020-05-30&geo=IL&q=CORONAVIRUS

  2. Is it possible to modify the search string this way? search_term = c('coronavirus', 'COVID', 'קורונה', 'קוביד')

Thank you !!! Yan Ouaknine

joachim-gassen commented 4 years ago

Hi there! I have pushed today an extension to download_google_trends()data that allows to download search data for a wide array of countries (including Israel) if you include low_search_volume = TRUE in the function call. Note that this will take roughly 30 minutes to complete because of the generous waits that I included to keep Google happy.

Alternatively, you can download data just for selected countries by setting the countries parameter, e.g. countries = "ISR".

Don't forget to update the package if you want to test the new functionality.

About additional search strings: This is not implemented. You could try to use gtrendsR::gtrends() directly for that purpose.

A final thing: If you want to download Google Trends for the large sample, you will be most likely affected by a current bug in the {gtrendsR} package that causes gtrends() to fail occasionally. I submitted a PR that might fix the bug to the maintainer but until he gets around to take a look at it, you can install my forked version of the package containing the fix. So, to download a large sample of Google Trends data you currently need 30 minutes time to run:

remotes::install_github("joachim-gassen/gtrendsR")
remotes::install_github("joachim-gassen/tidycovid19")
library(tidycovid19)
gtlist < download_google_trends_data(type = c('country', 'country_day', 'region', 'city'), low_search_volume = TRUE)
yohananouaknine commented 4 years ago

Thank You!!! Yohanan Ouaknine

yohananouaknine commented 4 years ago

thank you so much !!! Yohanan (Yan) Ouaknine

On Sun, 7 Jun 2020 at 18:49, Joachim Gassen notifications@github.com wrote:

Hi there! I have pushed today an extension to download_google_trends()data that allows to download search data for a wide array of countries (including Israel) if you include low_search_volume = TRUE in the function call. Note that this will take roughly 30 minutes to complete because of the generous waits that I included to keep Google happy.

Alternatively, you can download data just for selected countries by setting the countries parameter, e.g. countries = "ISR".

Don't forget to update the package if you want to test the new functionality.

About additional search strings: This is not implemented. You could try to use gtrendsR::gtrends() directly for that purpose.

A final thing: If you want to download Google Trends for the large sample, you will be most likely affected by a current bug in the {gtrendsR} package that causes gtrends() to fail occasionally. I submitted a PR that might fix the bug to the maintainer but until he gets around to take a look at it, you can install my forked version of the package containing the fix. So, to download a large sample of Google Trends data you currently need 30 minutes time to run:

remotes::install_github("joachim-gassen/gtrendsR") remotes::install_github("joachim-gassen/tidycovid19") library(tidycovid19) gtlist < download_google_trends_data(type = c('country', 'country_day', 'region', 'city'), low_search_volume = TRUE) ``

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joachim-gassen/tidycovid19/issues/24#issuecomment-640238698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5BO5NR33RHDEURIROA3PDRVOZHDANCNFSM4NO2HNFQ .