Beruflich Dokumente
Kultur Dokumente
Shiny App
Shiny App
Shiny ist ein R-Paket mit dem einfach und schnell interaktive
Webanwendungen mit R erstellt werden können.
3
• Interaktive Berichte
• Interaktive Dashboards
Model: Daten
View: User Interface
Controller: Businesslogik
Quelle: https://en.wikipedia.org/wiki/Model-view-controller
5
Elemente in Shiny
• Seite basicPage, fluidPage
• Layout fluidRow, flowLayout, sidebarLayout, splitLayout,
sidebarPanel, tabsetPanel, ...
• Elemente tags$a, tags$input, tags$div, tags$table, ...
• „Reactive“ textInput, selectInput, actionButton,...
textOutput, dataTableOutput, plotOutput, ...
Referenz: https://shiny.rstudio.com/reference/shiny/1.5.0/
7
Reactive Elements
Jedes "Reactive" Element löst eine Reaktion in der App aus,
worauf die App mit einer Aktion antwortet.
→ Benutzereingabe (*)
→ reactive Element informiert App
→ App führt Businesslogik aus
→ Businesslogik aktualisiert Model
→ User Interface aktualisiert View
Events
erlauben gezielte Reaktion auf Ereignisse von Elementen
(zu viele reaktive Elemente verlangsamen App!)
Quelle: https://shiny.rstudio.com/images/shiny-cheatsheet.pdf
9
Deployment Szenarien
Wie und wo können Shiny Apps betrieben werden?
Quelle: https://shiny.rstudio.com/deploy/
10
weitere Informationen
• https://shiny.rstudio.com/tutorial/
• https://shiny.rstudio.com/gallery/
• https://shiny.rstudio.com/reference/shiny/
• https://mastering-shiny.org/index.html
• https://shiny.rstudio.com/images/shiny-cheatsheet.pdf