surveydown is an open-source R package (MIT, on CRAN) for programmable surveys written in markdown and R, built on Quarto and shiny. It stores respondent data in a PostgreSQL database.
surveyframe is a free R package (MIT, on CRAN) for the whole research workflow around a survey: the questionnaire and its analysis plan, the collection, the checks, the planned analyses and the APA 7 report.
What the surveyframe workflow provides
- An analysis plan written before the data, with hypotheses and decision rules, saved in the questionnaire file.
- A pre-analysis plan to submit to OSF, Zenodo or an ethics committee.
- A hash anyone can check at surveyframe.org/verify, and amendments recorded with their reasons.
- Quality checks, scale reliability, the planned analyses and a report in APA 7, in SurveyStudio or in R.
Using surveydown with surveyframe
You can collect responses with surveydown and analyse them with
surveyframe. Describe the questionnaire as a surveyframe instrument,
then prepare the export so that read_responses() can check
it against the instrument:
- Read the responses from your PostgreSQL database into a data frame, as surveydown’s documentation shows.
- Give each question in surveydown the id of the matching surveyframe item, or name each column by its item id after reading.
- Declare any column outside the instrument, such as the session id or
the time, in
meta_cols.
raw <- data # the responses read from your database
names(raw) <- c("submitted", "visit_type", "satisfaction") # each column named by its item id, in order
raw$visit_type <- c("First visit" = "first", "Returning" = "returning")[raw$visit_type] # answer text to choice codes, where needed
responses <- read_responses(raw, instrument, meta_cols = "submitted")
results <- run_analysis_plan(responses, instrument)The planned analyses and the report then run on these responses.