Skip to content

R at Google

December 10, 2010

Last night, Ni Wang and Max Lin from Google gave a talk to the New York R User Group discussing how R is used inside Google. About 150 R developers attended the meeting. Ni and Max said that R is used very widely at Google and is an integral part of the analytics work they do.

One interesting application is the Google Flu Trends project, which uses R to estimate current flu activity based on Google search results. Google Trends aggregates user search queries showing how often a particular word or phrase has been searched. Correlation tests are run on the search results to obtain a manageable data set of potentially relevant variables. Then using R, they massage the data and create models with optimized weights for each search term. From this, they are able to reasonably estimate current flu activity for different regions around the world.

When Google uses R in a production environment, they often work with very large data sets. For this, Google integrates R with several internal technologies including gfs, BigTable and ProtoBuf (using the RProtoBuf package). They said their internal system for analyzing large data sets worked in a manner very analogous to the R snow package.

Google also announced an R client for the Google Prediction API (a service which accesses Google’s machine learning algorithms to analyze historic data and predict future outcomes). The R client is available here: 

Final note, Google has published an R Style Guide which may be of interest for those seeking a set of standards for R coding:

3 Comments leave one →
  1. December 11, 2010 3:31 am

    Great post, very interesting – thank you for sharing!

    If we are on the topic of google and R:

    Just recently there was a great post by Jeffrey Horner about how google uses his brew package for R integration with latex.

    There is also the google talk given by Dirk and Romain on Rcpp:,-…-presentation-on-youtube

    It is so enjoyable to see what is done with R in such amazing companies.

    Lastly, is there any chance that this talk was recorded and will later be uploaded online? (here or on the RUG blog website:


    • December 20, 2010 11:03 am

      Thanks Tal for the insight and relevant links.

      Also I don’t believe it was recorded, but can ask about the slides. I will update you if I find out anything.

      All the best,



  1. R at Google | Matteo Redaelli

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: