I have done some research on how to build this application but I would like to hear from you guys how would you approach such a problem? What tools would you use?
I started by first creating a spreadsheet and adding the Google Analytics API to it with the proper permissions, created a script that runs and stores data in one of the sheets.
Now I know about the charts you can create by highlighting all the results and choosing the view, for this case I want to use a table view, but I also want the ability to filter the results by a date range, this view will also be added to a Google sites page. So the only way I can think to be able to actually add the chart into a Google site is to publish the script and give it a gui so i can run the functions to get the data from the API outside the spreadsheet, and I wanted to use the the Google visualization Library in create the custom chart.
Everything was slowly coming together but now I have run into a problem where the visualization library does not work with the HtmlService for rending the published script page.
I also read the that UIService might end up being deprecated which is why i decided to try building this view with the HtmlService.
I have created 2 other questions which do mention 2 of the above problems but they do not ask this question "What is the best way to create a visualization thats powered by google analytics data?"
I hope that I gave enough information for others to understand what I am trying to do.
Because visualisation of data is matter of personal preference I would advise you to decide on the presentation tool first, whether Google Viz, R or whatever. If you wish to gather your data in Google Apps Spreadsheets then use the content service to provide the interface to your presentation layer. For example ... Host a web page (on Google Drive Hosting if you wish) that has the G- Viz and gets its data at load time from a Google Apps Script with Content Service serving JSONP