Shiny (1/2)

modeling
visualization

Learn how to make interactive tables, graphs and text from data.

Author

Nick van Doormaal

Published

March 17, 2022

In a two-sessions workshop, Nick van Doormaal demonstrated how to use the shiny package to create interactive web applications. Note that this was the first session of a two-sesssion workshop. This first session was be a basic introduction on the different components of a shiny app. In the second session (on Thursday March 31) we explored into more depth how ‘reactivity’ works, an important component of most shiny apps.

For inspiration, you may want to spend a few minutes viewing some fun apps made with shiny, or this shiny gallery.

To prepare for the workshop, you could install these two R packages (just copy and paste this line into your R Studio Editor and run it)

install.packages(c(“tidyverse”, “shiny”))

Nick van Doormaal is a former PhD candidate at the NSCR and currently a data analyst at the environmental service of the province of Gelderland. He got into R during his MSc thesis and internship and has been using R ever since.

Materials

On Nick’s GitHub repository nscr-shiny-workshop you can find the data and the R script that documents the development that Nick demonstrated during the second workshop on Thursday March 31.

How to download files from GitHub

To download files from GitHub you can:

Clone the repository to create a local copy in your computer. To clone a repository, follow the instructions here.

Alternatively, you can:

  1. Download all files compressed in a ZIP. To do this, go to the repository and click on the green code button, then select download ZIP. Unzip the downloaded file into a folder on your local computer.
  2. Download a specific file. To do this, select the desired file in the repository and click on the raw button. Then right click on the new page and select save as. Don’t forget to put the proper extension in the save name, like .R or .Rmd.

Contact

Nick van Doornmaal

Citation

For attribution, please cite this work as (Doormaal 2022)

References

Doormaal, N. van. 2022. NSC-R Workshops: Creating Web Applications with Shiny (1/2).” NSCR. https://nscrweb.netlify.app/posts/2022-03-17-shiny-1of2/.