shiny.collections, Google Docs-like live collaboration in Shiny

[This article was first published on Appsilon Data Science Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

A few weeks ago, our CTO Marek Rogala gave an engaging talk at the User Conference in Brussels. Despite being one of the last talks, he drew a crowd that filled the room and had significant viewership online.

Marek’s talk was entitled shiny.collections: Google Docs-like live collaboration in Shiny. In short, he went over a package we built that allows for persistence and collaboration without losing reactivity in Shiny. Users can enter information and have continuity, knowing that if they exit and return to the app, their inputs will still be there.

Let’s go over his talk.

Recently, Shiny users have demanded more from their applications. The advent of cloud applications, especially ones like Google Docs, have accustomed users to collaboration. They expect their Shiny apps to be more than just an interactive tool for data visualisation, but rather, a production ready application that works like any other tool. Their data has to be saved automatically. Interactive collaboration is a must in some use cases. And the application must be delivered as fast as possible.

You need to use a reactive database such as rethinkDB, Firebase, or mongoDB to achieve this. mongoDB isn’t really a reactive database, but there are ways where it can be used as one. We are going to use rethinkDB in our case. Also, we are going to use rethinker, which is a rethinkDB driver for R. But using rethinker is not the most ideal solution, as callback do not work very well with Shiny and it is quite painful to configure to our needs.

To get around this, we created our own package built upon rethinker called shiny.collections. It lets you easily connect to your shiny app and takes care of all of the trickiness involved. During his talk, Marek showed a live demo that involved creating a chat application. Check out how to do this yourself. I reccomend watching Marek first, as he has some valuable commentary you won’t find in the blog post.

This example is just a simple use case of what you can achieve with shiny.collections. We’ve made it a priority to make it convenient and easily integrable with other powerful tools, including DT, leaflet or rhandsontable.

Our goals for the future of this package include getting it on cran and diversifying the functionality of the API. Take a look at the our package and contribute. Get in touch with us for all of you other data science needs as well.

To leave a comment for the author, please follow the link and comment on their blog: Appsilon Data Science Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)