Public
Edited
Nov 24, 2022
Insert cell
Insert cell
data = FileAttachment("penguins.csv").csv({typed: true})
Insert cell
Plot.plot({
y: {
grid: true
},
color: {
legend: true
},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: "flipper_length_mm", fill: "sex"})),
Plot.ruleY([0])
]
})
Insert cell
g_filter_error_metrics_trans@4.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
g_filter_error_metrics
Insert cell
vowel_group = d3.groups(g_filter_error_metrics, d => d["vowel_name"]).map(([key, data]) => {
return [key, data]
})
Insert cell
vowel_group[0]
Insert cell
g_filter_error_metrics.reduce((acc, c) => {

return {
...acc,
[c["vowel_name"]]: [...acc[c["vowel_name"]], {}]
}
}, {})
Insert cell
metrics = {
let m = Object.keys(g_filter_error_metrics[0]);
m = m.filter(x => x.includes("F"));
return m;
}
Insert cell
Plot.plot({
width: 1200,
facet: {
data: g_filter_error_metrics,
x: "sex"
},
marks: [
Plot.barY(g_filter_error_metrics, {x: "vowel_name", y: metric})
]
})
Insert cell
viewof metric = Inputs.select(metrics, {label: "Select metric"})
Insert cell
g_filter_error_metrics_trans@4.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
g_filter_error_metrics_trans@2.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
g_filter_error_metrics_trans.columns

Insert cell
Plot.plot({
width: 1200,
marks: [
Plot.barY(g_filter_error_metrics_trans, {x: "metrics", y: vowel})
]
})
Insert cell
g_filter_error_metrics_trans.columns.map(v => (
Plot.plot({
width: 1200,
marks: [
Plot.barY(g_filter_error_metrics_trans, {x: "metrics", y: v})
]
})
))
Insert cell
viewof vowel = Inputs.select(g_filter_error_metrics_trans.columns, {label: "Select Vowel"})
Insert cell
h_filter_lpc_error_metrics@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Plot.plot({
width: 1200,
marks: [
Plot.barY(h_filter_lpc_error_metrics, {x: "metrics", y: vowel_hr})
]
})
Insert cell
viewof vowel_hr = Inputs.radio(h_filter_lpc_error_metrics.columns.filter(l => l.includes("M")), {label: "Select Vowel", value: "iy_M"})
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