Post on 07-Jun-2020
DataCamp Building Dashboards with flexdashboard
Incorporating Shiny intoDashboards
BUILDING DASHBOARDS WITH FLEXDASHBOARD
Elaine McVeyDirector of Quantitative Mobility
TransLoc
DataCamp Building Dashboards with flexdashboard
Why should I add Shiny? Or not?
Why
Interactivity
Lightweight
Why not
Complication
Hosting
DataCamp Building Dashboards with flexdashboard
Why should I add Shiny? Or not?
Why
Interactivity
Lightweight
Why not
Complication
Hosting
DataCamp Building Dashboards with flexdashboard
Why should I add Shiny? Or not?
Why
Interactivity
Lightweight
Why not
Complication
Hosting
DataCamp Building Dashboards with flexdashboard
Why should I add Shiny? Or not?
Why
Interactivity
Lightweight
Why not
Complication
Hosting
DataCamp Building Dashboards with flexdashboard
If not a Shiny app, then what?
A flexdashboard with Shiny is an interactive RMarkdown document
DataCamp Building Dashboards with flexdashboard
Making it shiny
runtime: shiny
DataCamp Building Dashboards with flexdashboard
Let's practice!
BUILDING DASHBOARDS WITH FLEXDASHBOARD
DataCamp Building Dashboards with flexdashboard
The Reactive DataframePattern
BUILDING DASHBOARDS WITH FLEXDASHBOARD
Elaine McVeyDirector of Quantitative Mobility
TransLoc
DataCamp Building Dashboards with flexdashboard
Creating a sidebar
Column {data-width=200 .sidebar}
DataCamp Building Dashboards with flexdashboard
Creating a sidebar
DataCamp Building Dashboards with flexdashboard
Adding user inputs
DataCamp Building Dashboards with flexdashboard
Making our dataframe reactive
DataCamp Building Dashboards with flexdashboard
Using the reactive dataframe
DataCamp Building Dashboards with flexdashboard
Making dashboard components reactive
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()).
DataCamp Building Dashboards with flexdashboard
Let's practice!
BUILDING DASHBOARDS WITH FLEXDASHBOARD
DataCamp Building Dashboards with flexdashboard
Customized Inputs forCharts
BUILDING DASHBOARDS WITH FLEXDASHBOARD
Elaine McVeyDirector of Quantitative Mobility
TransLoc
DataCamp Building Dashboards with flexdashboard
Chart-Specific Effects
DataCamp Building Dashboards with flexdashboard
Moving Inputs Into Charts
DataCamp Building Dashboards with flexdashboard
Moving Inputs Into Charts
DataCamp Building Dashboards with flexdashboard
Moving Inputs Into Charts
DataCamp Building Dashboards with flexdashboard
Moving Inputs Into Charts
DataCamp Building Dashboards with flexdashboard
Moving Inputs Into Charts
DataCamp Building Dashboards with flexdashboard
A Shortcut
DataCamp Building Dashboards with flexdashboard
Let's practice!
BUILDING DASHBOARDS WITH FLEXDASHBOARD
DataCamp Building Dashboards with flexdashboard
Course Recap
BUILDING DASHBOARDS WITH FLEXDASHBOARD
Elaine McVeyDirector of Quantitative Mobility
TransLoc
DataCamp Building Dashboards with flexdashboard
Resources
https://rmarkdown.rstudio.com/flexdashboard/
https://www.htmlwidgets.org/
DataCamp Building Dashboards with flexdashboard
Resources
https://rmarkdown.rstudio.com/flexdashboard/
https://www.htmlwidgets.org/
DataCamp Building Dashboards with flexdashboard
Resources
leaflet
DT (datatable)
plotly
highcharter
https://rmarkdown.rstudio.com/flexdashboard/
https://www.htmlwidgets.org/
DataCamp Building Dashboards with flexdashboard
shinydashboard
DataCamp Building Dashboards with flexdashboard
Thank you!
BUILDING DASHBOARDS WITH FLEXDASHBOARD