Skip to main content

Posts

Showing posts from March, 2017

Things I am learning from Google's foo.bar challenge

Unexpectedly one day while Googling Python commands, my browser transformed and presented me with a message: "You're speaking our language.  Want a challenge?" This is Google's foo.bar challenge which has lead, for some, to employment at Google.  Of course, I'm a novice Python programmer with no computer science background, so I felt entirely undeserving of an invitation.  I was actually quite reluctant to even try, assuming that the problems would be far too complex for me to handle in a language that I didn't know very well. Anyway, I figured, what the hell?  I jumped in a little over a week ago, and am currently on level 4, but I've already learned a few things that I think are important to share for anyone who may be faced with the challenge down the road. 1) The problems themselves are not conceptually difficult.  While some of them can be classified and solved by implementing classic algorithms (which weren't apparent to me until afte...

Google Trends on chronic pain treatments

I recently became interested in Google Trends because I'm accustomed to analyzing time series, albeit in brain activity data.  Nonetheless, my introduction to this tool occurred shortly after the presidential election, as I was interested in simply seeing search interest in certain fears.  Here's an example of a few notable spikes in activity I found: Unable to find manually many other terms which showed such unambiguous changes on election night (spikes in sexism and homophobia searches are much more evident when plotted alone), I wondered, "Is it possible to extract Google Trend data for 1000s of terms?"  The answer is yes and no (kind of). Of course, Python has an API just for this purpose, PyTrends, so it is possible.  However, after I had decided on the thousands of terms I wanted to search, I ran into "rate limit errors" with Google Trends, which basically caps the number of searches you can do per hour.  This limit apparently varies, but at the...