

News Archive
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
Google Analytics API on App Engine Treemap Visualization
October 30, 2009, 1:25 pmIt's Friday, time for some fun! Advanced API analytics fun :)
Here is a captivating way to look at your Google Analytics data in a Treemap visualization. You can visualize your own data with our live demo. (Note: IE currently not supported for visualization part.)

click to enlarge
And, here is a video explaining how to look at the Treemap visualization and how to use it.
The goal of this example was to teach people how to use the Google Analytics API on App Engine in Java, as well as to demonstrate how to use both OAuth and AuthSub along with the App Engine's various services. The code looked great, but the output was a boring HTML table. So we used some open source tools to transform the table into a pretty tree map visualization, which is also useful in noticing interesting metrics.
All the code has been open sourced on Google Project hosting. Also, here's an article describing how this application works making it easy for developers to use this example as a starting point for new data visualizations and other Google Data projects.
For the data retrieval part, we used the App Engine Java SDK and the Google Analytics Data Export API Java Client Library to retrieve data from Google Analytics. The example code implements both unsigned AuthSub and registered OAuth authorization methods allowing developers to get up and running quickly in their dev environment and later switch to a secure authorization method in production environments. The application also uses the Model-View-Controller pattern, making it flexible and allowing developers to extend the code for new applications (e.g. adding support for other Google Data APIs).
And lastly, for the visualization part, we used the open-sourced Protovis SVG Visualization Library to create the Treemap. This JavaScript library is maintained by the Stanford Visualization Group and excels at creating brand new visualizations from a data set (in this case a boring HTML table). To handle all of the interactions, including rollover, tooltips and slider controls, we used JQuery. Here is the JavaScript source for the visualization part of the sample.
Enjoy!
Posted by Nick Mihailovski, Google Analytics API Team
p.s. If you have created any cool new visualizations using the Google Analytics Data Export API,email us so we can highlight them as well.




