Public
Edited
Dec 20, 2022
Insert cell
Insert cell
sample
.trim()
.split("\n")
.map((l) => {
const [, i, ore, clay, obsidian, geode] = l.match(
/Blueprint (\d+): Each ore robot costs (\d+ ore). Each clay robot costs (\d+ ore). Each obsidian robot costs (\d+ ore and \d+ clay). Each geode robot costs (\d+ ore and \d+ obsidian)./
);
return { i: +i, ore, clay, obsidian, geode };
})
Insert cell
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