Public
Edited
Feb 23, 2024
Insert cell
Insert cell
view = {
// Create a store
const store = new storage.ReferenceStore("https://storage.googleapis.com/vitessce-demo-data/habib-2017/habib17.reference.json");

// Open a zarr.Array
const arr = await zarr.open(store, { kind: "array" });
// {
// store: FetchStore,
// path: "/",
// dtype: "uint8",
// shape: [512, 512, 3],
// chunks: [100, 100, 1],
// }

// load a region of the array
const channelIndex = ["red", "green", "blue"].indexOf(radios);
const view = await zarr.get(arr, [null, null, channelIndex]);
// {
// data: Uint8Array,
// shape: [512, 512],
// stride: [512, 1],
// }

return view;
}
Insert cell
zarr = import("https://cdn.jsdelivr.net/npm/zarrita@next/+esm")
Insert cell
storage = import("https://cdn.jsdelivr.net/npm/@zarrita/storage@next/+esm")
Insert cell
Insert cell
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