Skip to content

have some thoughts here #1

Closed
Closed

Description

@timelyportfolio

I will be following along closely. I have some thoughts here. Do you have an idea for infrastructure or JavaScript libraries, templates, schema? Look forward to this project.

Activity

  1. daattali commented on Sep 8, 2015

    @daattali
    Owner

    Don't wait too eagerly; I have several other things I have to tend to before I'll start working on this :p This repo is like a strong TODO to force and remind me to work on this later.

    Feel free to share all your thoughts!

    I don't think I'll need to use any javascript. I still haven't decided on infrastructure, I haven't even settled on what the interaction should be like/what the exact functionality will be.

    The main gist as you imagine would involve the user supplying a list such as

    questions <- list(
      list(id = "name", type = "text", title = "Name",
        text = "What'd your momma give ya?", mandatory = TRUE),
      list(id = ..., type = ..., ...)
    )
    

    And then the package would take this list of questions, build the UI and also set up all the server-side logic. I might take advantage of some templating engine, do you have one in mind that works well with R?

    A few different options that I see for the main package functionality:

    • expose a function "createForm()" that creates a shiny app FILE (ie. literally it will write a app.R file) and the user can then go and edit that file or run it
    • expose a "runForm()" which will do exactly what the previous function did, but also run the app after creating the file (they can be the same function with just a parameter specifying whether to run the app after creating it or not)
    • as a very different approach, the user can create their own shiny app and have to call "createFormUI()" in the UI and "createFormServer()" in the server. Unless there's a better way to do this, to somehow make one call that will add code to both the UI and the server.

    A few initial issues that will need to be addressed:

    • storage: the user will need to specify where to store the responses, probably by passing some parameters to the main function
    • admin view: hopefully it will support specifying who's an admin and letting that user see all responses
    • make sure it's simple enough so that someone who doesn't know shiny can use it, but also make sure that people who know shiny can use this to create the skeleton of their survey but they can still edit the app extensively if they want
    • need to support both lazy and nonlazy evaluation of the content of questions. For example, I could have a question that reads paste0("As of right now ", Sys.time(), " are you hungry?") and in this case I would want Sys.time() to be evaluated when the shiny app actually runs. But in other cases I might want the call to be evaluated right away at the creation of the form

    This was just a dump of my very preemptive thoughts, feel free to chip in!

  2. daattali commented on Sep 8, 2015

    @daattali
    Owner

    Notes to self: two potential templating packages: whisker, infuser

  3. fozy81 commented on Nov 20, 2015

    @fozy81

    My thoughts are to use a save_form() function to save the arguments to a table/dataframe. Then use a open_form() function to read the values in the table and return various htmlwidget outputs. Then a save_results() to save inputs to table/dataframe.

    Worth thinking about all the possible arguments a form may need. There's an interesting standard http://xlsform.org/ (XForms) supported by open data kit. Be interesting if a form template could be based on an open standard.

    Good luck.

  4. daattali commented on Apr 2, 2016

    @daattali
    Owner

    @timelyportfolio @fozy81 I just spent a few hours on this today and got a basic minimalistic version working. See what you think

  5. daattali commented on Apr 3, 2016

    @daattali
    Owner

    closing this since I now have a working (very simple) package. Will open several issues for stuff that should be implemented

  6. timelyportfolio commented on Apr 5, 2016

    @timelyportfolio
    Author

    @daattali glad you are back at it. I'll post a separate issue to discuss my very preliminary thoughts to see if they mesh or supplement yours. I'll follow closely and try to get caught up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions