Skip to content
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

will gtrendsR support topic in google trends? #321

Closed
sahmoli opened this issue Nov 27, 2019 · 7 comments
Closed

will gtrendsR support topic in google trends? #321

sahmoli opened this issue Nov 27, 2019 · 7 comments

Comments

@sahmoli
Copy link

sahmoli commented Nov 27, 2019

Thank you for your fantastic package!
I wonder whether gtrendsR will support topic in google trends. The topic aggregate a group of terms that share the same concept in any language. That is super useful for global research across multiple languages.

@PMassicotte
Copy link
Owner

Do you have an example from the web site we can use?

@JBleher
Copy link
Contributor

JBleher commented Nov 27, 2019

I think this is already supported. The currently featured example on Google Trends is about Kim Kardeshian and Taylor Swift, which results in a request to the URL:

https://trends.google.com/trends/explore?q=%2Fm%2F0dl567,%2Fm%2F0261x8t&date=now 7-d&geo=US

From that you can get the search terms "/m/0dl567" for Kim Kardeshian and "/m/0261x8t" for Taylor Swift. If you use these strings, in gtrends you should get the topics. So you would need to find the topic identifier used by Google (here: "/m/0dl567" and "/m/0261x8t") and you can then use gtrends to download the search volume index...

@PMassicotte
Copy link
Owner

@sahmoli Is it working as wanted?

@sahmoli
Copy link
Author

sahmoli commented Dec 8, 2019

I got it. That works.
But do you know how to detect whether many terms have been collected as topics in batch?

@PMassicotte PMassicotte pinned this issue Dec 8, 2019
@JBleher
Copy link
Contributor

JBleher commented Dec 9, 2019

I don't understand the question. I think, unless you specify the topic identifier, with gtrendsR you are never using topics. Does that answer the question?

@sahmoli
Copy link
Author

sahmoli commented Dec 13, 2019

I got it. I need to get the topic identifier first. Thank you so much.

@andrasberczi
Copy link

It seems like we cannot retreive data when using both mid (eg.: "/m/0dl567") and a search term.

This works:

gtrendsR::gtrends("/m/0dl567")

This also works:

gtrendsR::gtrends("kitchenaid")

But this does not:

gtrendsR::gtrends(c("/m/0dl567", "kitchenaid"))

It gives back:

Error in interest_over_time(widget, comparison_item, tz) : 
  Status code was not 200. Returned status code:401

Can you help with this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants