Interactive Web Visualization with RShiny
Interested in building an online dashboard? Use RShiny to visualize your data in an interactive way and create engaging data analysis web applications.
The theme for the fourth week of Research Data and Digital Scholarship Data Jam 2021 was “Creating Interactive Web Visualizations” with R.
The “Interactive Web Visualizations with R Shiny” workshop was a live coding session which detailed the following:
- Web Apps
- Code Layout
- RStudio Demo
- Alternatives
- Resources
Here are the workshop materials including slides and R code exercise.
In this workshop on Shiny and dashboarding with R, the workshop attendees were presented with an exciting opportunity to share visualizations with others, online. Shiny is a tool for making your R figures interactive. The goal for the workshop was to get you up and running with Shiny. R Shiny lets you present your visualizations to an audience to interact with. There are multiple use-cases for the app including:
- Set filters
- Select column heads
- Generate parameters
- Input textboxes
- Upload files
Shiny applications are divided into two parts: the User Interface (UI) and the Server. The UI is responsible for the app presentation, while the server is responsible for the application logic. In other words, the UI controls what is being displayed on the application page and how the components are laid out. The server controls the data that will be displayed through the UI.
library(shiny)
ui <- fluidPage(
Input(),
Output()
)
server <- function(input, output) {
code
}
shinyApp(ui = ui, server = server)
Alternatives
Software
- Tableau
- PowerBI
R Packages
- shinydashboard
- flexdashboard
- htmlwidgets
- crosstalk
- nplots (rchart package, which uses nvd3)
Python
- Plotly
- PyWebIO
- Flask
Javascript
- D3.js / Observable
Resources
- Shiny Documentation
- Shiny Cheatsheet
- Mastering Shiny, Hadley Wickam
- Introduction to RShiny, DataQuest (Contact Research Data and Digital Scholarship for license )
- Publishing Visualizations in R with Shiny and flexdashboard, Johns Hopkins University
- TidyTuesday: Flexdashboard vs Shinydashboard, Andrew Couch
- 40 use-cases of Shiny, ZevRoss
Date
December 17, 2021