Public
Edited
Jan 29, 2024
Insert cell
Insert cell
parquetUrl = 'https://data.source.coop/vida/google-microsoft-open-buildings/geoparquet/by_country/country_iso=MCO/MCO.parquet'
Insert cell
parquetBuffer = fetch(parquetUrl).then((response) => response.arrayBuffer())
Insert cell
arrowTable = {
const wasmGeoTable = geoparquetWasm.readGeoParquet(new Uint8Array(parquetBuffer));
const wasmArrowTable = wasmGeoTable.intoTable();
const jsTable = apacheArrow.tableFromIPC(wasmArrowTable.intoIPCStream());
return jsTable;
}
Insert cell
Insert cell
// Load the geoparquet-wasm library
geoparquetWasm = {
const module = await import(
"https://unpkg.com/@geoarrow/geoparquet-wasm@0.2.0-beta.2/esm/index.js"
);
// Need to await the default export first to initialize the WebAssembly code
await module.default();
return module;
}
Insert cell
deck = require.alias({
h3: {}
})("deck.gl@8.9.34/dist.min.js")
Insert cell
apacheArrow = require("apache-arrow@15")
Insert cell
mathGlPolygon = import("https://cdn.jsdelivr.net/npm/@math.gl/polygon@3.6.2/+esm")
Insert cell
geoarrow2 = import("https://cdn.jsdelivr.net/npm/@geoarrow/deck.gl-layers@0.3.0-beta.9/+esm")
Insert cell
// geoarrowDeckLayers = require.alias({
// "@deck.gl/aggregation-layers/typed": deck,
// "@deck.gl/core/typed": deck,
// "@deck.gl/geo-layers/typed": deck,
// "@deck.gl/layers/typed": deck,
// "apache-arrow": apacheArrow,
// "@math.gl/polygon": mathGlPolygon
// })("@geoarrow/deck.gl-layers@0.3.0-beta.9")
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