-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any keyword with "&" character triggers "widget$status_code == 200" error #267
Comments
Similar issue here, trying to get a basic query:
Session info:
|
Hard to tell, the last one works for me. plot(gtrendsR::gtrends(keyword = c('toyota', 'yaris', 'corolla'), time = '2017-04-30 2018-04-29', geo = 'PE')) Created on 2018-05-02 by the reprex package (v0.2.0). |
The |
@PMassicotte weird, it fixed itself. Maybe a Google problem? |
I have a similar problem when trying to download searches for "S&P 500" and still cannot find a solution to it.
@tokumotion as I see the problem resolved itself for the second search (c('toyota', 'yaris', 'corolla')).. but what about the first search with the special character ("Bath & body works")? @eddelbuettel unfortunately, in my case I cannot exchanges & to 'and', because I need to understand how often people searched exactly for "S&P" (i.e. GoogleTrends will give different search results depending on whether you type "S&P", or "SandP", or "S and P", etc.) |
What about: gtrends(keyword="S+P500", geo = "US", time="2004-01-01 2017-12-31") |
No, it doesn't work either: it doesn't give the same results as manually searching "S&P500" in GoogleTrends (not even in the same ballpark: retrieved scores are very different). I know that GoogleTrends returns the scores from the random subset of the actual historical search data, but if the search terms are identical then they should be in the same ballpark every time I search them in GoogleTrends. E.g. if I search "SP 500" manually in GoogleTrends I get the identical or almost identical results as if I do it in R with the following command: |
Can now search with keywords containing '&' (closes #267)
Trends <- gtrends("Bath & body works",geo =US )
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xlsx_0.5.7 xlsxjars_0.6.1 rJava_0.9-8 dplyr_0.7.4 gtrendsR_1.4.2 Rmazon_0.2 devtools_1.13.5
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 compiler_3.4.1 pillar_1.1.0 git2r_0.19.0 plyr_1.8.4
[6] bindr_0.1 tools_3.4.1 digest_0.6.12 anytime_0.3.0 jsonlite_1.5
[11] memoise_1.1.0 tibble_1.4.2 gtable_0.2.0 pkgconfig_2.0.1 rlang_0.2.0
[16] curl_3.1 yaml_2.1.14 parallel_3.4.1 bindrcpp_0.2 withr_2.1.0
[21] httr_1.3.1 stringr_1.3.0 xml2_1.2.0 grid_3.4.1 glue_1.2.0
[26] R6_2.2.2 pbapply_1.3-4 XML_3.98-1.9 ggplot2_2.2.1 selectr_0.3-1
[31] magrittr_1.5 scales_0.5.0 assertthat_0.2.0 rvest_0.3.2 RApiDatetime_0.0.3
[36] colorspace_1.3-2 labeling_0.3 stringi_1.1.6 lazyeval_0.2.0 munsell_0.4.3
The text was updated successfully, but these errors were encountered: