Introduction to Shiny

What is a Shiny app?

Each Shiny app involves:

  1. A web page
  2. A computer that watches the web page and responds to user events on that page

What is a Shiny app?

Each Shiny app involves:

  1. A web page
  2. A computer that watches the web page and responds to user events on that page

What is a Shiny app?

Each Shiny app involves:

  1. A web page
  2. A computer that watches the web page and responds to user events on that page

Components

Each Shiny app consists of:

  1. Inputs

Components

Each Shiny app consists of:

  1. Inputs
  2. Outputs

Components

Each Shiny app consists of:

  1. Inputs
  2. Outputs
  3. Instructions on how to build outputs from inputs

Reactivity

When an input changes, Shiny reacts by rebuilding the outputs that depend on it, and only those outputs.

Spreadsheet Analogy

  1. Inputs
  2. Outputs
  3. Instructions on how to build outputs from inputs

Spreadsheet Analogy

Updates:

  1. When an input changes
  2. Only the parts of the app that depend on the input

Key features of reactivity

  • Easy enough to use for prototypes
  • Efficient enough to handle complexity
  • Scales to build production quality apps

Why Shiny?

Shiny lets you quickly create reactive web apps without worrying about:

  • cache
  • state
  • callbacks
  • …or even HTML, CSS, and JavaScript

And, these apps can scale from prototype to production-ready.