Documentation for Shiny Application of Interactive S&P 500 Chart

Stephen Bique
January 16, 2021

Slider for Date Range

Image of slider when created

Simply slide the ball in the slider to specify the beginning of the date range. The end of the date range is the current date: January 16, 2021. Initially the chart is drawn using a default time frame. Each time the slider is moved, the chart is redrawn.

Shiny application

To test the Shiny application, please visit Shiny Application.

User-interface Definition

To view the file ui.R for the Shiny application, please look in the folder InteractiveSNP on GitHub repository. Below we show an excerpt of the user-interface for the application.

shinyUI(fluidPage(
  titlePanel(paste("Interactive Chart of the S&P 500 (^GSPC) on ",today)),
  sidebarLayout(sidebarPanel(
            sliderInput("slider", "Slide ball to select starting date:", 
              min = start_date,max = max_date,value = default_date)),
  mainPanel(plotlyOutput(outputId = "p")))))

Server Logic

To view the file server.R, please look in the folder InteractiveSNP on the GitHub repository.