From ML Web Apps to Dashboards - R with Shiny

From ML Web Apps to Dashboards - R with Shiny

One of the beautiful gifts that R has got (that Python misses) is the package – Shiny. Shiny is an R package that makes it easy to build interactive web apps straight from R. This session will help you understand about Shiny that can in turn help you build ML solutions and Dashboards as web apps.

30e63a1ad21d3944b288fc3d33d1e920?s=128

AbdulMajedRaja RS

May 04, 2019
Tweet

Transcript

  1. 2.

    Outline • Intro to ML WebApps • RShiny – What

    & Why • Shiny App Demo & Architecture • Basic Code • Building your first Shiny App • Shiny Myths • What Shiny is not for? • Shiny - Alternatives • Companies using Shiny
  2. 3.

    Case #1 You are Data Scientist at a Retail Chain,

    You’ve developed a Demand Forecasting Model, You’d like to let the Store Managers use it. But, Oops, They don’t know to run a code and read Terminal outputs!
  3. 4.

    Case #2 You are Data Scientist at a Startup who’s

    just got a Seedfund, You’ve done your Sales Analysis and It’s time to present it, But your SLT wants a dashboard and your company is lean that means no Tableau / Qlik. How do you build a Dashboard with your Analysis results?
  4. 5.

    Intro to ML/Analytics Web Apps • Data • ML Algorithm

    • EDA (Plots) • Predictions/Insights • HTML, CSS, Javascript • Web Framework • Front-end Design • Back-end Design • Full-Stack Build and Deploy
  5. 6.

    The Problem Typically, A Data Scientist# (R / Python) isn’t

    equipped to build ML/Analytics Web Apps* (*even at a rudimentary level) (# Exceptions Apply)
  6. 9.

    Shiny - What? • Interactive web applications around your R

    analyses • Zero HTML/CSS/JavaScript knowledge is required • Fully customizable and extensible with HTML/CSS/JavaScript • Modern web UI with attractive defaults, but also infinitely customizable • Designed to integrate with existing JavaScript libraries (like D3.js) • Uses a reactive programming model which allows dramatically simpler code than traditional UI or web programming https://speakerdeck.com/jcheng5/shiny-january-2015-la-r-users-group
  7. 10.

    Shiny - Why? • Solution to Case #1, Case #2

    and Multiple such scenarios • Communicating your Analysis Effectively & Intuitively • Giving Stakeholders the ability to play with the result • When Interpretable Machine Learning is imminent for your ML Solutions • When your organization is Agile and RAD (Rapid Application Development) - Fast Prototyping
  8. 11.

    Shiny - Why? Simply, In the world of Data Science,

    Whenever you need an App on the Web/Intranet, You can turn to Shiny
  9. 23.

    Shiny Myths • Shiny isn’t easy to deploy: ◦ Rstudio

    supports Cloud and On-prem Shiny Deployment ◦ Additionally, There’s open-source Shiny Server version ◦ RStudio Connect is a publishing platform by Rstudio to share Shiny applications and more with the Push of a button • Shiny isn’t suitable for Production: ◦ Rstudio has open-sourced range of tools like (profviz, shinyloadtest) make your Shiny app Production-Read
  10. 24.

    Shiny Myths • Shiny isn’t suitable for scale nor extensible:

    ◦ Shiny apps can become even more powerful when they’re backed by powerful NoSQL back ends like MongoDB, Neo4j and ElasticSearch ◦ Shiny apps are often built for 10s of people, but you can build an app that’s simultaneously used by 1000s with the right set of infrastructure and strategies https://www.rstudio.com/resources/videos/developing-and-deploying-large-scale-shiny-applications/ https://www.rstudio.com/resources/videos/scaling-shiny/
  11. 26.

    Shiny is NOT (for): • A Pure Full-Fledged Web Application

    • A replacement to Javascript-based Web Visualizations • A Complete Self-Service Analytics Tool (Tableau/Qlik) Alternative • A Model-building Tool / Service https://speakerdeck.com/jcheng5/shiny-january-2015-la-r-users-group
  12. 28.

    Shiny - Alternatives • Dash (by Plotly) • Build on

    top of Plotly.js, React and Flask • Primarily aiming to be Shiny-alternative for Python Data Scientists • The traditional way of Web app development using Python • Highly-scalable Full-fledged Web Apps • Js-based Web App Development • Native to the web • Highly flexible and extensible Scale of Difficulty