class: center, middle, inverse, title-slide # Interactive web apps
⭐ ### S. Mason Garrison --- layout: true <div class="my-footer"> <span> <a href="https://DataScience4Psych.github.io/DataScience4Psych/" target="_blank">Data Science for Psychologists</a> </span> </div> --- ## Shiny .pull-left[ - 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 - Learn more at [shiny.rstudio.com](https://shiny.rstudio.com/) ] .pull-right[ <img src="img/shiny.png" width="60%" style="display: block; margin: auto auto auto 0;" /> ] --- ## High level view - Every Shiny app has a webpage that the user visits, and behind this webpage there is a computer that serves this webpage by running R - When running your app locally, the computer serving your app is your computer - When your app is deployed, the computer serving your app is a web server --- ## Anatomy of a Shiny app - User interface - controls the layout and appearance of app - Server function - contains instructions needed to build app ```r library(shiny) # User interface ui <- fluidPage() # Server function server <- function(input, output) {} shinyApp(ui = ui, server = server) ```