Published
Edited
May 11, 2021
2 forks
30 stars
Insert cell
Insert cell
Table(results[0].values, {
})
Insert cell
Insert cell
results = worker.db.exec(
`select country_code, long_name from wdi_country limit 10;`
)
Insert cell
sqlite = require("sql.js-httpvfs")
Insert cell
// Magically this gets around same origin policy for running web workers.
workerUrl = URL.createObjectURL(
new Blob([await FileAttachment("sqlite.worker@1.js").text()], {
type: 'application/javascript'
})
)
Insert cell
wasmUrl = FileAttachment("sql-wasm@1.wasm").url()
Insert cell
worker = await sqlite.createDbWorker(
[
{
from: "jsonconfig",
configUrl: configURL
}
],
workerUrl,
wasmUrl
)
Insert cell
import { Table } from '@observablehq/inputs'
Insert cell
configURL = 'https://storage.googleapis.com/o_endpointservices_mybucket11/public/world-development-indicators-sqlite/split-db/config.json'
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