SlideShare ist ein Scribd-Unternehmen logo
1 von 8
An Intro to (hosted) Shiny apps
...or where are all the bees now?
...or where are all the bees now?
daniel@dakoller.net - @dakoller
for R User Group Munich
http://de.slideshare.net/dakoller/r-intro-for-munich-google-io-extended
What is Shiny?
• It is a R-based web application
framework for interactive
visualizations.
• Started by the people behind
RStudio (but works w/o RStudio)
• Can run locally, can be deployed
on an own webserver or cn be
hosted by RStudio
Shiny Webapps are coded using textfiles
(preferably using RStudio): you need
• ui.R:
library(shiny)
# Define UI for application that plots random distributions
shinyUI(pageWithSidebar(
# Application title
headerPanel("Customer Segmenter"),
• server.R:
library(shiny)
library(datasets)
# We tweak the "am" field to have nicer factor labels. Since
this doesn't
# rely on any user inputs we can do this once at startup and
then use the
# value throughout the lifetime of the application
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Automatic",
"Manual"))
# Define server logic required to plot various variables
against mpg
shinyServer(function(input, output) {
...
# Return the formula text for printing as a caption
output$caption <- renderText({
formulaText()
})
# Generate a plot of the requested variable against mpg and
only
# include outliers if requested
output$mpgPlot <- renderPlot({
boxplot(as.formula(formulaText()),
...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 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 as
RGoogleViz or ggplot2 is possible.
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! (or
are to be updated for every run)
• Register at https://rstudio.wufoo.com/forms/shiny-server-beta-program/ in
case you are interested!
Resources
• Shiny, R web app framework for interactive apps:
http://www.rstudio.com/shiny/

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Data Visualization: Introduction to Shiny Web Applications
Data Visualization: Introduction to Shiny Web ApplicationsData Visualization: Introduction to Shiny Web Applications
Data Visualization: Introduction to Shiny Web Applications
 
Design Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorDesign Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu Kanoor
 
CSharp v1.0.2
CSharp v1.0.2CSharp v1.0.2
CSharp v1.0.2
 
Python Programming for ArcGIS: Part II
Python Programming for ArcGIS: Part IIPython Programming for ArcGIS: Part II
Python Programming for ArcGIS: Part II
 
PHP: GraphQL consistency through code generation
PHP: GraphQL consistency through code generationPHP: GraphQL consistency through code generation
PHP: GraphQL consistency through code generation
 
Cocoa heads 09112017
Cocoa heads 09112017Cocoa heads 09112017
Cocoa heads 09112017
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and Utilities
 
29. Treffen - Tobias Meier - TypeScript
29. Treffen - Tobias Meier - TypeScript29. Treffen - Tobias Meier - TypeScript
29. Treffen - Tobias Meier - TypeScript
 
TDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with AndroidTDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with Android
 
Jetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidJetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no Android
 
GDG Kuwait - Modern android development
GDG Kuwait - Modern android developmentGDG Kuwait - Modern android development
GDG Kuwait - Modern android development
 
jQuery - Chapter 4 - DOM Handling
jQuery - Chapter 4 - DOM Handling jQuery - Chapter 4 - DOM Handling
jQuery - Chapter 4 - DOM Handling
 
jQuery - Chapter 5 - Ajax
jQuery - Chapter 5 -  AjaxjQuery - Chapter 5 -  Ajax
jQuery - Chapter 5 - Ajax
 
Protocol in Swift
Protocol in SwiftProtocol in Swift
Protocol in Swift
 
What's new in iOS9
What's new in iOS9What's new in iOS9
What's new in iOS9
 
Architecture for scalable Angular applications
Architecture for scalable Angular applicationsArchitecture for scalable Angular applications
Architecture for scalable Angular applications
 
Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...
 
Adopting Swift Generics
Adopting Swift GenericsAdopting Swift Generics
Adopting Swift Generics
 
Reactive Programming with JavaScript
Reactive Programming with JavaScriptReactive Programming with JavaScript
Reactive Programming with JavaScript
 
Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams
 

Ähnlich wie A intro to (hosted) Shiny Apps

OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3
Borni DHIFI
 

Ähnlich wie A intro to (hosted) Shiny Apps (20)

How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
How to build unified Batch & Streaming Pipelines with Apache Beam and DataflowHow to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
 
Tech Talk - Overview of Dash framework for building dashboards
Tech Talk - Overview of Dash framework for building dashboardsTech Talk - Overview of Dash framework for building dashboards
Tech Talk - Overview of Dash framework for building dashboards
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
 
201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine Learning201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine Learning
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Mining with SpagoBI suite
Data Mining with SpagoBI suiteData Mining with SpagoBI suite
Data Mining with SpagoBI suite
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Spsmi13 charts
Spsmi13 chartsSpsmi13 charts
Spsmi13 charts
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightEnterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
 
Build your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesBuild your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resources
 
Drupal in 30 Minutes
Drupal in 30 MinutesDrupal in 30 Minutes
Drupal in 30 Minutes
 
OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3
 
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 

Mehr von Daniel Koller

R Intro for Munich Google IO Extended
R Intro for Munich Google IO ExtendedR Intro for Munich Google IO Extended
R Intro for Munich Google IO Extended
Daniel Koller
 

Mehr von Daniel Koller (10)

LoRaWan 4 SITBern
LoRaWan 4 SITBernLoRaWan 4 SITBern
LoRaWan 4 SITBern
 
IoT Applications based on LoRaWan
IoT Applications based on LoRaWanIoT Applications based on LoRaWan
IoT Applications based on LoRaWan
 
TheThingsNetwork Rhein-Neckar/LoRaWan @OpenDataDay Heidelberg
TheThingsNetwork Rhein-Neckar/LoRaWan @OpenDataDay HeidelbergTheThingsNetwork Rhein-Neckar/LoRaWan @OpenDataDay Heidelberg
TheThingsNetwork Rhein-Neckar/LoRaWan @OpenDataDay Heidelberg
 
TheThingsNetwork Rhein-Neckar - Kurz-Pitch für den 22.2.
TheThingsNetwork Rhein-Neckar - Kurz-Pitch für den 22.2.TheThingsNetwork Rhein-Neckar - Kurz-Pitch für den 22.2.
TheThingsNetwork Rhein-Neckar - Kurz-Pitch für den 22.2.
 
Five pillars of Infrastructure Monitoring
Five pillars of Infrastructure MonitoringFive pillars of Infrastructure Monitoring
Five pillars of Infrastructure Monitoring
 
Intro to AWS IOT
Intro to AWS IOTIntro to AWS IOT
Intro to AWS IOT
 
R Intro for Munich Google IO Extended
R Intro for Munich Google IO ExtendedR Intro for Munich Google IO Extended
R Intro for Munich Google IO Extended
 
Big data 4 webmonday
Big data 4 webmondayBig data 4 webmonday
Big data 4 webmonday
 
OpenStreetMap: Nutzung & Integration
OpenStreetMap: Nutzung & IntegrationOpenStreetMap: Nutzung & Integration
OpenStreetMap: Nutzung & Integration
 
Linked Data in the Enterprise
Linked Data in the EnterpriseLinked Data in the Enterprise
Linked Data in the Enterprise
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

A intro to (hosted) Shiny Apps

  • 1. An Intro to (hosted) Shiny apps ...or where are all the bees now? ...or where are all the bees now? daniel@dakoller.net - @dakoller for R User Group Munich http://de.slideshare.net/dakoller/r-intro-for-munich-google-io-extended
  • 2. What is Shiny? • It is a R-based web application framework for interactive visualizations. • Started by the people behind RStudio (but works w/o RStudio) • Can run locally, can be deployed on an own webserver or cn be hosted by RStudio
  • 3. Shiny Webapps are coded using textfiles (preferably using RStudio): you need • ui.R: library(shiny) # Define UI for application that plots random distributions shinyUI(pageWithSidebar( # Application title headerPanel("Customer Segmenter"), • server.R: library(shiny) library(datasets) # We tweak the "am" field to have nicer factor labels. Since this doesn't # rely on any user inputs we can do this once at startup and then use the # value throughout the lifetime of the application mpgData <- mtcars mpgData$am <- factor(mpgData$am, labels = c("Automatic", "Manual")) # Define server logic required to plot various variables against mpg shinyServer(function(input, output) { ... # Return the formula text for printing as a caption output$caption <- renderText({ formulaText() }) # Generate a plot of the requested variable against mpg and only # include outliers if requested output$mpgPlot <- renderPlot({ boxplot(as.formula(formulaText()),
  • 5. Shiny Showcase „Bee swarms in the wild“ http://glimmer.rstudio.com/dakoller/happyBees/
  • 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 as RGoogleViz or ggplot2 is possible.
  • 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! (or are to be updated for every run) • Register at https://rstudio.wufoo.com/forms/shiny-server-beta-program/ in case you are interested!
  • 8. Resources • Shiny, R web app framework for interactive apps: http://www.rstudio.com/shiny/