Lecture 10: Dashboards with R Shiny
November 4, 2025
This topic aims to provide you with a foundation for making a shiny app. From this topic, students are anticipated to be able to:
develop the user interface of a shiny app from scratch,
develop interactivity using widgets in a shiny app,
deploy a shiny app to shinyapps.io,
create interactive Shiny R Markdown documents (embed shiny features within an Rmd file).
And possibly:
Make an interactive plot with plotly
Make an interactive data table with the
DT
package
Why Dashboards?
Dashboards allow users to get real time (and often customizable) overviews of information. Dashboards can be used for monitoring, measuring, analyzing, and presenting data.
R Shiny
Shiny is an open-source R package that allows users to create interactive web applications directly from R without needing to learn traditional web development languages like HTML, CSS, or JavaScript.
Here are some examples of R Shiny Dashboards:
Today, we’ll be replicating this dashboard to explore BS Liquor Store prices:
Agenda
We are going to be working off of this slide deck and tutorial written by Dean Attali. This should take two classes.
Additional Resources
- Video lecture: How to Make a Shiny App in R
“Mastering Shiny” by Hadley Wickham gives a more comprehensive treatment.
The official shiny site has tutorials, a gallery, and other goodies.
For deploying shiny apps, check out https://www.shinyapps.io/
For shiny documents (= R Markdown + shiny), see Chapter 19 of Yihui’s R Markdown book.
For testing your shiny app, check out the shinytest and reactlog packages.
For further cutting down on code repetition by “functionizing” your shiny app, check out Emily Riederer’s beginner’s guide to Shiny modules for a gentle introduction and Chapter 19 of the “Mastering Shiny” book for a full treatment.
Other dashboard tools besides shiny (but not in R):
With python: plotly dash. Check out the main website, or this Medium post introducing the tool.
With javascript: D3, a tremendously powerful tool with a steep learning curve (esp. if you don’t know javascript).