Public
Edited
Nov 12, 2020
5 forks
Importers
17 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
doc = await wtf.fetch(page, lang)
Insert cell
Insert cell
doc.sentences()[0].text()
Insert cell
Insert cell
doc.sentence(0).links().map(l => l.page())
Insert cell
Insert cell
html`${doc.sentence().html()}`
Insert cell
Insert cell
doc.section(1).title()
Insert cell
Insert cell
Insert cell
Insert cell
html`<i>${doc.paragraph(0).text()}</i>`
Insert cell
printList(doc.paragraph(0).links().map(l=>l.page()))
Insert cell
Insert cell
printList(doc.categories())
Insert cell
Insert cell
doc.templates()
Insert cell
doc.templates('citation').length
Insert cell
doc.templates()[2]
Insert cell
Insert cell
Insert cell
Insert cell
printList(doc.section(0).links().map(p => p.page()))
Insert cell
Insert cell
{ //generate a list of templates, by each section
return doc.sections().reduce((h,s)=> {
h[s.title()||'Intro']= s.templates().map(t=> t.template )
return h
},{})
}
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