3 ms·
Two approaches: 1. If you're interested in running a shiny server, use http://rstudio.github.io/shinydashboard/ http://rstudio.github.io/shinydashboard/! I hav
by earino 11y ago
Two approaches:
1. If you're interested in running a shiny server, use http://rstudio.github.io/shinydashboard/ http://rstudio.github.io/shinydashboard/! I have used it to build professional high quality dashboards VERY quickly.
2. You can use an API server like Domino's API end points or OpenCPU to expose R APIs and build the interface using JavaScript at plot.ly! This really can be incredibly elegant and you can do really neat dynamic dashboards.
- sandGorgon 11y agoThat is great to know! Is opencpu something you recommend for production? I'm just starting to work with analysts who work in R, and I have struggled with the question whether we should wrap existing R code as an api...or port to python. Low volume right now, so not really concerned with performance... But rather that can R deployment play nicely with things like supervisord,etc in production
- earino 11y agoWell, I really don't want to turn this into a sales pitch, but that's the exact use case for Domino's API endpoints. Check out http://support.dominodatalab.com/hc/en-us/articles/204173149-API-Endpoints-Model-Deployment http://support.dominodatalab.com/hc/en-us/articles/204173149... for an explanation. If you're interested, drop me an email and I can work up an example project for you. Exposing R algorithms as REST endpoints is exactly what it does quite well. As for OpenCPU, I know that the guy who wrote it, Jeroen Ooms is genuinely quite brilliant. I know it was his project during his PhD, and I don't know what his plans are for continuing to support it. It's up to you to determine what that means for your "production" needs.
- sandGorgon 11y agoInteresting. Did you post about this on /r/rprogramming There are lots of people who have rolled their own solutions for production deployment. Including nodejs !
- phillc73 11y agoI've also used Shiny to construct fairly complicated web apps, with dashboards (using shinydashboard). It's very good, up to a point. I keep banging my head against issues around persistent data storage and app customisation at a user level. Unless one pays for Shiny Server Pro, the free Shiny Server doesn't support user authentication. Hosting on shinyapps.io doesn't really support persistent user data, unless it's offloaded elsewhere such as Dropbox or a remote SQL database, which brings into play a bunch of security questions. Shiny is good, but not quite yet outstanding. I was really interested in an article I read recently about using jQuery.ui widgets and R to build interactive web app.[1] I'm keen to explore this as a potential way forward. [1] http://www.r-bloggers.com/creating-multi-tab-reports-with-r-and-jquery-ui/ http://www.r-bloggers.com/creating-multi-tab-reports-with-r-...
- sandGorgon 11y agoThat's interesting to know. The reason shinydashboard or something else a nice is because the data scientist can work on his own. Expecting him to learn js would be a dead end. I am willing to bet that he would rather use R api and excel to build a dashboard, rather than anything else.
- phillc73 11y agoIf you just want a personal or internal dashboard, then Shiny is a good solution, but you will need to deal with setting up and managing Shiny Server. If you don't care about the world viewing the dashboard, or can afford a small fee each month, then shinyapps.io is a decent solution. I just wanted to point out that there are limitations with this route, when the apps start to become more complex, with multiple users, various access permissions and personalisation requirements.
- earino 11y agoGreetings! So I made a small demo for you. If you go to https://app.dominodatalab.com/earino/d3_dashboard_demo/raw/6391b31027289d28710ac53a3c03172963d450e4/dashboard.html?inline=true https://app.dominodatalab.com/earino/d3_dashboard_demo/raw/6... you will see a very simplistic, d3 powered, R backed dashboard. It just draws a pie chart, a line chart, and a bar chart. Every 10 seconds, it polls an R API endpoint to get new data. The code for the R endpoint is https://app.dominodatalab.com/earino/d3_dashboard_demo/view/handler.R?commitId=d12a60ba636b16e3a8acfd2fb3cd8f2839910ebd https://app.dominodatalab.com/earino/d3_dashboard_demo/view/.... It's a simple R function which generates synthetic data. It could be used to pull much more complex data, generate predictions from an ML model, etc... Please don't hesitate to reach out if you have any questions!