Public
Edited
Dec 29, 2022
Insert cell
gemeentenUrl = "https://raw.githubusercontent.com/bertt/opendata/master/netherlands/gemeenten2016_arrow.parquet"
Insert cell
parquetBuffer = fetch(gemeentenUrl).then((response) => response.arrayBuffer())
Insert cell
arrowTable = {
const parquetBytes = new Uint8Array(parquetBuffer);
const decodedArrowBytes = parquet.readParquet(parquetBytes);
const arrowTable = arrow.tableFromIPC(decodedArrowBytes);
return arrowTable;
}
Insert cell
arrowTable.schema
Insert cell
arrowTable.schema.fields[35]
Insert cell
geometryColumn = arrowTable.getChildAt(35)
Insert cell
// Pretty print the first geometry
// One ring with five coordinates
{
const firstGeometry = geometryColumn.get(0);
return firstGeometry
}
Insert cell
Insert cell
arrow = require("apache-arrow")
Insert cell
// Load the parquet-wasm library
parquet = {
const parquetModule = await import(
"https://unpkg.com/parquet-wasm@0.4.0-beta.3/esm/arrow2.js"
);
// Need to await the default export first to initialize the WebAssembly code
await parquetModule.default();
return parquetModule;
}
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