when and why to use shiny for commercial applications€¦ · when and why to use shiny for...
TRANSCRIPT
When and Why to Use Shiny for Commercial ApplicationsEARL Boston 2017 -11/03/2017
Tanya Cashorali@TanyaCash21
2004 201220072005 2006 20142013 2015
SPEAKER PROFILE
TANYA CASHORALI@TANYACASH21
2
FIRST THINGS FIRST:
What is a data product?
VALUE IS IN THE DATA ITSELF… ?
MYTHICAL DATA SCIENCE MACHINE
RAWDATA INSIGHTS
$$$
SUPPORT DECISION MAKING
§ Get used to asking yourself: “So what?”
§ Provides actionable insights – DO SOMETHING
§ Ability to ask “What-If?” questions
RAPID PROTOTYPING
§Demonstrate value before full-scale implementation
§Data scientists are able to do what they’re good at
WHY NOT JUST USE TABLEAU?
Source:http://nandeshwar.info/data-science-2/tableau-vs-r/
Dependson…
• UseCase
• Audience
• In-houseskills
• Greatforaggregationsandsummarydashboardswithdrill-downsandfilters
REPRODUCIBILITY
Source:http://www.jonzelner.net/statistics/make/docker/reproducibility/2016/05/31/reproducibility-pt-1/
Knitr rocker Gitlab-CI
“It’snotreproducibleifitonlyrunsonyour
laptop.”
COLLABORATION
RStudio ConnectVersion Control
CUSTOMIZATION + FLEXIBILITY
§Certain charts in Tableau require complicated workarounds (gantt, spider, chord diagrams, network viz, etc.)
§Capable of machine learning, advanced statistical functions
BUILD PROCESS
VISUALIZE MODEL PREDICTIONS
Whiteboard/Brainstorm/Wireframe
Quicklybuildprototypedashboard
ITERATE WITH CLIENT
Sketchesovere-mailtorealityinjustseveraldays
RSTUDIO MARKETING AND SALES ANALYTICS
GOOGLE VISION API
Powerfulimageanalysisthatenables:
• Logodetection• Landmarkdetection• OpticalCharacterRecognition• Faceandemotiondetection• Classificationofobjectsfromtrainstoanimals
GOOGLE VISION API
Scraped5,000+imagesfromtheNewEnglandPatriotsFacebookpage
Classifiedallpicturestounderstandbrand/sponsorpresenceonPatriotspage
EXAMPLE RESULTSDunkin’DonutsHighConfidence
Dunkin’DonutsLowConfidence
Snickers
Snapchat LordoftheRings Cancer
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
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
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
SPECIAL THANKS TO…
22Grace MeyerIsaac Petersen Josh Walker Bill Carney Paul Doetsch Roger Oberg