Published
Edited
Nov 29, 2021
11 forks
Importers
Insert cell
Insert cell
page = FileAttachment("https _en.wikipedia.org_wiki_List_of_municipalities_in_Ohio.htm").text()
Insert cell
Insert cell
table = (data) => {
let table = `<table>`
for(let i = 0; i < data.length; i = i + 1){
table = table + ` <tr> <td><a href = "${data[i].url}">${data[i].city}</a></td> <td>${data[i].population}</td> </tr> `
}
table = table + `</table>`
return table
}
Insert cell
html `${table(
data.filter(record => record.population > 100000)
.sort((a,b)=>b.population - a.population)
)}`
Insert cell
Insert cell
cheerio = require('https://bundle.run/cheerio@1.0.0-rc.2')
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