Building a web app on top of R 
Christian Mladenov, CEO
Why?
This happens quite often
This happens quite often 
Decision maker
This happens quite often 
Ad-hoc 
request 
Decision maker
This happens quite often 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
This happens quite often 
Runs code 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
This happens quite often 
Generates 
Runs code report 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
This happens quite often 
Reads report 
Generates 
report 
Runs code 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
Reads report 
Generates 
report 
Runs code 
Requests 
changes 
This happens quite often 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
Adjusts 
parameters 
Reads report 
Generates 
report 
Runs code 
Requests 
changes 
This happens quite often 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
Adjusts 
parameters 
Reads report 
Generates 
report 
Runs code 
Requests 
changes 
This happens quite often 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
Adjusts 
parameters 
Reads report 
Generates 
report 
Runs code 
Requests 
changes 
This happens quite often 
Ad-hoc 
request 
Develops 
analytics 
code 
Decision maker 
Data scientist
Problem in large organizations
Problem in large organizations 
Manual loop wastes time
Problem in large organizations 
Manual loop wastes time 
Slower and less 
capable decision 
making
Problem in large organizations 
Manual loop wastes time 
Slower and less 
capable decision 
making 
Inefficient data 
science
Problem in large organizations 
Manual loop wastes time 
Slower and less 
capable decision 
making 
Inefficient data 
science 
€20M+ annual loss in a 2000-people 
organization
Solution
Solution 
Self-service analytics web apps
Solution 
Self-service analytics web apps 
Decision makers 
get better 
insights, faster
Solution 
Self-service analytics web apps 
Decision makers 
get better 
insights, faster 
Data scientists 
can focus on 
new knowledge
How?
Statistical languages
Statistical languages
Statistical languages
Statistical languages
R solutions
R solutions 
RStudio Shiny
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc)
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc) 
Remote R: OpenCPU, rServe, rApache, httpuv
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc) 
Remote R: OpenCPU, rServe, rApache, httpuv 
Integrated R: rJava, rpy2, RinRuby
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc) 
Remote R: OpenCPU, rServe, rApache, httpuv 
Integrated R: rJava, rpy2, RinRuby 
Native (local or remote R)
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc) 
Remote R: OpenCPU, rServe, rApache, httpuv 
Integrated R: rJava, rpy2, RinRuby 
Native (local or remote R) 
RGtk2, tcltk, Excel+VBA
R solutions 
RStudio Shiny 
Custom web app (Python, Ruby, etc) 
Remote R: OpenCPU, rServe, rApache, httpuv 
Integrated R: rJava, rpy2, RinRuby 
Native (local or remote R) 
RGtk2, tcltk, Excel+VBA 
Intuitics
Comparison 
RStudio Shiny Intuitics
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable 
Active community
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable 
Active community 
RMarkdown integration
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable Not only R (import/export) 
Active community 
RMarkdown integration
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable Not only R (import/export) 
Active community Long-running computations 
RMarkdown integration
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable Not only R (import/export) 
Active community Long-running computations 
RMarkdown integration Save and share app snapshots
Comparison 
RStudio Shiny Intuitics 
R framework + server. Server and 
interface built with code locally 
Web platform. Stateless R 
functions, interface built with 
drag & drop 
Cloud + on-premise Cloud + on-premise. REST API 
Same development environment Code needs to be imported 
Highly customizable Not only R (import/export) 
Active community Long-running computations 
Save and share app snapshots 
Export, dashboards, recurring 
reports 
RMarkdown integration
Demonstration
Background
Background 
FMCG company
Background 
FMCG company 
Forecasting script in R with parameters:
Background 
FMCG company 
Forecasting script in R with parameters: 
Country & product (build a model based on newest data)
Background 
FMCG company 
Forecasting script in R with parameters: 
Country & product (build a model based on newest data) 
Next 3 months: price, marketing budget, # of pages in 
catalog, competition strength
Background 
FMCG company 
Forecasting script in R with parameters: 
Country & product (build a model based on newest data) 
Next 3 months: price, marketing budget, # of pages in 
catalog, competition strength 
Monthly forecast cycle: many what-if scenario 
runs
Background 
FMCG company 
Forecasting script in R with parameters: 
Country & product (build a model based on newest data) 
Next 3 months: price, marketing budget, # of pages in 
catalog, competition strength 
Monthly forecast cycle: many what-if scenario 
runs 
Aim: turn the script into an interactive app
Steps 
1. Split R script into functions to allow 
interactivity 
2. Create interface that links functions 
3. Share a snapshot with a colleague
Thank you! 
! 
! 
Christian Mladenov 
christian@intuitics.com 
! 
www.intuitics.com 
@intuitics 
facebook.com/intuitics

Christian Mladenov @ Intuitics

  • 1.
    Building a webapp on top of R Christian Mladenov, CEO
  • 2.
  • 3.
  • 4.
    This happens quiteoften Decision maker
  • 5.
    This happens quiteoften Ad-hoc request Decision maker
  • 6.
    This happens quiteoften Ad-hoc request Develops analytics code Decision maker Data scientist
  • 7.
    This happens quiteoften Runs code Ad-hoc request Develops analytics code Decision maker Data scientist
  • 8.
    This happens quiteoften Generates Runs code report Ad-hoc request Develops analytics code Decision maker Data scientist
  • 9.
    This happens quiteoften Reads report Generates report Runs code Ad-hoc request Develops analytics code Decision maker Data scientist
  • 10.
    Reads report Generates report Runs code Requests changes This happens quite often Ad-hoc request Develops analytics code Decision maker Data scientist
  • 11.
    Adjusts parameters Readsreport Generates report Runs code Requests changes This happens quite often Ad-hoc request Develops analytics code Decision maker Data scientist
  • 12.
    Adjusts parameters Readsreport Generates report Runs code Requests changes This happens quite often Ad-hoc request Develops analytics code Decision maker Data scientist
  • 13.
    Adjusts parameters Readsreport Generates report Runs code Requests changes This happens quite often Ad-hoc request Develops analytics code Decision maker Data scientist
  • 14.
    Problem in largeorganizations
  • 15.
    Problem in largeorganizations Manual loop wastes time
  • 16.
    Problem in largeorganizations Manual loop wastes time Slower and less capable decision making
  • 17.
    Problem in largeorganizations Manual loop wastes time Slower and less capable decision making Inefficient data science
  • 18.
    Problem in largeorganizations Manual loop wastes time Slower and less capable decision making Inefficient data science €20M+ annual loss in a 2000-people organization
  • 19.
  • 20.
  • 21.
    Solution Self-service analyticsweb apps Decision makers get better insights, faster
  • 22.
    Solution Self-service analyticsweb apps Decision makers get better insights, faster Data scientists can focus on new knowledge
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc)
  • 31.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc) Remote R: OpenCPU, rServe, rApache, httpuv
  • 32.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc) Remote R: OpenCPU, rServe, rApache, httpuv Integrated R: rJava, rpy2, RinRuby
  • 33.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc) Remote R: OpenCPU, rServe, rApache, httpuv Integrated R: rJava, rpy2, RinRuby Native (local or remote R)
  • 34.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc) Remote R: OpenCPU, rServe, rApache, httpuv Integrated R: rJava, rpy2, RinRuby Native (local or remote R) RGtk2, tcltk, Excel+VBA
  • 35.
    R solutions RStudioShiny Custom web app (Python, Ruby, etc) Remote R: OpenCPU, rServe, rApache, httpuv Integrated R: rJava, rpy2, RinRuby Native (local or remote R) RGtk2, tcltk, Excel+VBA Intuitics
  • 36.
  • 37.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally
  • 38.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop
  • 39.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise
  • 40.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API
  • 41.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment
  • 42.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported
  • 43.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable
  • 44.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Active community
  • 45.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Active community RMarkdown integration
  • 46.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Not only R (import/export) Active community RMarkdown integration
  • 47.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Not only R (import/export) Active community Long-running computations RMarkdown integration
  • 48.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Not only R (import/export) Active community Long-running computations RMarkdown integration Save and share app snapshots
  • 49.
    Comparison RStudio ShinyIntuitics R framework + server. Server and interface built with code locally Web platform. Stateless R functions, interface built with drag & drop Cloud + on-premise Cloud + on-premise. REST API Same development environment Code needs to be imported Highly customizable Not only R (import/export) Active community Long-running computations Save and share app snapshots Export, dashboards, recurring reports RMarkdown integration
  • 50.
  • 51.
  • 52.
  • 53.
    Background FMCG company Forecasting script in R with parameters:
  • 54.
    Background FMCG company Forecasting script in R with parameters: Country & product (build a model based on newest data)
  • 55.
    Background FMCG company Forecasting script in R with parameters: Country & product (build a model based on newest data) Next 3 months: price, marketing budget, # of pages in catalog, competition strength
  • 56.
    Background FMCG company Forecasting script in R with parameters: Country & product (build a model based on newest data) Next 3 months: price, marketing budget, # of pages in catalog, competition strength Monthly forecast cycle: many what-if scenario runs
  • 57.
    Background FMCG company Forecasting script in R with parameters: Country & product (build a model based on newest data) Next 3 months: price, marketing budget, # of pages in catalog, competition strength Monthly forecast cycle: many what-if scenario runs Aim: turn the script into an interactive app
  • 58.
    Steps 1. SplitR script into functions to allow interactivity 2. Create interface that links functions 3. Share a snapshot with a colleague
  • 59.
    Thank you! ! ! Christian Mladenov christian@intuitics.com ! www.intuitics.com @intuitics facebook.com/intuitics