Public
Edited
Jun 4, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
x: {tickFormat: Math.abs, label: "# of responses", labelArrow: false, domain: [-3, 8]},
fy: {label: null},
color: {domain: likert.order, scheme: "RdBu", legend: true},
marginLeft: 100,
marks: [
Plot.barX(
survey1,
Plot.groupZ({x: "count"}, {fy: "Question", fill: "Response", ...likert})
),
Plot.ruleX([0])
]
})
Insert cell
Plot.plot({
x: {tickFormat: Math.abs, label: "# of responses", labelArrow: false, domain: [-3, 8]},
fy: {label: null},
color: {domain: likert.order, scheme: "RdBu", legend: true},
marginLeft: 100,
marks: [
Plot.barX(
survey2,
Plot.groupZ({x: "count"}, {fy: "Question", fill: "Response", ...likert})
),
Plot.ruleX([0])
]
})
Insert cell
likert = Likert([
["Strongly Disagree", -1],
["Disagree", -1],
["Undecided", 0],
["Agree", 1],
["Strongly Agree", 1]
])
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