This page covers code methods for launching surveys, gathering human responses, and analyzing results. For interactive survey building, see Survey Builder. For Prolific recruitment, see Prolific studies. For email notifications and scheduled reminders, see Survey notifications.
How it works
Humanize the survey to generate a web-hosted version on Expected Parrot with a respondent link and an admin dashboard.
Share the respondent link with human participants (or recruit via Prolific).
Basic usage
.humanize() parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
human_survey_name | str | "New survey" | Display name on Coop |
survey_description | str | None | None | Optional description |
survey_alias | str | None | None | URL-friendly alias |
survey_visibility | str | "private" | "private", "public", or "unlisted" |
humanize_schema | dict | None | None | Controls question styling and optionality — see Humanize schema |
delivery_map | DeliveryMap | None | None | Maps delivery channels to agent trait columns; required for email notifications |
Return value
survey.humanize() returns a Scenario (dict-like) with these keys:
| Key | Description |
|---|---|
uuid | Human survey UUID — needed to fetch responses later |
respondent_url | Public link for respondents |
admin_url | Admin dashboard link |
name | Survey name |
n_responses | Response count (0 at creation) |
survey_uuid | UUID of the pushed survey object |
scenario_list_uuid | UUID of the pushed scenario list (if any) |
uuid — you need it to retrieve responses.
Previewing before deployment
Use.preview() to get a preview URL without creating a live survey:
With scenarios
When using scenarios, call.humanize() on a Jobs object (not directly on the survey). You must specify a scenario_list_method.
This example shows each respondent a different policy description and asks for their reaction:
Scenario list methods
| Method | Behavior |
|---|---|
"randomize" | Each respondent gets a random scenario (with replacement) |
"ordered" | Scenarios are assigned sequentially to respondents |
"loop" | Survey is expanded — every question is repeated for every scenario |
"single_scenario" | Exactly one scenario is used for all respondents (list must have length 1) |
- If you attach scenarios, you must specify
scenario_list_method. - If you specify a method, you must attach scenarios.
- Agents and models are not supported with humanize — the survey goes to real humans.
With agent lists (for email notifications)
Attach anAgentList via .by() to associate respondents with email addresses. Pass a DeliveryMap to tell Coop which agent trait holds the email address.
col_name must match the trait key that holds each respondent’s email address. Once deployed, use Survey notifications to send invitations, schedule reminders, and track delivery status.
Retrieving responses
Checking response count
Working with file upload responses
If your survey includes aQuestionFileUpload question, each response’s answer for that question is a list of file-info dicts. Use FileStore.from_file_upload_answer (single file) or FileStoreList.from_file_upload_answers (all files at once) to download and wrap them:
FileStore and FileStoreList objects behave like any other — you can inspect, filter, or pass them into further EDSL workflows.
QR code
Generate a QR code for the respondent link usingget_human_survey_qr_code(). Requires the qrcode library (pip install "edsl[full]" or pip install "qrcode[pil]").
