Public
Edited
Mar 31, 2024
1 fork
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.links().map(l => l.page())
Insert cell
Insert cell
html`${doc.html()}`
Insert cell
Insert cell
///
// DAVID!!! PLAY WITH THIS
//

doc.section(1).children()[0].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
doc.json()
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