Interactive Web Visualization with RShiny

Main content

Interactive Web Visualization with RShiny

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 

About the Author

Jaj Karajgikar
Jajwalya Karajgikar
Applied Data Science Librarian
Jaj engages with researchers across the disciplines interested in employing techniques for data storytelling, natural language processing, computational social sciences, data visualization, network analysis, and text mining. She works with campus partners to establish foundational programming in research computing, data literacy, and data ethics.

With extensive experience in data storytelling, natural language processing, computational social sciences, data visualization, network analysis, and knowledge mining (text/data/etc), Jaj engages with researchers across the disciplines interested in employing these techniques. She teaches Carpentry workshops, provides learning opportunities, heads the R User Group, collaborating on digital scholarship projects, and working with the graduate center and other campus partners to establish foundational programming in research computing, data literacy, and data ethics.

Jaj has a  Masters Degree in Computational Sciences from George Mason University. She has completed internships in digital humanities at the National Park Services’ American Battlefield Protection Program and museum data science at the National Gallery of Art’s Department of Analytics and Enterprise Architecture. She is a researcher with the PrincetonDH New Languages for NLP Institute and has worked as a Graduate Research Assistant at the Digital Scholarship Center Lab of George Mason University.