Public
Edited
Dec 15, 2022
Insert cell
Insert cell
div = html`<div id="plot" style="min-width:${width}px;min-height:${
width * 0.75
}px"></div>`
Insert cell
plot = {
window.last_clicked = {};
d3.select("#plot").selectAll("div").remove();
const plot = new Deepscatter("#plot", width, Math.floor(width * 0.75));
await plot.plotAPI({
source_url: "https://benschmidt.org/arxiv",
background_color: [45, 0, 75],
max_points: 1000000,
alpha: 5
});
return plot;
}
Insert cell
Deepscatter = (await import("https://benschmidt.org/deepscatter@2.6.1.js"))
.default
Insert cell
batches = plot._root
.map((d) => d)
.filter((d) => d.ready)
.map((d) => d.record_batch)
Insert cell
arrow = require("apache-arrow@10.0.1")
Insert cell
bytes = arrow.tableToIPC(plot._root.table)
Insert cell
writer.toUint8Array()
Insert cell
writer = {
const writer = new arrow.RecordBatchWriter();
return writer;
}
Insert cell
writer.write(plot._root.root_tile.record_batch)
Insert cell
client.query("SHOW TABLES")
Insert cell
[...arrow.tableFromIPC(plot._root.root_tile._table_buffer)]
Insert cell
conn.insertArrowTable(arrow.tableFromIPC(plot._root.root_tile._table_buffer), {
name: "main"
})
Insert cell
conn = client._db.connect()
Insert cell
client = DuckDBClient.of()
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