Published
Edited
Jan 5, 2022
Insert cell
Insert cell
Plot.plot({
y: {
grid: true
},
marks: [
Plot.rectY(
cleaned_posts,
Plot.binX({ y: "count" }, { x: "published_at", thresholds: 20 })
)
],
width: width
})
Insert cell
posts = owid.sql`select id,
printf("https://ourworldindata.org/%s", slug) as url,
title,
published_at
from posts
where not published_at is null
order by id desc`
Insert cell
cleaned_posts = posts.map((x) => ({
...x,
published_at: new Date(x.published_at)
}))
Insert cell
Insert cell
owid = new DatasetteClient(
"https://owid-datasette-y43qr.ondigitalocean.app/owid"
)
Insert cell
//Inputs.table(variables.query(`SELECT * from variables ${whereClause}`))
Insert cell
import {DatasetteClient} from "@ambassadors/datasette-client"
Insert cell
import {debounce} from "@mbostock/debouncing-input"
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