Public
Edited
Feb 22, 2024
Insert cell
Insert cell
aqTable
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
aqTable = await getDataTable(url)
Insert cell
Insert cell
// function toArray(table) {
// return table.toArray().map(row =>
// [...row.entries()].reduce((a, [k, v]) => {
// a[k] = v;
// return a;
// }, {})
// );
// }
Insert cell
async function getDataTable(url) {
await parquetWasm.default();
const response = await fetch(url);
const arrayBuffer = await response.arrayBuffer();
const arr = new Uint8Array(arrayBuffer);
const arrowIPC = parquetWasm.readParquet(arr);
return aq.fromArrow(arrowIPC);
}
Insert cell
Insert cell
await parquetWasm.default();
Insert cell
Insert cell
response = await fetch(url);
Insert cell
Insert cell
arrayBuffer = await response.arrayBuffer()
Insert cell
Insert cell
arr = new Uint8Array(arrayBuffer)
Insert cell
Insert cell
arrowIPC = parquetWasm.readParquet(arr)
Insert cell
Insert cell
aquero_table = aq.fromArrow(arrowIPC)
Insert cell
schema = arrowIPC.schema
Insert cell
Insert cell
import { SummaryTable } from "@observablehq/summary-table"
Insert cell
arrow = require('apache-arrow@4')
Insert cell
parquetWasm = import("https://cdn.jsdelivr.net/npm/parquet-wasm@0.1.1/web.js")
Insert cell
import { fileInput } from '@mbostock/file-input'
Insert cell
console.log(aq)
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