surveydown

Software
Survey
An open-source survey platform using , Quarto, Shiny, and PostgreSQL.
Authors
Published

March 1, 2025

Paper

Journal Paper - PLOS One 2025

Hu, P., Bunea, B., & Helveston, J. P. (2025). surveydown: An open-source, markdown-based platform for programmable and reproducible surveys. PLOS ONE, 20(8), e0331002. https://doi.org/10.1371/journal.pone.0331002

Abstract

This paper introduces the surveydown survey platform. With surveydown, researchers can create surveys that are programmable and reproducible using markdown and R code, leveraging the Quarto publication system and R Shiny web framework. While most survey platforms rely on graphical interfaces or spreadsheets to define survey content, surveydown uses plain text, enabling version control and collaboration via tools like GitHub. The package renders surveys as interactive Shiny web applications, allowing for complex features like conditional skip logic, dynamic question display, and complex randomization. The package supports a diverse set of question types and formatting options and users can leverage Shiny’s powerful reactive programming model to create a wide variety of interactive features. As an open-source platform, surveydown provides researchers full control over their survey implementation, including the survey application as well as where and how the resulting response data are stored. Workflows are entirely reproducible and integrate seamlessly with existing workflows for data collection and analysis in R.

Citation

If you use this package in a publication, please cite the PLOS One article associated with it! You can get the citation information by typing citation("surveydown") into R, or copying below.

citation("surveydown")
NoteSuggested citation

Hu, P., Bunea, B., & Helveston, J. P. (2025). surveydown: An open-source, markdown-based platform for programmable and reproducible surveys. PLOS ONE, 20(8), e0331002. https://doi.org/10.1371/journal.pone.0331002

Bibtex

@Article{,
  title = {surveydown: An open-source, markdown-based platform for programmable and reproducible surveys},
  author = {Pingfan Hu and Bogdan Bunea and John Paul Helveston},
  journal = {PLOS One},
  year = {2025},
  volume = {20},
  number = {8},
  doi = {10.1371/journal.pone.0331002}
}

Overview

surveydown is a flexible, open-source platform for making programmable, markdown-based surveys with , Quarto, Shiny, and PostgreSQL.

The package deployment site can be accessed here.

Here’s how it works:

  1. Design your survey as a Quarto document using markdown and R code.
  2. Render your survey into a Shiny app that can be hosted online and sent to respondents.
  3. Store survey response data in a PostgreSQL database. We recommend Supabase as a free, secure, and easy to use option.

The surveydown package provides functions to bring this all together.

See Documentation to get started making your own surveydown survey!

See Templates for a variety of templates!

Motivation

Most survey platforms use graphic interfaces or spreadsheets to define survey content, making version control, collaboration, and reproducibility difficult or impossible. Surveydown was designed to address these problems. As an open-source, markdown-based platform, all survey content is defined using plain text (markdown and R code) in two files:

  • survey.qmd: A Quarto document that contains the survey content (pages, questions, etc).
  • app.R: An R script defining a shiny app that contains global settings (libraries, database configuration, etc.) and server configuration options (e.g., conditional page skipping / conditional display, etc.).

This approach makes it easy to reproduce, share, and version control your surveys with common tools like Git. And since all survey data is stored in a PostgreSQL database, you have total control over where your survey data lives. We recommend Supabase as a free, secure, and easy to use option.

Usage

To start using surveydown, you need both and Quarto installed on your computer. We also recommend working with an IDE that has good support for , Quarto, and Shiny. RStudio is great, and we also like Positron and VSCode.

You can install surveydown from CRAN in your console:

install.packages("surveydown")

Or you can install the development version from GitHub:

# install.packages("pak")
pak::pak('surveydown-dev/surveydown')

Load the package with:

library(surveydown)

License

See the License page on the source code repository.