Week 10: Shiny, Part II

Robert W. Walker

Overview

Overview

  1. AMA
  2. Looking Backward: Shiny Part I
  3. Shiny, Part II

The Assignment [Multi-week]

A shiny

AMA

A quarto tip.

The margin column ## A Recap of a Shiny Conference

From tools to frameworks for tools.

Some Alternatives to Consider

  1. Parameterized markdown and CRON jobs

    • What is a CRON job?
  2. CRON jobs and web servers?

  3. Use APIs.

Here’s a little example.

OCPU

The Path Forward

Workflow

  1. Development cycles
  2. Debugging
  3. Getting help [reprex]

Development workflow

  1. Any app is six lines of code.

Six lines

  1. Playing/experimenting is the key

Experimentation

The IDE and Shiny

Options

Tracebacks

Normal tracebacks vs [mandatory] shiny tracebacks

Interactive Debugging

Interactive Debugging

What is debugging?

Reprex

Layout and Look

Hierarchy

Single Pages

Pages [12 column width] - fluidPage(): a generic page - fixedPage(): a fixed width page - fillPage(): a full screen page - sidebarLayout() - fluidRow() and column()

Multiple Pages

  • tabsets [tabsetPanel() and tabPanel()]
  • navlists and navbars

Theming

the theme argument and bootstrap/bootswatch

NB: there’s a version argument

THEMATIC

Interactivity

Interactivity with Mouse

Brushing

Brushing

Interactive Output

Modifying the plot

Limitations

Limits

Dynamic plotting

Server side

Images

Images

Feedback

shinyFeedback

Details

  1. Validating
  2. Notifying
  3. Progress tracking
  4. Confirmation and undo

File Transfers

9.1 is on uploads. This can get tricky with Docker. 9.2 on downloads.

Dynamic UI

Three key techniques: 1. update 2. tabsetPanel for conditionals 3. uiOutput and renderUI

update

Use cases

conditionals

dynamic visibility

the wizard interface and surveys

survey layout

Code creation of UI

Functional programming.

map is back

Functionals in action

Bookmarks

Bookmark

Advanced Bookmarks

back to tidy evaluation

Environments and data.

tidy evaluation

The Path Forward

next time

Fun with docker

We will walk through at least one example as time permits.