Published
Edited
Jan 17, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chartsWithOldData = owid.sql`select
c.id,
c.title as chart_title,
'https://ourworldindata.org/grapher/' || c.slug as link,
count(
year_max BETWEEN ${yearMin}
and ${yearMax}
) as num_chart_variables_in_range,
group_concat(pc.postId) as containing_posts
from
charts c
left join chart_variables cv on cv.chartId = c.id
left join variables v on cv.variableId = v.id
left join post_charts pc on pc.chartId = c.id
left join variable_statistics vs on vs.variableId = cv.variableId
where
vs.year_max between ${yearMin}
and ${yearMax}
group by
c.id
order by
c.id 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
import {table} from "@bchoatejr/tables@526"

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