when and why to use shiny for commercial applications€¦ · when and why to use shiny for...

22
When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

Upload: others

Post on 08-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

When and Why to Use Shiny for Commercial ApplicationsEARL Boston 2017 -11/03/2017

Tanya Cashorali@TanyaCash21

Page 2: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

2004 201220072005 2006 20142013 2015

SPEAKER PROFILE

TANYA CASHORALI@TANYACASH21

2

Page 3: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

FIRST THINGS FIRST:

What is a data product?

Page 4: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

VALUE IS IN THE DATA ITSELF… ?

Page 5: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

MYTHICAL DATA SCIENCE MACHINE

RAWDATA INSIGHTS

$$$

Page 6: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

SUPPORT DECISION MAKING

§ Get used to asking yourself: “So what?”

§ Provides actionable insights – DO SOMETHING

§ Ability to ask “What-If?” questions

Page 7: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

RAPID PROTOTYPING

§Demonstrate value before full-scale implementation

§Data scientists are able to do what they’re good at

Page 8: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

WHY NOT JUST USE TABLEAU?

Source:http://nandeshwar.info/data-science-2/tableau-vs-r/

Dependson…

• UseCase

• Audience

• In-houseskills

• Greatforaggregationsandsummarydashboardswithdrill-downsandfilters

Page 9: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

REPRODUCIBILITY

Source:http://www.jonzelner.net/statistics/make/docker/reproducibility/2016/05/31/reproducibility-pt-1/

Knitr rocker Gitlab-CI

“It’snotreproducibleifitonlyrunsonyour

laptop.”

Page 10: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

COLLABORATION

RStudio ConnectVersion Control

Page 11: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

CUSTOMIZATION + FLEXIBILITY

§Certain charts in Tableau require complicated workarounds (gantt, spider, chord diagrams, network viz, etc.)

§Capable of machine learning, advanced statistical functions

Page 12: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

BUILD PROCESS

Page 13: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

VISUALIZE MODEL PREDICTIONS

Whiteboard/Brainstorm/Wireframe

Quicklybuildprototypedashboard

Page 14: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

ITERATE WITH CLIENT

Sketchesovere-mailtorealityinjustseveraldays

Page 15: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

RSTUDIO MARKETING AND SALES ANALYTICS

Page 16: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

GOOGLE VISION API

Powerfulimageanalysisthatenables:

• Logodetection• Landmarkdetection• OpticalCharacterRecognition• Faceandemotiondetection• Classificationofobjectsfromtrainstoanimals

Page 17: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

GOOGLE VISION API

Scraped5,000+imagesfromtheNewEnglandPatriotsFacebookpage

Classifiedallpicturestounderstandbrand/sponsorpresenceonPatriotspage

Page 18: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

EXAMPLE RESULTSDunkin’DonutsHighConfidence

Dunkin’DonutsLowConfidence

Snickers

Snapchat LordoftheRings Cancer

Page 19: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

FANTASY OPTIMIZERS

http://apps.fantasyfootballanalytics.net/

https://tcb-analytics.shinyapps.io/dfsnba/

Additional Reading on scaling: https://www.slideshare.net/appsilon/scaling-shiny-apps-earl-2017-san-francisco

2013 - Started with Shiny Server – ran into scaling issues

2015 - Moved to OpenCPU/Azure – ran into scaling issues in OpenCPU (greater capacity servers may have resolved, but $$$). Azure also required Java.

2017 - Moved back to Shiny (shinyapps.io w/ professional plan) – so far no scaling issues

Page 20: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

WHEN TO USE SHINY SERVER PRO

20https://support.rstudio.com/hc/en-us/articles/218294997-What-is-the-difference-between-shinyapps-io-and-Shiny-Server-Pro-

Outsidefirewall? Dataincloud? Usersmustregister? SharedResources?

IfyourorganizationisnotOKwithanyoftheabove…youmaywanttoconsiderShinyServerPro

Page 21: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

PRODUCTION PITFALLS

§ Too good, too fast§ Inability to keep up with demands

and scale

§ Best to implement unit tests, documentation, deployment best practices in advance or at least be prepared to do so quickly

http://schd.ws/hosted_files/user2017/7d/UseR2017_ShinyPrototypesOutOfControl.pdf

Buildingtheplanewhileflying

Page 22: When and Why to Use Shiny for Commercial Applications€¦ · When and Why to Use Shiny for Commercial Applications EARL Boston 2017 -11/03/2017 Tanya Cashorali @TanyaCash21

SPECIAL THANKS TO…

22Grace MeyerIsaac Petersen Josh Walker Bill Carney Paul Doetsch Roger Oberg