Book Image

Web Application Development with R Using Shiny Second Edition - Second Edition

By : Chris Beeley
Book Image

Web Application Development with R Using Shiny Second Edition - Second Edition

By: Chris Beeley

Overview of this book

R is a highly flexible and powerful tool for analyzing and visualizing data. Most of the applications built using various libraries with R are desktop-based. But what if you want to go on the web? Here comes Shiny to your rescue! Shiny allows you to create interactive web applications using the excellent analytical and graphical capabilities of R. This book will guide you through basic data management and analysis with R through your first Shiny application, and then show you how to integrate Shiny applications with your own web pages. Finally, you will learn how to finely control the inputs and outputs of your application, along with using other packages to build state-of-the-art applications, including dashboards.
Table of Contents (14 chapters)
Web Application Development with R Using Shiny Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

The Google Analytics application


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

Note that we would not query the...