Looking further: Building interactive web apps in R + Shiny
Lecture 26
Warm-up
Announcements
-
Course and TA evaluations due Monday, 12/9
- TA of the Year award nominations: Email dus@sta.duke.edu.
Project due at 5 pm today
Peer evaluations due at 5 pm tomorrow
Interactive web apps in R with Shiny
Shiny
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.
Shiny App
Server
+
⇄
Client / Browser
+ +
Anatomy of an App
Shiny Widgets Gallery
A brief widget tour
Live demo
ae-21-weather-forecast
Go to your ae project in RStudio.
If you haven’t yet done so, make sure all of your changes up to this point are committed and pushed, i.e., there’s nothing left in your Git pane.
If you haven’t yet done so, click Pull to get today’s application exercise file: ae-21-weather-forecast.R.
Work through the application exercise in class, and render, commit, and push your edits.
Data
Scaffold 1
Find variables that are numeric and not constant for selected city
Scaffold 2
Calculate number of days that mention “Rain”, “Snow”, “Clear” in conditions