Public
Edited
Mar 7
Insert cell
Insert cell
Insert cell
map(geojson)
Insert cell
Insert cell
connection = {

const connection = await db.connect()

await connection.query(`INSTALL spatial; LOAD spatial;`)

return connection
}
Insert cell
query = `
SELECT * REPLACE (ST_AsText(geometry) AS geometry)
FROM read_parquet("https://minio.lab.sspcloud.fr/projet-formation/nouvelles-sources/data/geoparquet/carreaux.parquet")
LIMIT ${limit};
`
Insert cell
df = connection.query(query)
Insert cell
geo = {
const arrow_ds = df.toArray()
return {
"type": "FeatureCollection",
"features": arrow_ds.map(
({geometry, ...rest}) => Object.assign( {},
{type: "Feature", geometry: parser(geometry), properties: {...rest}} )
)
}
}
Insert cell
Insert cell
geojson = transform(geo, {from: "EPSG:2154", to: "EPSG:4326"})
Insert cell
import {transform} from "@neocartocnrs/projectgdal"
Insert cell
import { map } from '@chrispahm/map'
Insert cell
parser = require('https://bundle.run/wellknown@0.5.0')
Insert cell
duckdb = import("https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.29.0/+esm") // august 2024 : 258 273 287 1.28.1-dev287.0
Insert cell
db = {
const bundle = await duckdb.selectBundle(await duckdb.getJsDelivrBundles())
const logger = new duckdb.ConsoleLogger()
const worker = await duckdb.createWorker(bundle.mainWorker)
const db = new duckdb.AsyncDuckDB(logger, worker)
await db.instantiate(bundle.mainModule, bundle.pthreadWorker)
return db
}
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