jhelvy / surveydown

An attempt to build a markdown-based survey platform using Quarto & Shiny
12 stars 1 forks source link

How to run surveydown? #2

Closed chris-english closed 1 month ago

chris-english commented 1 month ago

Wishing to test, but how to 'run' the fences branch? Have cloned and now would like to see it in action... Sorry, testers really should know more.

jhelvy commented 1 month ago

Oh cool, welcome! Yes if you download the latest of the fences branch, just open the surveydown.Rproj file to open RStudio, then open the survey.qmd file. You should just be able to click the "Run Document" button at the top. You need to have the {shiny} and {shinyjs} packages installed, but otherwise it should hopefully work.

chris-english commented 1 month ago

And if I am completely a terminal user?

chris-english commented 1 month ago

Sorry again, as Carl Witthoft said in an SO comment, LMGTFY, 'let me google that for you', and I can do that or finally install RStudio for certain purposes.

jhelvy commented 1 month ago

there's some good documentation on how to run documents here. I've never tried it from terminal but should work.

chris-english commented 1 month ago

You LMGTFY faster than I do. Using your provided Run Quarto Options above

library(quarto)
> list.files()
[1] "data.csv"         "functions.R"      "nav.js"           "split_pages.lua" 
[5] "survey_files"     "survey.html"      "survey.qmd"       "surveydown.Rproj"
[9] "todo.md"         quarto_serve('survey.qmd')

<---snip during quarto build--->
Output created: survey.html
Listening on http://127.0.0.1:5335

Or from command line

quarto serve document.qmd

working. I'm looking at clinical trial neuropsych scales and am glad I stumbled over your discussion over at Quarto, thence here. I'll play around.

jhelvy commented 1 month ago

Cool, glad you were able to get this running. I'll say that this is very much a work in progress, and as a functional tool it's far from ready. The biggest issue is saving the data to a database somewhere. Right now as a simple demo it just dumps the data into a csv. I'm debating about which backend to set up. Using something simple like Googlesheets is actually possible, but I'm worried about conflicts across multiple users, and so I'm also considering an open source alternative like supabase, which looks simple enough for users to sign up for. I'm trying to strike a balance where users with zero database experience can still set up a survey and easily get access to their data.

In the meantime, if you're looking for a tool to use right now, I'd suggest formr.org. It's a little clunky, but quite robust and I've used it for several survey-based studies. It allows you to define survey elements using R code as well, but inside a Googlesheet (the clunky bit). Still, it works, and it allows you to make some rather complex surveys. My goal with surveydown is to make a much nicer UI from a survey designer perspective to make surveys that do about as much as formr. I also want the ability to have a stand alone app for my survey (hence a shiny app) rather than having to create an account with some service like Qualtrics or formr even. I want total control over my app and my data.