sdstudiosurveydown Surveys
Pingfan Hu, PhD Candidate at George Washington University, advised by Dr John Helveston.
Research field: Sustainable transportation
Research focuses:
For more infomation, visit pingfanhu.com
surveydown

Prof. John Helveston




❌ Reproduciblity
❌ Version control


❌ Reproduciblity
❌ Version control
❌ Limited features
❌ Open source
code?✅ Reproducibility
✅ Version control
✅ Lots of features
✅ Open source
surveydown!
What is surveydown?
How does it work?
What can I do with it?
What’s next?
surveydown?


qmd file
Markdown + R code chunks

qmd file
Markdown + Python code chunks


survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...
survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...YAML header for a “clean” output
survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...Load the surveydown Package
survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...Use triple-dash marker (---)
to define survey pages
Quarto fences (:::) also OK:
::: {#welcome .sd-page}
Page content
:::
survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...Page content
sd_question() for survey questionssd_next() for page navigationsurvey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...
survey.qmd---
format: html
echo: false
warning: false
---
```{r}
library(surveydown)
```
--- welcome
# Welcome to `surveydown`!
```{r}
sd_question(
type = "mc",
id = "has_fav_hero",
label = "Do you have a favorite super hero?",
option = c(
"Yes" = "yes",
"No" = "no"
)
)
sd_next()
```
--- some_other_page
Other content...







surveydown surveysurvey.qmd
A Quarto doc defining the survey content (pages, texts, images, questions, etc).
app.R
An R script defining the survey Shiny app.

app.RRender survey.qmd as UI
Run the surveydown server



supabase.com
app.RStore credentials
Connect to the database
Pass connection to sd_server()

surveydown?
surveydown do?surveydown is feature-packed!
Question types
Conditional logic
text
textarea
numeric
mc
mc_multiple
mc_buttons
mc_multiple_buttons
select
slider
slider_numeric
date
daterange
text
mc_buttons

Conditional showing
Conditional skipping
Conditional stopping
sd_show_if()
sd_show_if()survey.qmdsurveydown.leaflet:

surveydown + LLMs
sdstudio!sdstudio::launch()








(Image here)
(Image here)
Local Mode vs Database Mode
Desktop View vs Mobile View
Survey preview
Response dashboard
PostgreSQL connection
Data file view & download