Giter Site home page Giter Site logo

appsilon / shiny.collections Goto Github PK

View Code? Open in Web Editor NEW
76.0 35.0 16.0 335 KB

This project is deprecated and no longer supported. (Google Docs-like live collaboration in Shiny)

Home Page: https://appsilon.github.io/shiny.collections/

License: Other

R 94.69% JavaScript 4.63% CSS 0.68%

shiny.collections's Introduction

This package is DEPRECATED and no longer supported. The reason are problems with drainConnection and lack of further support for rethinker

shiny.collections

Google Docs-like live collaboration in Shiny

shiny.collections adds persistent reactive collections that can be effortlessly integrated with components like Shiny inputs, DT::dataTable or rhandsontable. The package makes it easy to build collaborative Shiny applications with persistent data.

Source code

This library source code can be found on Appsilon Data Science's Github:
https://github.com/Appsilon/shiny.collections

How to install?

Note! This library is still in its infancy. Api might change in the future.

At the moment it's possible to install this library through devtools.

devtools::install_github("Appsilon/shiny.collections")

To install previous version you can run:

devtools::install_github("Appsilon/shiny.collections", ref = "0.1.0")

Example

Before running an example make sure that your RethinkDB is set-up and running. For installation and running guidelines you can visit RethinkDB docs.

library(shiny)

ui <- shinyUI(fluidPage(
  actionButton("click", "Add one"),
  DT::dataTableOutput("cars_data")
))

connection <- shiny.collections::connect()

server <- shinyServer(function(input, output) {
  cars <- shiny.collections::collection("cars", connection)

  observeEvent(input$click, {
    shiny.collections::insert(cars, list(name = "Sample name", value = sample(1:100, 1)))
  })
  output$cars_data <- DT::renderDataTable(DT::datatable(cars$collection))
})

shinyApp(ui = ui, server = server)

Talk

We are proud that shiny.collections gained a lot of interests at useR!2017 in Brussels. Here you can see a talk by Marek Rogala presenting two interesting use cases: https://goo.gl/mD1KfV .

How to contribute?

If you want to contribute to this project please submit a regular PR, once you're done with new feature or bug fix.

Changes in documentation

Both repository README.md file and an official documentation page are generated with Rmarkdown, so if there is a need to update them, please modify accordingly a README.Rmd file and run a build_readme.R script to compile it.

Troubleshooting

We used the latest versions of dependencies for this library, so please update your R environment before installation.

However, if you encounter any problems, try the following:

  1. Up-to-date R language environment

  2. Installing specific dependent libraries versions

    • shiny

      install.packages("shiny", version='0.14.2.9001')
      
  3. Make sure you open the connection outside the server function.

Future enhacements

  • CRAN release
  • More methods (allowing for batch insert, update, delete, etc)
  • Publications and subscriptions allowing to sync only part of the data in each Shiny session

Appsilon Data Science

Get in touch [email protected]

shiny.collections's People

Contributors

dokato avatar marekrogala avatar damianrodziewicz avatar

Stargazers

Mayank Agrawal avatar Asia Wang avatar Wen Yao avatar Ojok Brian Andrew avatar Ferran avatar NJU Computational Biology Group avatar Giovanni Colitti avatar Guillaume Jamet avatar フラジーク・ラジム avatar ZhangHao avatar  avatar Krystian Igras avatar  avatar Victor Perrier avatar HarryZhu avatar Jakob avatar  avatar Simon Roth avatar Elijah Adeoye avatar Adam Foryś avatar Tamas avatar  avatar tharangni avatar John Blischak avatar  avatar  avatar Chris Wróbel avatar luca avatar  avatar Phil Steinke avatar K avatar amrrs avatar Rob Gilmore avatar Vincent C Fulco avatar  avatar  avatar Dr. Gürol Canbek avatar Eduard Szöcs avatar Don avatar  avatar  avatar Philipp avatar James Blair avatar Burak Kutlu avatar  avatar  avatar Jonas Hansen avatar Lukas Burk avatar ChanYub Park avatar Romain Boulanger avatar  avatar Hongyuan Jia avatar Chung-Kai Sun avatar Shinya Uryu avatar Robin Browne avatar Abhik Seal avatar  avatar Roel Hogervorst avatar BK avatar Michael Sumner avatar Peter Meissner avatar Najko Jahn avatar Chris Ried  avatar Nathan Eastwood avatar Xianying Tan avatar Juha Lehtiranta avatar tdn avatar Devin Pastoor avatar Miguel Naranjo avatar Shaurita Hutchins avatar Max Todaro avatar Roberto Salas avatar timelyportfolio avatar nakamichi avatar  avatar Shows Le avatar

Watchers

Vincent C Fulco avatar  avatar timelyportfolio avatar James Cloos avatar Ricardo Rodrigo Basa avatar Pawel Rzymkiewicz avatar Paweł Burniak avatar Chris Wróbel avatar Adam Foryś avatar Olga Mierzwa-Sulima avatar  avatar Paweł Przytuła avatar Filip Stachura avatar HarryZhu avatar  avatar marundu avatar Jakub Nowicki avatar Michał Parkoła avatar Eduardo dos Santos Almeida avatar Xianying Tan avatar Pavel Demin avatar Janith Wanniarachchi avatar tdn avatar Wlademir avatar Pawan Rama Mali avatar Michał Maj avatar  avatar Douglas R. Mesquita Azevedo avatar James Allison avatar Milos Vilotic avatar Rabii Bouhestine avatar Johan Rosa avatar Marcin Dubel avatar  avatar Oriol Senan  avatar

shiny.collections's Issues

[Documentation request] Example app to collaboratively edit a dataset

Hi,

Just watched the UseR talk 2017 and was blown away 👍

The talk mentioned that the package could be used with rhandsontable and I was wondering if you could share an example that demonstrates that functionality?

I would like to make an app that would allow people to collaborate on a dataset.
Ideally, the app would list the tables present in the database in a live manner from which a user can select a dataset to edit. A user can upload a new dataset to the database and this would be instantly reflected in the app.

Thanks

Iain

scope of map function is not specificed

Warning: Error in empty_tibble: could not find function "map"
Stack trace (innermost first):
    46: empty_tibble
    45: cursor_to_tibble
    44: shiny::reactiveValues
    43: shiny.collections::collection
    42: server [/Users/showsle/R/Atwitter/server.R#2]
     1: runApp
Error in empty_tibble(column_names) : could not find function "map"

[BUG] Arguments mismatch in example app

When tried to run example app I got:

Warning: Error in $: $ operator is invalid for atomic vectors
Stack trace (innermost first):
    67: rethinker::r()$db(DEFAULT_DB)$table
    66: shiny.collections::insert

It seems that in the line below (in example/app.R)

shiny.collections::insert("cars", list(name = "Sample name", value = sample(1:100, 1)), connection)

cars should be collection not string.

[DOC] rethinkdb guide

IMHO it should be added in README how to set up rethinkdb before using shiny.collections.

Or at least some reference to the official website.

Unable to run example

> connection <- shiny.collections::connect()
Error in socketConnection(host, port, open = "w+b", blocking = TRUE) : 
  cannot open the connection
In addition: Warning message:
In socketConnection(host, port, open = "w+b", blocking = TRUE) :
  localhost:28015 cannot be opened

Installation Fail

I am trying to install shiny.collections with the following code.
devtools::install_github("Appsilon/shiny.collections")

However, I encounter the following error message.
Error: Failed to install 'unknown package' from GitHub:
Timeout was reached: Connection timed out after 10000 milliseconds

Thank you in advance for your response.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.