Back to Help
Export

Export Survey Data to Stata, R, and Python

Export responses, condition assignments, randomized display order, metadata, and documentation for analysis in Stata, R, or Python.

What Export Gives You

Export turns survey submissions into analysis files. Download CSV for scripts, Stata .dta for Stata 14+, SPSS .sav, or R .RData to load directly with load() — no haven or labelled package needed — and keep assigned conditions, quota fields, completion metadata, response-quality fields, and any randomized display order in the same download.

Open the Export tab after you have at least one test response. Standard, Pro, and Beta Tester plans include Export; the survey owner and collaborators allowed to view responses can use the response table, including collaborators on a survey shared directly from another person's personal workspace. Edit-only actions still follow each collaborator's role. Use it as a prelaunch audit: the exported file should tell the same story as the questionnaire, Flow diagram, quotas, and codebook.

Export: Data Output

Before Exporting

  1. Step 1: Open Preview. Complete at least one test response before relying on Export.

    Step 1: Open Preview

  2. Step 2: Check variables in Block Builder. Confirm question names and recodes are readable before live collection.

    Step 2: Check variables in Block Builder

  3. Step 3: Check Flow data. If the survey uses experimental conditions, verify that condition assignments are recorded as expected.

    Step 3: Check Flow data

  4. Step 4: Check randomization fields. Include ordering data when shuffled answers, rows, columns, sliders, or blocks affect interpretation.

    Step 4: Check randomization fields

  5. Step 5: Open Export. Use the Export tab to download the file and inspect headers.

    Step 5: Open Export

  6. Step 6: Back up before major edits. Download a backup before changing a live survey's wording, answer options, quotas, or conditions.

    Step 6: Back up before major edits

Data To Review

The Responses heading shows the number of submitted responses and, beside it, how many responses are pending — in-progress attempts that have not been submitted yet. Use the refresh button in the heading to fetch the latest submitted rows and pending count without reloading the editor. The response table includes every submitted response that matches the current source and quality filters. Response 1 is the earliest submission, and each response keeps that chronological number when you filter the table. The Submitted At (UTC) column shows when each response was submitted, in the same form as the column in every download. The table renders only the rows currently in view as you scroll, so large studies stay responsive without stopping at a short preview. If you turn on Rotate table, the same applies horizontally: every response remains available as a column, while only the columns near the viewport are rendered.

Media answers can be reviewed right in the table. Audio Response and Audio Conversation answers have a Play button and their transcript; a conversation plays every recorded turn in order, and Full transcript opens the whole exchange with a Play button for each recorded turn. Video Conversation answers with saved video have a Play video button that opens the recording in a window beside the transcript, a part at a time when the call was paused and resumed. Signatures show what was drawn, and file uploads have a download button. With Show as exported on, a column whose privacy setting changes it shows the value as it will be downloaded instead.

When the survey is linked to a CloudResearch Connect project created from Deploy → Recruitment, the table also has a CloudResearch column with each response's Connect status (Pending, Approved, or Rejected). You can approve or reject a person from their row, or approve every clean pending response at once from the bar above the table. See CloudResearch Connect.

Select a column heading to open its data summary. Counts, missingness, unique values, frequencies, and numeric statistics use every response that matches the active filters, including rows that are currently outside the scroll viewport. Numeric columns also show a density curve scaled to their observed distribution. The summary opens inside the table and scrolls with it, sized to the table's visible width; with Rotate table on, it opens beside the selected variable's name. Choose Return to data grid to continue reviewing individual responses.

Open Filter to build one or more rule groups. A group can require every rule or any rule, and multiple groups are combined so you can express searches such as “submitted this week, completed, and either treatment A or treatment B.” Available fields include response number and ID, submission time, completion or quota outcome, source, recruitment campaign or provider, personalized link, language, question answers, condition assignments, Flow variables, quality score and review details, browser and device fields, completion time, and reCAPTCHA fields when those columns exist. Text rules support equality, exclusions, contains, starts/ends with, answered, and missing; numbers support comparisons and ranges; dates support before/after/ranges plus recent-time presets; multi-answer questions support any, all, and exact matching.

Active rules appear as removable chips. You can duplicate a group, invert the complete result, or clear everything. Save frequently used combinations as named views; views are stored in this browser for this survey, and loading one applies it to the table, column summaries, bulk deletion review, and downloads. The table reports shown of total responses so the current scope is always visible. In a categorical summary, select a value label to add it as a filter; select the Missing statistic to show responses without a value. Numeric summaries include mean, median, standard deviation, minimum, maximum, quartiles, range, interquartile range, and the number of Tukey outliers.

  • Answers: responses from each question type, including open text, scale values, matrix rows, rankings, and specialized tasks.
  • Indicator columns: each Heatmap zone always exports as its own 0/1 column, named like question: Zone label. With Expand select-all questions as indicator columns on, multi-select questions also export one 0/1 column per option, and a Card Sort that allows a card in several categories exports one 0/1 column per card and category pair.
  • Condition picks: assigned arms for experimental condition sets and any assignment-relevant variables.
  • Randomized order snapshots: answer, row, column, slider, block, conjoint, or stimulus order when exported.
  • Quota-relevant variables: fields needed to understand sample targets, eligibility, and rerouting.
  • Completion data: every response has a Submitted At (UTC) timestamp in every export format, alongside status, end screen path, and any completion-code workflow allowed by the protocol.
  • Quality fields: response-quality score, flags, flag details, review source, review tags, rule matches, and cleaning action.
  • Metadata: respondent context available for the survey, plus fields needed for cleaning and reproducibility.
  • Privacy: under Options → Privacy, applied to every format (CSV, XLSX, SPSS, Stata, and R). Collapsed, it's one line saying who the file is for and what that removes, such as For the public · 10 columns removed · 1 rare-combination check, plus a warning if the file still identifies people or if some respondents would be easy to pick out. Most downloads need nothing more. Choose Review to change it:

    • Who is this file for? Just Me keeps everything as collected. My Research Team removes names, emails, signatures, uploads, and voice recordings, and turns panel and respondent IDs such as PROLIFIC_PID into coded IDs. Reviewers or Collaborators also scrubs personal info from open-ended answers and drops browser and device details. The Public also removes open-ended answers and hides rare combinations of demographic answers. Answers Only keeps just closed-ended answers, condition assignments, and computed variables.
    • Columns. Every column the file will contain is grouped into Survey Variables, Questions, Orderings, Device and Timing, Quality Review, and Response Source. Groups start collapsed and show what's been changed inside them. Each lists its flagged columns with the reason they're flagged — for example Asks for an email address or Looks like a panel or respondent ID — and the rest sit behind Show other columns. Groups with no data in this export are left out.
    • Treatments. For any column pick Keep; Broaden (numbers as ranges, dates as month or year, ZIP codes cut to 3 digits, or answers given by fewer than a few people grouped as "Other (grouped)"); Redact PII (open-ended answers: replaces email-, phone-, and SSN-shaped text, and optionally names, places, and organizations); Coded ID (replaces each value with a code like P-3F9A0C21B7E4); Mask (keeps the column, every value becomes anonymized); or Drop (leaves the column out). A question's entry covers all its columns, including paste, typing, and mouse tracking.
    • Coded IDs. The same original value gets the same code in every export from your team's surveys, so waves and datasets still link, but the code can't be turned back into the ID outside Domandata. Anyone who can view a survey's responses can produce the same codes, since they can already see the original values.
    • Rare combinations. The Rare Combos switch appears on demographic columns. It blanks those columns, only for respondents whose exact combination of answers is shared by fewer people than the minimum group size.
    • Risk check. Once responses load, the panel says how many respondents are the only one with their combination of demographic answers, measured on the values as they'll be exported. If that number isn't zero, broaden a column or turn on its rare-combination check.

    Turn on Show as exported above the response table to preview the file: dropped columns disappear, and masked, redacted, broadened, and coded values read as they will in the download. If a file meant for someone else still has a column that identifies people, the download asks first. Remove Them and Download drops those columns (or codes them, for panel IDs), and Download Anyway keeps them. Just Me downloads are never interrupted. Each survey remembers its own choices (the Export tab's and the replication packages' separately) for anyone who can edit it, and the panel shows when they're saved. Viewers can still change choices for their own downloads, but those aren't saved. If your team has set an export privacy minimum, looser choices are unavailable and the panel names the minimum; see Team Collaboration. For surveys that haven't saved their own choices yet, Workspace Settings → Default Export & Display → Privacy chooses where each place starts — Export tab downloads (Just Me unless changed), replication packages (The Public), and new GitHub Sync repos (Reviewers or Collaborators) — plus the default redaction strength, names-and-places scan, minimum group size, and pooling. Review and override each column's treatment directly in Export; Block Builder does not label questions as personal information.

These are the same controls GitHub Sync and replication packages use, though those start from stricter presets. To share a complete, documented package rather than a single file, use Download in the Citation & Replication card: it saves the full replication package as a .zip with the same privacy options, no repository account needed. See Preregister and Archive a Domandata Study.

Export: Data Output

Analysis Notes

Keep a codebook that explains question wording, answer recodes, condition arms, exclusions, and any mid-field changes. If you use randomized display order, decide whether order will be a control variable, diagnostic field, or audit field in your analysis. Order columns are included by default whenever a question randomizes its answer options or a block randomizes its questions (Include answer orderings and Include question sequence under Options → Orderings); turn on Include orderings for every question to add them for fixed-order items too. Your defaults for all three live in Settings. For multilingual projects, document respondent language and translation choices; see Multilingual Research Surveys.

After live launch, download backups before changing wording, answer options, quotas, Flow, or end screens. If you use quality review, archive the cleaning log with the raw export and codebook. If you pull data with scripts, compare API output with a manual export at least once; see Pull Survey Responses With the API and Troubleshoot API Response Pulls.

The privacy options change only the exported file — never what's stored — and they don't warn respondents as they type. Suggested flags come from question type, validation, and wording, so a column can be missed or flagged by mistake; review each group, or turn on Show as exported, before sharing. Redaction and the names-and-places scan are heuristics, not guarantees; spot-check free-text answers before wider distribution.

Export: Data Output

Open The File In Stata Or R

From the Export tab you can download a Stata .dta file with variable labels and value labels applied, an R .RData file, or a replication package that also includes Codebook.csv and an R script that loads the files. In Stata, open the .dta directly. In R, load("Responses.RData") gives you a responses data frame with real base-R factors and variable labels already applied — no package needed; use haven::read_dta("Responses.dta") instead only if your workflow specifically needs the Stata file. Randomized display-order columns stay in every format so you can control for or reconstruct order effects.

Every format holds the same columns in the same order with the same values: a looped question gets one column per round everywhere (including replication packages and the API), and any Privacy treatment chosen for a looped question — Drop, Mask, Coded ID, or Broaden — covers all of its rounds. Excel files store numeric answers, answer codes, timings, and counts as real numbers, while IDs, ZIP codes, and free text stay text so leading zeros are kept; Excel downloads include every response you filtered to and always apply your team's export privacy minimum. Respondents who never reached a conjoint, reaction-time, or tree-test question get blank cells rather than placeholder values. Long open-ended answers are kept in full in every format: SPSS stores answers over 255 bytes as long string variables, and Stata stores answers over 2,045 bytes as strL variables. Both open normally in SPSS, Stata, and R (haven). The one limit is SPSS's own maximum of 32,767 bytes per answer.

If you only need a codebook for labeling, download Codebook.csv or pull it from the API; see Survey Codebook in R and Pre-Analysis Files and Pull Survey Responses With the API.

Export: Stata, R, and codebook files

Related Help

Raw JSON downloads through the API or an AI assistant apply the same privacy choices to captured recruitment IDs and every round of looped questions. Saved broadening rules remain active as new responses arrive; values that cannot be broadened safely are marked withheld, rather than exported unchanged.

Frequently Asked Questions

How do I export survey data to Stata?

Open the Export tab and download the Stata .dta file or the replication package. Responses.dta includes variable labels and value labels, and you can also open it in R with haven::read_dta().

Does the export keep randomization order?

Yes. Randomized display order for questions, answers, rows, columns, sliders, blocks, and conjoint profiles is exported with the response so you can reconstruct what the respondent saw.

How do I get a survey codebook in R?

Download Codebook.csv with the export or replication package, or pull the codebook API. Pair it with the response file before you recode labels to values in R.