Introduction

Case Studies: Building Web Applications with Shiny in R

Dean Attali

Shiny Consultant

Course overview

  • Assumes basic Shiny knowledge

  • Review important Shiny concepts

  • Develop multiple apps for real-life scenarios

  • Repetitive practice of essential features to increase familiarity

  • Learn new features and best practices

Case Studies: Building Web Applications with Shiny in R

Shiny app template

library(shiny)

ui <- fluidPage()
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
  • Load the shiny package

  • Create a webpage with fluidPage() - UI of a Shiny app

  • Create server portion of the app - where application logic lives

  • Combine UI + server into a Shiny app and run it

Case Studies: Building Web Applications with Shiny in R

Adding text to Shiny

  • Add text as argument to fluidPage()

    ui <- fluidPage(
        "Hello there" 
    )
    
  • Result: webpage with text "Hello there"

  • fluidPage() accepts arbitrary # of arguments
ui <- fluidPage(
    "Hello",
    "there"
)
Case Studies: Building Web Applications with Shiny in R

Formatted text

h1()

h2()

strong()

em()

Primary Header

Secondary header

Bold

Italicized (emphasized)

Case Studies: Building Web Applications with Shiny in R

Formatted text

ui <- fluidPage(
    h1("SHINY COURSE"),
    "by",
    strong("Dean Attali"),
)

SHINY COURSE

by Dean Attali

Case Studies: Building Web Applications with Shiny in R

Sidebar layout

chapter1_1_introduction.027.png

Case Studies: Building Web Applications with Shiny in R

Sidebar layout

chapter1_1_introduction.028.png

Case Studies: Building Web Applications with Shiny in R

Sidebar layout

chapter1_1_introduction.029.png

Case Studies: Building Web Applications with Shiny in R

Sidebar Layout

chapter1_1_introduction.030.png

ui <- fluidPage( 
    sidebarLayout(
        sidebarPanel(
            "This is the sidebar"
        ),
        mainPanel(
            "Main panel goes here"
        )
    )
)
Case Studies: Building Web Applications with Shiny in R

Let's practice!

Case Studies: Building Web Applications with Shiny in R

Preparing Video For Download...