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

Dygraphs


The dygraphs library in JavaScript (http://dygraphs.com/) is designed to show the time series and trend data. It supports zoom, pan, mouseover, and even supports mobile devices by offering pinch to zoom. The dygraphs R package provides a handy interface to many of the functions of the dygraphs library. It can be installed using install.packages("dygraphs").

We'll take a look at a few of the things that can be done with the package here. Let's take a look at the finished graph:

There are a couple of things you need to make a note of on this graph. Firstly, you can see the mouseover effect at the top-right of the graph, where the date and values of NHS and Other are listed. Secondly, this graph has been smoothed using a rolling average. The number of points to be averaged is specified in the widget on the left-hand side of the page (Select roll period) and is given by default in the small square box at the bottom-left of the graph. Thirdly, the grey box at the bottom with the selector...