Making an Interactive Web Application with R and Shiny
- Authors
- Topics:
This lesson demonstrates how to build a basic interactive web application using Shiny. Shiny is a library (a set of additional functions) for the programming language R. Its purpose is to facilitate the development of web applications, which allow a user to interact with R code using User Interface (UI) elements in a web browser, such as sliders, drop-down menus, and so forth. In the lesson, you will design and implement a simple application, consisting of a slider which allows a user to select a date range, which will then trigger some code in R, and display a set of corresponding points on an interactive map.
Graphical User Interfaces (GUI) and interactive elements can help to make certain types of data-driven scholarly work more accessible or readable. To give a simple example, historians working with large-scale data might want to demonstrate the change in a variable over time. An interactive map with an adjustable timeline is, in some cases, easier to read and allows for more granularity than a series of static maps. Allowing a user to set the parameters of the visualisation can help to avoid some of the bias often found in data visualisations using time series (for example, arbitrarily drawing one map per decade).
Reviewed by:
- Amanda Regan
- Nicole Lemire Garlic
Learning outcomes
After completing this lesson, you will be able to:
- Create a basic interactive Shiny application
- Understand the key layouts and design principles of the Shiny UI
- Use Shiny’s ‘reactive programming’ to ‘listen’ for certain inputs, and understand how they are connected to outputs displayed in your app
Check out this lesson on Programming Historian's website
Go to this resource