Public
Edited
Apr 28, 2023
Insert cell
Insert cell
viewof INPUT = Inputs.textarea({
rows: 24,
submit: true,
});
Insert cell
MAPPING = {
const forward = new Map();
const reverse = new Map();

for (const paragraph of INPUT.split(/\n\n\n/)) {
const [x, y] = paragraph.split(/\n\n/, 1);
forward.set(x, y);
reverse.set(y, x);
}
return { forward, reverse };
}
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