Published
Edited
Nov 11, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// A simple plot would be nice here but it keeps sorting my gebieden alphabetically, need to fix that
Plot.plot({
marginLeft: 150,
grid: true,
label: null,
color: {
type: "categorical",
range: colors
},
facet: {
data: selectedBBGAdata,
y: "label_kort",
marginRight: 175,
label: null
},
marks: [
// Plot.frame(),
Plot.barX(selectedBBGAdata, {
y: "gebied",
x: "waarde",
fill: "gebied"
// sort: { y: "x" }
})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
import { addTooltips } from "@mkfreeman/plot-tooltip"
Insert cell
// I haven't figured out how to give a parameter to a viewof yet.
colors = [
"rgb(186,36,98)",
"rgb(238,122,45)",
"rgb(140,92, 31)",
"rgb(120,215,122)",
"rgb(149,3,213)",
"rgb(255,191,41)",
"rgb(33,115,153)",
"rgb(254,102,114)",
"rgb(191,190,190)"
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { aq, op } from "@uwdata/arquero"
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