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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more