Intro to surveydown

Due: Sep 28 by 11:59pm

Weight: This assignment is worth 2.5% of your final grade.

Purpose: The purpose of this assignment is to get familiar with the surveydown survey platform, which we will be using to implement our surveys.

Submit: Commit and push your completed assignment to your course GitHub repository (see the “Submit” section at the end of this assignment).

Assessment: This assignment is graded using a check system:

  • ✔+ (110%): Responses show phenomenal thought and engagement with the course content. I will not assign these often.
  • ✔ (100%): Responses are thoughtful, well-written, and show engagement with the course content. This is the expected level of performance.
  • ✔− (50%): Responses are hastily composed, too short, and/or only cursorily engage with the course content. This grade signals that you need to improve next time. I will hopefully not assign these often.

Notice that this is essentially a pass/fail system. I’m not grading your writing ability and I’m not counting the number of words you write - I’m looking for thoughtful engagement. One or two sentences is not enough. Write at least a paragraph and show me that you did the readings assigned.

1. Get Organized

Open your course repo (madd-f26/madd-netID) in Positron using File > Open Folder… - open the folder itself, not a file inside it. If you haven’t cloned your course repo yet, follow the steps in HW1 first.

Everything for this assignment lives in the hw4 folder. Open the hw4.qmd file inside it - that’s the only file you need to edit. Take notes and write example code under the “Begin notes here” heading as you go through the readings and exercises below, then write your reflection under the “Reflection” heading at the end.

2. Readings

We will implement our project surveys using surveydown, which is a markdown-based platform for designing surveys. The platform allows you to use R or markdown code (just like you would in a .qmd file) to define everything you see in an online survey. While you will be editing a Quarto document, it renders into a Shiny app, which you can then use to administer your survey. We’ll dig into surveydown in class next week, and after that we’ll use it to build the conjoint surveys for your projects.

To get familiar with the platform, read the Getting Started and Basic Components documentation pages on the surveydown website. Take notes as you read the docs. You’ll also want to skim the Question Types and Conditional Logic pages for the next step.

3. Make a practice survey

For practice, build a survey of your own starting from one of the template surveys listed on the surveydown website. The default template will be the easiest to start from, but try another template if you are interested.

Important

Make your survey in a new folder in your hw repo for this week. Every surveydown survey should live in its own separate folder.

  1. If you haven’t already, install surveydown by running install.packages("surveydown") in the R console.
  2. Create a new survey from a template by running this in the R console, replacing the path with wherever you want your survey folder to go:
surveydown::sd_create_survey(
 template = "default",
 path = "path/to/my-practice-survey"
)
  1. Open the new survey folder in Positron (File > Open Folder…), then open the app.R file and click the “Run App” arrow button (or run shiny::runApp('app.R') in the R console). The survey will open in the Viewer pane - click the button to open it in your browser if you prefer.
  2. Make edits to the survey to personalize it. Choose a topic that you find interesting, then modify the survey so that it has at least:
    • Three questions, each using a different question type.
    • Two pages.
    • One piece of conditional logic (e.g., a question that only shows up, or a page that gets skipped, based on a previous answer).
    surveydown doesn’t always update a running survey when you save your changes - stop the app and run it again to see your edits.
  3. Take a screenshot of one page of your survey, save it in your hw4 folder, and insert it into your hw4.qmd file (e.g., ![](my-survey.png)). Below the screenshot, write a few sentences describing your survey topic and the questions, pages, and conditional logic you added.

4. Have an agent build a survey

Now let’s see what it’s like to have an agent build an entire survey from top to bottom. Using Claude Code in Positron (as we set up in HW1), you’re going to direct an agent to build a complete survey, then verify that it actually works.

  1. Make yet another new, empty folder in your hw repo folder for this week (e.g., my-agent-survey), and open it in Positron (File > Open Folder…).
  2. Open the terminal in Positron, run claude to start Claude Code (or a different agent), and ask it to build a complete surveydown survey about a topic of your choice. Be specific about what you want - the topic, the kinds of questions, how many pages, conditional logic, etc.. You might also point it to the surveydown documentation at surveydown.org so it knows how the platform works.
  3. When the agent says it’s done, run the app yourself and click through the whole survey. Does it run at all? Does every page show up? Do the questions and conditional logic behave the way you asked? If something is broken or not what you wanted, tell the agent and have it fix it.
  4. Take a screenshot of one page of the agent-built survey, save it in your hw4 folder, and insert it into your hw4.qmd file. Below the screenshot, write a few sentences about the experience: What prompt did you give it? What did it get right on the first try, and what did you have to ask it to fix? How did you check that it was working?

5. Reflect

Reflect on what you’ve learned while going through these readings and exercises. Is there anything that jumped out at you? Anything you found particularly interesting or confusing? How did building a survey yourself compare to having an agent build one? Write at least a paragraph in your hw4.qmd file, and include at least one question. The teaching team will review the questions we get and will try to answer them either in Slack or in class.

If you’re unsure where to start with a reflection, try filling out this template:

“I used to think ______, now I think ______ 🤔”

6. Submit

To submit your assignment, follow these instructions:

  1. Render your .qmd file by either clicking the “Preview” button in Positron or running quarto render in the terminal.
  2. Open the rendered html file and make sure it looks good! Is all the formatting as you expected?
  3. Commit and push your work using GitHub Desktop: look at the diff, write a short commit message, click Commit, then Push.
NoteRemember

Your work isn’t submitted until you’ve pushed it. Committing only saves the change on your own computer – go look at your repo on GitHub.com and confirm your work is actually there before you call this done.