Published
Edited
Oct 1, 2021
16 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = fetch("https://gutendex.com/books").then((d) => d.json())
Insert cell
Insert cell
wordCount = d3
.sort(
d3.rollup(
(book.split(/^Title:/m)[1] || book).split(/\W+/g),
d => d.length,
d => d
),
d => d[1]
)
.reverse()
Insert cell
selectedWords = wordCount
.filter((d) => d[0].length >= 5 && d[1] > 20)
.slice(0, 100)
.map(([word, frequency]) => ({ word, frequency }))
Insert cell
// see https://observablehq.com/@fil/hello-fflate
fflate = import("fflate")
Insert cell
import { CORS_PROXY } from "@fil/cors-proxy"
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