SlideShare wird heruntergeladen. ×
An Intro to (hosted) Shiny apps...or where are all the bees now?...or where are all the bees now?daniel@dakoller.net - @da...
What is Shiny?• It is a R-based web applicationframework for interactivevisualizations.• Started by the people behindRStud...
Shiny Webapps are coded using textfiles(preferably using RStudio): you need• ui.R:library(shiny)# Define UI for applicatio...
...then you fire:runApp("~/Documents/workspace/..../")--> localhost:8100
Shiny Showcase „Bee swarms in the wild“http://glimmer.rstudio.com/dakoller/happyBees/
What can you do inside Shiny?• Use HTML form elements for interaction:• Sliders, Tabs, NumericInput, Select Boxes, Check B...
Shiny hosting by RStudio• Available in Beta-Mode• Editing via browser-enabled RStudio ( http://glimmer.rstudio.com:8787/ )...
Resources• Shiny, R web app framework for interactive apps:http://www.rstudio.com/shiny/
Nächste SlideShare
Wird geladen in ...5
×

A intro to (hosted) Shiny Apps

3,297

Published on

done for Munich R User group on 7th of Jun 2013

Published in: Technologie
1 Comment
4 Gefällt mir
Statistiken
Notizen
  • the source code for the mentioned bees app is available at https://github.com/dakoller/shiny-happybees
       Antworten 
    Sind Sie sicher, dass Sie...  Ja  Nein
    Ihre Nachricht erscheint hier
Keine Downloads
Views
Gesamtviews
3,297
Bei Slideshare
0
Aus Einbettungen
0
Anzahl an Einbettungen
0
Aktionen
Geteilt
0
Downloads
0
Kommentare
1
Gefällt mir
4
Einbettungen 0
No embeds

No notes for slide

Transcript of "A intro to (hosted) Shiny Apps"

  1. 1. An Intro to (hosted) Shiny apps...or where are all the bees now?...or where are all the bees now?daniel@dakoller.net - @dakollerfor R User Group Munichhttp://de.slideshare.net/dakoller/r-intro-for-munich-google-io-extended
  2. 2. What is Shiny?• It is a R-based web applicationframework for interactivevisualizations.• Started by the people behindRStudio (but works w/o RStudio)• Can run locally, can be deployedon an own webserver or cn behosted by RStudio
  3. 3. Shiny Webapps are coded using textfiles(preferably using RStudio): you need• ui.R:library(shiny)# Define UI for application that plots random distributionsshinyUI(pageWithSidebar(# Application titleheaderPanel("Customer Segmenter"),• server.R:library(shiny)library(datasets)# We tweak the "am" field to have nicer factor labels. Sincethis doesnt# rely on any user inputs we can do this once at startup andthen use the# value throughout the lifetime of the applicationmpgData <- mtcarsmpgData$am <- factor(mpgData$am, labels = c("Automatic","Manual"))# Define server logic required to plot various variablesagainst mpgshinyServer(function(input, output) {...# Return the formula text for printing as a captionoutput$caption <- renderText({formulaText()})# Generate a plot of the requested variable against mpg andonly# include outliers if requestedoutput$mpgPlot <- renderPlot({boxplot(as.formula(formulaText()),
  4. 4. ...then you fire:runApp("~/Documents/workspace/..../")--> localhost:8100
  5. 5. Shiny Showcase „Bee swarms in the wild“http://glimmer.rstudio.com/dakoller/happyBees/
  6. 6. What can you do inside Shiny?• Use HTML form elements for interaction:• Sliders, Tabs, NumericInput, Select Boxes, Check Boxes• Replace Shiny-UI with an HTML5-template (default is bootstrap-like)• Upload files (for calculation)• Prepare data extracts of the report for download• Shiny can show any R output, even usage of advanced components such asRGoogleViz or ggplot2 is possible.
  7. 7. Shiny hosting by RStudio• Available in Beta-Mode• Editing via browser-enabled RStudio ( http://glimmer.rstudio.com:8787/ )• Immediate update after ,source‘• Special care needed when data sources show fast changing information! (orare to be updated for every run)• Register at https://rstudio.wufoo.com/forms/shiny-server-beta-program/ incase you are interested!
  8. 8. Resources• Shiny, R web app framework for interactive apps:http://www.rstudio.com/shiny/

×