Jun 13, 2018
|
47 min
|
67.8k views
R Shiny Tutorial: How to Build Interactive Data Dashboards in R
Shiny is an R package for building interactive web applications from R code, with no JavaScript required. A Shiny app has a user interface that collects inputs and a server function that reacts to them, so when a reader moves a slider the plot updates without a page reload. This talk builds a dashboard with shinydashboard, adds a Leaflet map and a brushable ggplot, and compares the ways you can put it in front of other people. With Winston Chang.
What you will learn
What a dashboard is for, and what separates a dynamic one from a static report How a Shiny app is structured: inputs, the server function and reactivity How to install Shiny and shinydashboard and lay out a page What the Bootstrap grid gives you, and how boxes, sidebars and headers fit into it How to put an interactive Leaflet map inside a Shiny app How brushing lets a reader select points on a ggplot and filter everything else The deployment options: Shiny Server open source, Shiny Server Pro and shinyapps.io Chapters 0:00 What a dashboard is, and what this talk covers 0:35 Overview of the session 3:15 How does a dashboard actually work? 3:57 Fetching the data 5:30 Presenting the data 6:20 User inputs in Shiny 6:40 Interactive components 7:20 What Shiny is 13:04 Installing Shiny and shinydashboard 15:40 The Bootstrap grid 17:28 Other kinds of boxes 18:02 The sidebar 19:47 The header 21:07 Maps in the browser 22:53 Leaflet inside a Shiny app 23:16 The demo dashboard 26:57 Brushing a ggplot to select points 30:26 Deployment options compared 31:37 Shiny Server open source 32:34 Shiny Server Pro 32:53 Deploying to shinyapps.io 37:31 Resources and questions
Learn more Shiny: https://shiny.posit.co Get started with Shiny: https://shiny.posit.co/getstarted Mastering Shiny: https://mastering-shiny.org Shiny deployment options: https://shiny.posit.co/r/deploy.html
This talk was recorded in 2015. The concepts are unchanged, but the deployment landscape has moved on: shinyapps.io and Posit Connect are the current hosted options, and Shiny is now available for Python as well as R. For the current picture, see How to deploy Shiny apps in 2026
leaflet
Shiny
shinyapps
shinydashboard
R Shiny Tutorial
R Shiny
Shiny App
Shiny Dashboard
R Shiny App
Shiny Tutorial
Shinydashboard
Interactive Dashboard R
Leaflet R
Reactivity Shiny
Shinyapps Io
Winston Chang
Posit