340 likes | 444 Views
Building Applications in R. 16 th July 2013, LondonR. Richard Pugh, Commercial Director, rpugh@mango-solutions.com Andy Nicholls, Head of Consulting, anicholls@mango-solutions.com Chris Campbell, Senior Consultant, ccampbell@mango-solutions.com. Agenda. Introduction
E N D
Building Applications in R 16th July 2013, LondonR Richard Pugh, Commercial Director, rpugh@mango-solutions.com Andy Nicholls, Head of Consulting, anicholls@mango-solutions.com Chris Campbell, Senior Consultant, ccampbell@mango-solutions.com
Agenda Introduction Why Build Analytic Applications (with R)? Challenges, Learningsetc Some Case Studies Summary
Mango a Nutshell Premier R training and services company Private company founded in 2002 Headquartered in UK Global Team of ~70 and expanding Services: Training, Consulting, Application Development, Support and Validation
This Presentation … Was a training course: How to build analytic applications using R Then was a 4 hour presentation: Themes for building analytic application using R with lots of examples Now a 20 minute (+/- 1.96*SE) presentation: Things we’ve learnt when building analytic applications using R Ask me later if you are interested in the earlier versions!
Caveats I’m a statistician who knows R, but am more of a “user” than a “developer” For some of this, you could swap “in R” with “in any analytic technology”
Why Analytics? Analytics can help people answer all sorts of questions I believe there is no company in the world today who cannot benefit from analytics in some way More and more people are realising it
Why Build Analytic Applications? • 3 key reasons we see: • To deploy analytical tools to decision makers • To make an analysts life more efficient • To add rigour to an analysts workflow
Deploying Analytics Complex analytics shouldn’t be attempted by non-analysts BUT, adding analytics into a business process can mean more informed decisions can be made
Deploying Analytics • If we build an application which … • is easy for the decision maker to use • contains the correct analysis to apply • communicates analytical results in suitable manner • … this leads to some major benefits!
Benefits for the Analyst Benefits for the Decision Maker No need to wait for information Can perform “what if” analysis Decision not dependent on analyst availability Less need to perform often-repetitive tasks Comfortable that the “right” analysis is being run Can get on with more strategic things?
Why build Analytic Apps with R? • R is license free (^infrastructure) • R’s open nature means it can be readily integrated • R can be extended by the developer as needed • R is rapidly developed • R users are more “development-aware” (?)
Challenges, Learningsetc … This section contains some distilled messages for building analytic apps using R
Issue Tracking Requirements Quality Manual Project Mgment Behaviour Driven Dev Procedures Coding Standards StatET testthat roxygen2 mangoUtils Continuous Integration Code Review Review board Knowledge Mgment
Levels of Test R Java/Other System Test Via Target Interface Module Test Package Level Integration Test Unit Test Function level Class Level Continuous Integration
Mondelēz Coffee Optimiser Requirement: Coffee Optimisation Desktop Tool based on previous S+ application Technology: R, GTK+, RODBC What went well: GTK+ helped us to easily recreate the previous UI, MSI Installer helped What was tricky: Balancing conversion and extensions, Integration with third party optimiser
Modelling Evaluation Requirement: Web app to evaluate “PKPD” models Technology: R, Java, JSF, JavaScript, Oracle, … What went well: Clear API to R, R session balancing What was tricky: Performance of R based on constraints
Backtesting Application Requirement: Backtesting app for hedge fund Technology: R, MySql, C, VBA What went well: Users loved R, UI dropped, PDF reporting What was tricky: Devil was in the detail, storing data in .RData files
Non-Compartmental Analysis Requirement: “NCA” workflow tool Technology: R, R.Net, XAML, Infragistics, .NET What went well: Clear API between R and app, What was tricky: R.Net session management, amount of unit tests to write
Summary Building analytic applications can be highly valuable Some challenges in working in a multi-tech (read “multi-style-of-tech” and “multi-type-of-developer”) environment Requires lots of up front thinking (design, dev environment, training etc) If you’re planning to build an analytic app using R, we’d be happy to lend our experience …