This repository contains files for a one-day course on R Shiny, offered during Data Matters in the summer of 2023. The course description and activities are listed below.
See additional details on the pre-work page to prepare for the course.
Course exercises and slides are available from the GitHub repository.
This course will cover the basics of creating R-based web applications with Shiny, an R package that blends data science and statistical operations with interactive interface components. Participants will learn to connect interactive inputs with R operations, develop skills in web application design, and explore different options for hosting Shiny applications on the web. Basic familiarity with R is required.
Modern data science projects go beyond research publications and static presentations. Stakeholders interested in the results of a data analysis workflow may need a more direct interface to explore the data themselves. Rather than preparing exhaustive reports that summarize as many different aspects of the results as possible, it may make more sense to create a way for stakeholders to interact with either the data analysis itself or the various outputs of the analysis.
Shiny is a robust web application development system for R. Shiny can be used to build interactive dashboards, adjust parameters of a model, generalize a data processing workflow, and even allow users to customize the look and feel of reports and figures.
This course will cover the basics of building simple Shiny applications. The course will also cover the range of options for more advanced Shiny applications and the basic process for hosting and sharing a Shiny application. The following broad topics will be included:
- Introduction to web applications
- Planning for interactivity
- Layout and UI design
- Writing reactive R code
- Using charts as inputs
As indicated above, this course assumes basic familiarity with R—e.g., R syntax, data structures, development environments. Participants with no knowledge of R should consider taking an introductory R short course prior to this class.
We will use RStudio to interact with R. Exercise files and slides will be shared using a GitHub repository, but no prior experience using GitHub is required.
In order to participate in class exercises, participants should have installed current versions of R, RStudio, and the shiny package. Additional required packages will be shared before the start of the course. Permissions to install packages on the fly will be useful.