Published
Edited
Jan 5, 2022
1 fork
15 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
characters = matches.flatMap(word => Array.from(word, (c, i) => [i, c]))
Insert cell
matches = words
.filter((re => word => re.test(word))(new RegExp(green, "i")))
.filter((re => word => re.test(word))(new RegExp(`[${yellow.replace(/[.]/g, "") || "a-z"}]`, "i")))
.filter((re => word => !re.test(word))(new RegExp(`[${gray}]`, "i")))
.filter((re => word => !re.test(word))(new RegExp([...yellow.padEnd(5, ".")].map((c, i) => c === "." ? "_" : (a => (a[i] = c, a))(".....".split("")).join("")).join("|"), "i")))
Insert cell
words = d3.sort((await FileAttachment("words.csv").csv({array: true})).map(([word]) => word.toUpperCase()))
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