Access to the College Green area of campus will be restricted until further notice. PennCard holders and some Penn affiliates may enter and exit Van Pelt-Dietrich Library Center through the Rosengarten Undergraduate Study Center on the ground floor, and may enter and exit the Fisher Fine Arts Library through the 34th Street entrance to Meyerson Hall. See our Service Alerts for details.

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 
  2. Code Layout 
  3. RStudio Demo 
  4. Alternatives 
  5. 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 

Javascript

  • D3.js / Observable

Resources