Book Image

Hands-On Dashboard Development with Shiny

By : Chris Beeley
Book Image

Hands-On Dashboard Development with Shiny

By: Chris Beeley

Overview of this book

Although vanilla Shiny applications look attractive with some layout flexibility, you may still want to have more control over how the interface is laid out to produce a dashboard. Hands-On Dashboard Development with Shiny helps you incorporate this in your applications. The book starts by guiding you in producing an application based on the diamonds dataset included in the ggplot2 package. You’ll create a single application, but the interface will be reskinned and rebuilt throughout using different methods to illustrate their uses and functions using HTML, CSS, and JavaScript. You will also learn to develop an application that creates documents and reports using R Markdown. Furthermore, the book demonstrates the use of HTML templates and the Bootstrap framework. Moving along, you will learn how to produce dashboards using the Shiny command and dashboard package. Finally, you will learn how to lay out applications using a wide range of built-in functions. By the end of the book, you will have an understanding of the principles that underpin layout in Shiny applications, including sections of HTML added to a vanilla Shiny application, HTML interfaces written from scratch, dashboards, navigation bars, and interfaces.
Table of Contents (5 chapters)

Navigation bar and the navigation list based layout

Shiny allows you to layout your application using navbars and navlists. These are layouts that come from the Bootstrap framework. However, navlist has disappeared as a named class in Bootstrap 3.

Navbar panel application

From the following screenshot, in the first tab (Budgets over time), we have the year, title, and genre controls, as well as the graph underneath containing content from the Movies explorer application:

Budget over time tab

On the next tab (Movie picker), we have a table with the movie selector combo box. The navbar layout gives you buttons along the top, which allows you to select different tab panels, as shown in the following screenshot:

Movie picker...