install.packages(c("shiny"))Building static and interactive dashboards
Introduction to building dashboards in R
Pre-lecture activities
Tip
In advance of class, please install three additional packages:
shiny- this provides functionality to create interactive dashboard elements
You can do this by calling
In addition, please read through
- Information about creating quarto dashboards: https://quarto.org/docs/dashboards/
- Examples of quarto dashboards: https://quarto.org/docs/gallery/#dashboards
Lecture
Learning objectives
NoteLearning objectives
At the end of this lesson you will:
- Know how to create a static quarto dashboard to display data analysis elements
- Add interactive elements to your dashboard using tools from the
shinypackage - Have resources to assist you in developing your own more complex dashboard to clearly present data and interactive elements
Slides
Deploying a dashboard
Here are some helpful pointers for getting a free Shinyapps.io account and then publishing your dashboard to the web:
TipDeploying a Shiny app in RStudio
- Sign up for a free account on http://www.shinyapps.io/
- Install the
rsconnectpackage:install.packages("rsconnect") - Check out these instructions to deploy on ShinyApps.io (https://quarto.org/docs/interactive/shiny/running.html#shinyapps)
- If you want to delete the app (unpublish it), you need to do this from within your shinyapps.io account. Go to http://www.shinyapps.io/ and log in to your account. Click on applications to manage your applications. You must first archive your app before you can delete it.
Class activity
For the rest of the time in class, you and your team will work on the final project. Stephanie will walk around to answer questions.
Post-lecture
Tip
Here are a list of resources on Shiny:
- Main page: https://shiny.posit.co/
- Awesome tutorial: https://shiny.posit.co/r/getstarted/shiny-basics/lesson1/