Visit our main site surveydown.org for more information!
Note: This is still an early-stage project. Use with caution, and please give us feedback!
This package helps you create markdown-based surveys with Quarto Shiny Documents. It brings together three open source technologies (Quarto, shiny, and supabase) to create dynamic, markdown-based surveys. Here’s the basic concept:
- Design your survey as a Quarto shiny document using markdown and R code.
- Render your doc into a shiny app that can be hosted online and sent to respondents.
- Store your survey responses in a supabase database.
The {surveydown} R package works in tandem with our surveydown Quarto extension to make everything work.
See the documentation to get started making your own surveydown survey!
Most survey platforms (e.g., Google forms, Qualtrics, etc.) use drag-and-drop interfaces to design surveys, making version control and collaboration with others difficult. They’re also not reproducible.
As an open-source, markdown-based platform, surveydown was designed to address these problems. In surveydown, all survey content is created with plain text (markdown and R code) in a single .qmd file that renders into a shiny app. This makes your survey easy to reproduce, share, and version control with common tools like Git. The resulting shiny app for each survey can be hosted on a number of platforms, like shinyapps.io or huggingface, and the survey data collected is owned by the survey designer in a supabase account. Best of all, everything is open source and free :)
If you’re curious where this whole idea came from, check out this blog post, which outlines more on the general idea and the motivation for it. The post is now outdated in terms of the overall design, but it provides something of an origin story and some of the motivation for developing this project.
This is a running list of things we’re working on adding to the project:
- show_if (conditionally display question)
- skip_if (conditionally skip to page)
- Set defaults for questions to not have any choices selected on launch.
- Ability to embed markdown inside choice options (like mc buttons in formr)
- Option for
preview = TRUE
(database is ignored) - Export timestamps on each page in the data
- Export timestamps on each question interaction (since this will
increase the data size considerably, maybe add this as
question_times = FALSE
argument) - Option to start at a designated page,
e.g.
start_page = 'page_name'
- A
show_all = TRUE
argument to show all the pages and hidden questions when launched (e.g. to be able to print out the entire survey text). Could also be calledprint_mode = TRUE
. - Set up SCSS to be compatible with Quarto-supported bootstrap themes
- Add an optional progress bar
- Include input checks for
skip_if
andshow_if
(question_id
exists, and data frame names are correct) - Required questions (
required = TRUE
): post a popup if a question is required before allowing next button. Default should berequired = FALSE
. - Add a
sd_get_data()
function so the survey designer can obtain the current survey results from inside the app: https://shinysurveys.jdtrat.com/articles/get-survey-data.html - Admin page w/password to preview / download data (see https://github.com/daattali/shinyforms)
- Ability to pass url parameters, e.g. for tracking users.
- Ability to redirect users to another url.
- Form validation: Make sure the user inputs the correct type depending on the question type. (see https://shiny.posit.co/r/reference/shiny/0.14/validate.html)
- Deal with cookies so users who close the browser can start back where they left off.
- Question types:
- Multiple choice (single choice)
- Multiple choice (multiple choices)
- Select
- Text
- Numeric
- Multiple choice (button…like formr mc_button)
- Text area
- Date
- Matrix
- Slider
Resources / other related examples:
If you use this package for in a publication, please cite it! You can
get the citation by typing citation("surveydown")
into R:
citation("surveydown")