Interactive Web Visualization with RShiny

Main content

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: 

  1. Web Apps 

  1. Code Layout 

  1. RStudio Demo 

  1. Alternatives 

  1. 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 

D3.js / Observable 

Resources 

Home page Slide titled "Data Jam 2021 Interactive Web Visualization with RShiny" watermarked "Penn Libraries" logo and "Research Data and Digital Scholarship" Data Jam logo of a cat in a jam jar with Copyright Commons CC-BY 4.0 linked on the page
Publish Date