surveydown

repository·main·Indexed 41 days ago

https://github.com/surveydown-dev/surveydown

An open-source platform for creating programmable and reproducible surveys using markdown and R. It transforms Quarto documents into Shiny applications that store data in PostgreSQL databases, allowing surveys to be defined as plain text files for version control with Git.

Tokens
739
Snippets
1
Records
5
Agent score
2%

What's inside surveydown

  1. How surveydown surveys are structured

    main

    Unlike graphic-interface survey platforms, surveydown uses plain text files, making surveys easy to version control with Git. A typical survey consists of two primary files:

    • survey.qmd: A Quarto document containing the survey content (pages, questions, etc.).
    • app.R: An R script defining the Shiny app. This file contains global settings (such as loaded libraries and database configuration) and server configuration options (such as conditional skipping or display logic).
  2. What is surveydown?

    main

    surveydown is an open-source, markdown-based platform for creating programmable and reproducible surveys. It leverages a stack of R, Quarto, Shiny, and PostgreSQL (such as Supabase) to allow developers to define surveys as plain text, making them easy to version control with Git and share with others.

    The workflow consists of three main steps:

    1. Design: Create a Quarto document (survey.qmd) using markdown and R code to define pages and questions.
    2. Render: Convert the Quarto document into a Shiny app for online hosting and respondent interaction.
    3. Store: Save survey responses in a PostgreSQL database (Supabase is the recommended option).
  3. How surveydown survey files are structured

    main

    Unlike traditional survey platforms that use GUIs, surveydown uses two primary plain-text files to define a survey, enabling full version control and reproducibility:

    • survey.qmd: A Quarto document containing the survey content, such as pages and questions.
    • app.R: An R script that defines the Shiny application. This file contains global settings (libraries, database configuration) and server configuration options (e.g., conditional skipping or display logic).
  4. Install the {surveydown} R package

    main

    You can install the stable version of {surveydown} from CRAN or the development version from GitHub.

    To install from CRAN:

    install.packages("surveydown")

    To install the development version using pak:

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

    After installation, load the package and verify your version:

    library(surveydown)
    surveydown::sd_version()
    # Install from CRAN
    install.packages("surveydown")
    
    # OR install development version
    # install.packages("pak")
    pak::pak('surveydown-dev/surveydown')
    
    # Load and check version
    library(surveydown)
    surveydown::sd_version()