Incorporating Shiny into Dashboards Elaine McVey Director of - - PowerPoint PPT Presentation

incorporating shiny into dashboards
SMART_READER_LITE
LIVE PREVIEW

Incorporating Shiny into Dashboards Elaine McVey Director of - - PowerPoint PPT Presentation

DataCamp Building Dashboards with flexdashboard BUILDING DASHBOARDS WITH FLEXDASHBOARD Incorporating Shiny into Dashboards Elaine McVey Director of Quantitative Mobility TransLoc DataCamp Building Dashboards with flexdashboard Why should I


slide-1
SLIDE 1

DataCamp Building Dashboards with flexdashboard

Incorporating Shiny into Dashboards

BUILDING DASHBOARDS WITH FLEXDASHBOARD

Elaine McVey

Director of Quantitative Mobility TransLoc

slide-2
SLIDE 2

DataCamp Building Dashboards with flexdashboard

Why should I add Shiny? Or not?

Why Interactivity Lightweight Why not Complication Hosting

slide-3
SLIDE 3

DataCamp Building Dashboards with flexdashboard

Why should I add Shiny? Or not?

Why Interactivity Lightweight Why not Complication Hosting

slide-4
SLIDE 4

DataCamp Building Dashboards with flexdashboard

Why should I add Shiny? Or not?

Why Interactivity Lightweight Why not Complication Hosting

slide-5
SLIDE 5

DataCamp Building Dashboards with flexdashboard

Why should I add Shiny? Or not?

Why Interactivity Lightweight Why not Complication Hosting

slide-6
SLIDE 6

DataCamp Building Dashboards with flexdashboard

If not a Shiny app, then what?

A flexdashboard with Shiny is an interactive RMarkdown document

slide-7
SLIDE 7

DataCamp Building Dashboards with flexdashboard

Making it shiny

runtime: shiny

slide-8
SLIDE 8

DataCamp Building Dashboards with flexdashboard

Let's practice!

BUILDING DASHBOARDS WITH FLEXDASHBOARD

slide-9
SLIDE 9

DataCamp Building Dashboards with flexdashboard

The Reactive Dataframe Pattern

BUILDING DASHBOARDS WITH FLEXDASHBOARD

Elaine McVey

Director of Quantitative Mobility TransLoc

slide-10
SLIDE 10

DataCamp Building Dashboards with flexdashboard

Creating a sidebar

Column {data-width=200 .sidebar}

slide-11
SLIDE 11

DataCamp Building Dashboards with flexdashboard

Creating a sidebar

slide-12
SLIDE 12

DataCamp Building Dashboards with flexdashboard

Adding user inputs

slide-13
SLIDE 13

DataCamp Building Dashboards with flexdashboard

Making our dataframe reactive

slide-14
SLIDE 14

DataCamp Building Dashboards with flexdashboard

Using the reactive dataframe

slide-15
SLIDE 15

DataCamp Building Dashboards with flexdashboard

Making dashboard components reactive

slide-16
SLIDE 16

DataCamp Building Dashboards with flexdashboard

Steps to the reactive dataframe pattern

  • 1. Create a sidebar column (using .sidebar).
  • 2. Add user inputs to the sidebar (using xyzInput() Shiny widgets).
  • 3. Make a "dataframe" that reacts to user inputs (using reactive()).
  • 4. Replace the dataframe in the dashboard component code with the reactive

version.

  • 5. Wrap each dashboard output with the appropriate Shiny version (renderXyz()).
slide-17
SLIDE 17

DataCamp Building Dashboards with flexdashboard

Let's practice!

BUILDING DASHBOARDS WITH FLEXDASHBOARD

slide-18
SLIDE 18

DataCamp Building Dashboards with flexdashboard

Customized Inputs for Charts

BUILDING DASHBOARDS WITH FLEXDASHBOARD

Elaine McVey

Director of Quantitative Mobility TransLoc

slide-19
SLIDE 19

DataCamp Building Dashboards with flexdashboard

Chart-Specific Effects

slide-20
SLIDE 20

DataCamp Building Dashboards with flexdashboard

Moving Inputs Into Charts

slide-21
SLIDE 21

DataCamp Building Dashboards with flexdashboard

Moving Inputs Into Charts

slide-22
SLIDE 22

DataCamp Building Dashboards with flexdashboard

Moving Inputs Into Charts

slide-23
SLIDE 23

DataCamp Building Dashboards with flexdashboard

Moving Inputs Into Charts

slide-24
SLIDE 24

DataCamp Building Dashboards with flexdashboard

Moving Inputs Into Charts

slide-25
SLIDE 25

DataCamp Building Dashboards with flexdashboard

A Shortcut

slide-26
SLIDE 26

DataCamp Building Dashboards with flexdashboard

Let's practice!

BUILDING DASHBOARDS WITH FLEXDASHBOARD

slide-27
SLIDE 27

DataCamp Building Dashboards with flexdashboard

Course Recap

BUILDING DASHBOARDS WITH FLEXDASHBOARD

Elaine McVey

Director of Quantitative Mobility TransLoc

slide-28
SLIDE 28

DataCamp Building Dashboards with flexdashboard

Resources

https://rmarkdown.rstudio.com/flexdashboard/ https://www.htmlwidgets.org/

slide-29
SLIDE 29

DataCamp Building Dashboards with flexdashboard

Resources

https://rmarkdown.rstudio.com/flexdashboard/ https://www.htmlwidgets.org/

slide-30
SLIDE 30

DataCamp Building Dashboards with flexdashboard

Resources

leaflet DT (datatable) plotly highcharter https://rmarkdown.rstudio.com/flexdashboard/ https://www.htmlwidgets.org/

slide-31
SLIDE 31

DataCamp Building Dashboards with flexdashboard

shinydashboard

slide-32
SLIDE 32

DataCamp Building Dashboards with flexdashboard

Thank you!

BUILDING DASHBOARDS WITH FLEXDASHBOARD