Public
Edited
Sep 6, 2022
1 fork
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marginRight: 150,
height: 600,
inset: 10,
x: { tickFormat: String, label: "NutriScore (higher is less nutritious) →" },
y: {
type: "log",
ticks: [0.3, 1, 3, 10, 30],
tickFormat: String,
label: "↑ Environmental impact"
},
color: { legend: true },
marks: [
// Plot.voronoi(data, {
// x: "NutriScore_Scaled",
// y: "Tot_env_100g_scaled",
// fillOpacity: 0.2,
// fill: "Colour"
// }),
Plot.dot(data, {
x: "NutriScore_Scaled",
y: "Tot_env_100g_scaled",
fill: "Colour"
}),
Plot.text(data, {
x: "NutriScore_Scaled",
y: "Tot_env_100g_scaled",
fill: "Colour",
text: "Aisle",
dx: 4,
textAnchor: "start"
})
]
})
Insert cell
Insert cell
d3.difference(data1.map(d => d.Aisle), data2.map(d => d.Aisle))
Insert cell
d3.difference(data2.map(d => d.Aisle), data1.map(d => d.Aisle))
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