Nikhil Sah
A simple Shiny app: how long until the next eruption?
5 slides. Use the arrows or the left/right keys.
Visitors to Old Faithful want to know how long the next wait will be.
Who it is for: curious visitors and students. No R or statistics needed.
Behind the scenes, server.R fits a straight-line model
and predicts from your inputs.
The “How to use” tab explains everything inside the app.
A 4 minute eruption, 95% prediction range:
fit <- lm(waiting ~ eruptions, data = faithful)
new <- data.frame(eruptions = 4)
round(predict(fit, new, interval = "prediction"))## fit lwr upr
## 1 76 65 88
This code ran when the slides were built. Eruption length explains about 81% of the variation in waits.
App: https://v3sper.shinyapps.io/old-faithful-wait/
Free, runs in the browser, nothing to install.
Move the slider and watch the prediction change.