Quarto Surveys #6975
Replies: 7 comments 23 replies
-
You could use/leverage Note that Observable could possibly be use for that purpose. PS: what's the feature request exaclty? It seems to be more of a "Show and Tell" thing, isn't it? |
Beta Was this translation helpful? Give feedback.
-
@jhelvy Cool idea! One thought would be to encapsulate the functionality that you describe, potentially using the tools suggested by @mcanouil , into a project extension. I'd gladly use |
Beta Was this translation helpful? Give feedback.
-
Great stuff folks! @mcanouil Yeah I wasn't really sure how to classify this. It's not quite "Show and Tell" because I don't really have anything to show yet. I mostly just wanted to put the idea out there to get feedback from folks who may have done something similar. So it's not quite a feature request either, but more like a request for advice and ideas. There are a lot of ways I think you could put something like this together. It sounds straightforward enough in premise, but actually implementing it smoothly would take a lot of careful thinking. One basic survey concept is flow control (e.g. using responses from certain questions to control skip forward logic, like screening someone out of the survey by skipping to the end. It's not so obvious how one might implement that. One thought was to have multiple "surveys" as separate .qmd files and then tie them together with a @jimjam-slam Amazing examples here! This gives me a little more hope for the idea of using a Google sheet as the database. Like, I'm sure we could come up with some super fancy db solution, but the users I have in mind here are people who want to focus their time on designing the survey experiment and as little time as possible setting up a db. They also want to be able to download their data as a csv when it's all done. That's it. Google sheets is something simple that everyone understands, plus most surveys aren't capturing thousands of responses, so data sizes tend to be rather management - certainly within the limits of a Google sheet. I haven't worked much at all with Observable or javascript, so I'm not sure really where to start with doing something porting https://surveyjs.io/ as a Quarto extension. Though for sure I've seen surveyjs before and it looks absolutely beautiful. Anyone out there with javascript skills want to see how that might work? Again, my goal would be to make the UI as simple as possible for a user to design their survey. Ideally they can insert code chunks to define different types of questions (like my demo above). |
Beta Was this translation helpful? Give feedback.
-
Alright, with a little GPT help I'm starting to get a somewhat working prototype. Amazing that this is actually working, but it's far from complete. My biggest challenge right now is I'm trying to incorporate page breaks in shiny, and it's not beautiful. Just like in |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, writing with some updates on this idea. First, I managed to come up with a working version of this general idea in R here. If you look at the survey.qmd file, you'll see that I set it up as a Quarto qmd file with So, the idea can work. And if I compile these functions into a {surveydown} package, it should be readily usable by others. It needs some love for sure though. Could use some CSS, and the database part is still empty. I actually was able to get a version to work with writing to googlesheets, but I'm not super happy with it. I'm just too worried about multiple users and conflicting writing, etc. I'm thinking of connecting to something like supabase since it's open source. If anyone has thoughts / ideas on how to improve this little demo, please let me know! Eventually I'd like to create the package, but I'm waiting until I'm happy with the overall structure, and until I have a functioning database backend. One other thing that looked super promising is the multi-page survey wizard python shiny app. It's very pro looking, but I'm not sure if something like this could be built out in python using Quarto with |
Beta Was this translation helpful? Give feedback.
-
What if I used other headers inside the page, like this:
Would I get a section with id "welcome" then another section with id "title"? If I were to use this approach to denote pages, then ideally all of the content from the first |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone for the thoughts on this earlier this year. We worked over the summer on building this out, an I'm pretty happy with how it came out: https://surveydown.org/ We've pulled together Quarto, shiny, and supabase in an R package called {surveydown} that achieves a pretty nice platform for building reproducible, markdown-based surveys. |
Beta Was this translation helpful? Give feedback.
-
Description
I do a lot of online survey work, and I am not satisfied with any of the platforms out there. Very few have the capability of defining surveys that allow you to run code in the background (formr is the only one I know of), and I haven't seen any where you can define the survey content using markdown. I think Quarto is extremely well-positioned to fill a massive gap in online survey development.
I wrote up some ideas in this blog post, though it's a little out-dated now. In general, my thought is to use
{shiny}
functions to define forms, and Quarto to render everything together into a web page that displays the survey content. The only piece missing is some sort of backend that writes the form responses to a database. As a simple starting point, we could just use Google sheets to store responses. I've built shiny apps where I've used Google sheets as a hacky database, and it worked surprisingly well. The whole thing could just render to a shiny app actually, with Quarto just defining the UI. The goal would be for a user to use a simple syntax to define and preview their survey content, things like using---
to define a page break (similar to new slides in Quarto revealjs), etc. Below is a really simple demo of what I have in mind, which renders to thisUltimately this may be a separate package that uses Quarto (like I wrote in my blog post, maybe a
{surveydown}
R package). But I wanted to see if this might spark other ideas on ways to possible build something like this before I spent more time on it.Beta Was this translation helpful? Give feedback.
All reactions