1 Overview

Greetings! This book is intended to be a virtual hand-out that provides all the code necessary to participate in the Northeast Aquatic Biologists (NAB) RShiny Workshop scheduled for December 08, 2021. I hope you find this format simple and helpful as you follow along during the workshop. The GitHub repository that contains the underlying code as well as copies of the PowerPoint presentations used during the workshop can be found here: https://github.com/Blocktt/NAB_2021_RShiny_Workshop

Shiny is an R package that makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in R Markdown documents or build dashboards. You can also extend your Shiny apps with CSS themes, htmlwidgets, and JavaScript actions. This workshop will cover the fundamentals wherein you will build a solid theoretical and practical foundation from which you can build ever better apps!

1.1 Workshop Format

This book is separated by individual lessons which correspond to the workshop discussions we will be having. Here are the four lessons:

  • Lesson 1: How to build a Shiny app. In this lesson, we discuss the basics of RShiny including the development of the server and user interface (UI).
  • Lesson 2: How to customize reactions. Reactivity is the essence of RShiny and must be understood to create responsive Shiny apps.
  • Lesson 3: How to customize appearance. Defaults work for a while but sometimes you may want to zhoosh up an app and make the UI more appealing.
  • Lesson 4: Share your apps.Note, no code is provided for this lesson, but the lesson focuses on how to share your apps with colleagues, collaborators, and the public.

1.2 Agenda

8:00 AM - 4:00 PM DECEMBER 08, 2021

  • 8:00 – 8:30 AM Introduction and Demo
  • 8:30 – 10:00 AM Lesson 1: How to build a shiny app
  • 10:00 – 10:15 AM Break
  • 10:15 AM – 12:00 PM Lesson 2: How to customize reactions
  • 12:00 – 1:00 PM Lunch Break
  • 1:00 – 2:30 PM Lesson 3: How to customize appearance
  • 2:30 – 2:45 PM Lesson 4: Share your apps
  • 2:45 – 3:00 PM Conclusions
  • 3:00 – 4:00 PM Optional: Q&A and roundtable discussion

1.3 Preparation for the workshop

  1. We expect workshop attendees to be familiar with R and have both R and RStudio downloaded to their computers prior to the beginning of the workshop. R and RStudio are absolutely necessary for participation.

  2. Create a new directory and R Project

    • Create a new folder on your desktop
    • In RStudio: File > New Project… > Existing Directory (select the folder you made)
  3. There are three packages that you will need to make sure you have downloaded prior to the workshop. Please follow these instructions:

    • Open RStudio
    • Copy and execute the following code:
package_vec <- c("shiny", "bslib", "thematic")

install.packages(package_vec)

1.4 Resources

The majority of the workshop content was adapted from content published by RStudio creators. These include the following resources: