How to use it
Clone the repository within the following command:
$ git clone git@github.com:mac-r/trendo.git
Open the editor and specify your request:
################################################### # EDIT YOUR REQUEST HERE # ################################################### # for phrases wirte like that: word = "my+phrase" word = "New+Year" month = 1 year = 2013Run the script in the terminal:
$ ruby trendo.rb
Use the result.csv
according to your needs.Possible problems
If you make too many requests - then you'll get banned by Googlers. So be careful.
Requirements
It works well with Ruby 1.9.3
works great! however, is it possible to get weekly data instead of monthly data? I tried to play a little bit with the url but can't find a way that works.. thank you for your input!
ReplyDeleteHey, JD! I know how to look at values by each month. You simply need to remove date parameter to achieve this. It's a good question about weekly data. Please, let me know if you figure out how to do this!
DeleteFollow me on Github, pretty soon I will roll out several new machine learning packages. Stay tuned.
I still have one problem: after like 3-4 times succesfullt retrieving data, I get the following error:
ReplyDeletetrendo.rb:25:in `': undefined method `split' for nil:NilClass (NoMethodError)
Any thoughts?
You get banned by Google. That's ok. Google Trends have no developers API.
Delete