SlideShare a Scribd company logo
1 of 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/

More Related Content

What's hot

What's hot (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
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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/