Public
Edited
Nov 2, 2022
3 forks
Insert cell
Insert cell
Insert cell
Insert cell
Inputs.table(chartsWithBaseScheme, {
height: "800px",
width: {id: "10%", slug: "90%"},
format: {
id: (id) => html`<a href="https://owid.cloud/admin/charts/${id}/edit" target="_blank">${id}</a>`,
slug: (slug) =>
html`<iframe src="https://ourworldindata.org/grapher/${slug}" loading="lazy" style="width: 100%; height: 500px; border: 0px none;"/>`
}
})
Insert cell
Inputs.table(chartsWithBaseScheme, {
format: {
slug: (slug) => html`<a href="https://ourworldindata.org/grapher/${slug}">${slug}</a>`
}
})
Insert cell
owid
select id, slug
from charts
where config ->> '$.hasMapTab' = true
and ((${baseScheme.baseScheme} = 'null' and config ->> '$.map.colorScale.baseColorScheme' is null) or config ->> '$.map.colorScale.baseColorScheme'= ${baseScheme.baseScheme})
order by updatedAt desc
Insert cell
owid
select c.config ->> '$.map.colorScale.baseColorScheme' as baseScheme, count(*) as count
from charts c
where c.config ->> '$.hasMapTab' = true
group by c.config ->> '$.map.colorScale.baseColorScheme'
order by count(*) desc
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