Shiny Revolutionized Our Business

What Can It Do for You?

Adi Sarid


Presentation for Haifa R-user group

2024-08-06

Introduction

  • Adi Sarid

    • PhD in Operations Research

    • CEO of Sarid Research Institute

    • Working in Data Science for Market Research and Consumer Insights

    • An R-user since ~2007

  • In the next 15 minutes, I will talk about how Shiny transformed our business, how we use it, and how you can too.

What is Shiny?

  • Shiny is a web application framework for R

  • You use a package (shiny) and the familiar R syntax

  • Shiny turns your code into an interactive web app

  • Benefits

    • The application is online (others can use it as a cloud service)

    • The application server has all the power of R

    • Your code stays secret

    • Doesn’t require HTML / JavaScript (almost)

Example

We created ACME Coffee as a demonstration of some of shiny’s capabilities.

Our Business Before and After Shiny

  • Before - data changes, but reports are static

    • Most of our deliveries were static PowerPoint presentations or Word documents

    • Simplistic dashboards based on 3rd party solutions

  • After - more projects, revenue increase

    • Deliveries include dashboards - allow us to provide ongoing data solutions

    • Pricing models are more diverse (cloud services)

    • Ability to handle complex projects (optimization, model explainability)

*This is platform agnostic, but with Shiny, the transformation was easy (same knowledge base, seamless integration).

When to Shine?

  • Use shiny if…

    • Real-time required (e.g., pulling from database)

    • Application needs user input to filter/analyze dynamically

    • Complex visualizations that benefit from user manipulation

When to Shine? Examples

When NOT to Shine?

  • Don’t use it when…

    • Content can be conveyed through static reports/dashboard (e.g., flexdashboard)

    • One-off analysis not requiring interactivity

    • No time for development or limited deployment options

Tech Stack

Shiny can be extremely flexible, depending on the type of deployment. Our stack includes:

  • Deployment on AWS EC2 with nginx OR deployment on shinyapps.io

  • AWS RDS MySQL for database support

  • AWS S3 for storage of “stuff”

  • AWS Cognito or customized solutions for user-secure login, if needed

Takeaway

  • An empowering tool that turns data scientists into web app developers

  • Short learning curve, huge benefit

  • Know when to use (and when not to)

Reach out

  • Adi Sarid

  • adi@sarid-ins.com

  • https://www.sarid-ins.com

  • I’m writing a Hebrew guide book for R, freely available here: