Public
Edited
Jul 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
meh = survey.histogram(sheet.questions.what_city_do_you_live_in_, {
limit: 8,
})
Insert cell
mehV = meh.value.selected
Insert cell
viewof seqQ = survey.questionSelector(remixSheet, {startIndex: 0, maxSelections: 1})
Insert cell
f2 = {
if (seqQ === null) return md`**Select a question to see a visualization.**`;
let str = survey.serveQuestion(seqQ).code;
// this is super shady!!!!!!!
let func = new Function(
"remixSheet",
"survey",
"return " + str.replace("sheet.", "remixSheet.")
);
let ret = func(remixSheet, survey);
return ret;
}
Insert cell
survey.serveQuestion(seqQ).code.replace("sheet.", "remixSheet.")
Insert cell
remixSheet = {
const {data, questions, multiseparator} = sheet

return {mehV, questions, multiseparator}
}
Insert cell
Insert cell
data = await FileAttachment("DVS_cleaned_survey_results_2019.csv").csv({type: true})
Insert cell
Insert cell
Insert cell
Insert cell
d3.csv(
"https://docs.google.com/spreadsheets/d/e/2PACX-1vS0Gy9RXOxFDpA233k88HJ6hpewVbFqu0Fu0zA0L_qaX6m2XoGqCGvNIQ6-AG9cRaHPLA_22MVrNWzw/pub?gid=1986684459&single=true&output=csv"
)
Insert cell
Insert cell
Insert cell
Insert cell
sheet = survey.processSheet(data)
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more