
Web Application Development with R Using Shiny Second Edition
By :

Now that we've got the basics, let's build something useful. We're going to build an application that allows you to interactively query data from the Google Analytics API. There is no room within this book to discuss registering for and using the Google Analytics API; however, you will very likely wish to make use of the wonderful RGoogleAnalytics
package if you want to get your own Analytics
data into R. This package is on CRAN and can therefore be installed as usual by running install.packages("RGoogleAnalytics")
.
To keep things simple, we will concentrate on data from a website that I worked on. We'll also use a saved copy of the data that is loaded into the application the first time it runs. A full production of the application could obviously query the API every time it is launched or on a daily or weekly basis, depending on how many users you expect (the API limits the number of daily queries from each application).
Note that we would not query the...