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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
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
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

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/