@un-fao/visualization
v0.1.0-review.0
Published
Experimental browser visualization primitives for Data Explorer. This is a review release: its API and package contract may change before a stable release.
Readme
@un-fao/visualization
Experimental browser visualization primitives for Data Explorer. This is a review release: its API and package contract may change before a stable release.
Install
Install the review tag, its required peers, and the Deck layer used by the example below:
npm install @un-fao/visualization@review \
@deck.gl/[email protected] @deck.gl/[email protected] \
@deck.gl/[email protected] @deck.gl/[email protected] \
[email protected] [email protected] [email protected] [email protected]For a reproducible review, replace @review with
@0.1.0-review.0. npm may also point latest to this version when the new
package is first created, so use the review tag or exact version instead of a
bare package install.
The package has one public entry. Because that entry exports DataOverlay,
all consumers must install the MapLibre peer even when they use only
DataViewport.
Use
import { ScatterplotLayer } from '@deck.gl/layers';
import { DataViewport } from '@un-fao/visualization';
const points = new ScatterplotLayer({
id: 'points',
data: [{ position: [12.5, 41.9] }],
getPosition: (item) => item.position,
});
export function View() {
return <DataViewport layers={[points]} />;
}The six runtime exports are DataOverlay, DataViewport,
SingleBandRasterCollectionLayer, SingleBandRasterLayer,
isStacCollectionLike, and isStacItemCollectionLike.
Verified review boundary
The package is browser/client ESM. This release is verified with React 19,
Vite 8.0.3, npm 11.17.0 using its default hoisted installation, and TypeScript
consumer checking with moduleResolution: "Bundler" and skipLibCheck: true.
Other runtimes, bundlers, package managers, server rendering, and full
dependency-declaration checking are unverified rather than known to be
incompatible.
Known review limitations remain from Sprint 16: a synchronous raster-reader setup failure can leave queue accounting stalled, and cancellation does not physically abort every raster operation that has already started.
