Public
Edited
Jul 8, 2020
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof f = text({title: "No. of results", placeholder: "100", description: "Be kind to the API.", value: 100})
Insert cell
viewof r = text({title: "Search term", placeholder: "bicycles", description: "Search term to query.", value: "bicycle"})
Insert cell
Insert cell
Insert cell
rawdata = d3.json(url);
Insert cell
Insert cell
data = rawdata.items.map((d) => d);
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
placesCount = d3.nest()
.key(d => d.state)
.rollup(v => v.length)
.entries(data);
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tfidf = import("tiny-tfidf")
Insert cell
Insert cell
rawtext = data.map(data => data.ocr_eng);
Insert cell
uniqid = data.map(d => d.id);
Insert cell
Insert cell
useStopwords = true
Insert cell
Insert cell
customStopwords = []
Insert cell
Insert cell
corpus = new tfidf.Corpus(
uniqid,
rawtext,
useStopwords,
customStopwords
)
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
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
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