Public
Edited
Feb 28, 2024
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
utahParquet = FileAttachment("Utah@1.parquet")
Insert cell
Insert cell
arrowTable = {
const parquetBytes = new Uint8Array(await utahParquet.arrayBuffer());
const decodedArrowBytes = parquet.readParquet(parquetBytes);
return arrow.tableFromIPC(decodedArrowBytes);
}
Insert cell
Insert cell
deckglLayer = {
const layer = new geoarrowDeckLayers.GeoArrowSolidPolygonLayer({
id: "buildings",
data: arrowTable,
getPolygon: arrowTable.getChild("GEOMETRY"),
getFillColor: [0, 100, 60, 160],
pickable: true
})

deckglMap.setProps({ layers: [layer] });
return layer;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
deckglMap = {
// This is an Observable hack: clear previously generated content
mapContainer.innerHTML = "";

return new deck.DeckGL({
// The HTML container to render into
container: mapContainer,
map: mapboxgl,
mapStyle:
"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",

// Viewport settings
initialViewState: {
longitude: -111.91530172951025,
latitude: 40.63403641639511,
zoom: 11,
pitch: 0,
bearing: 0
},
controller: true,
getTooltip: ({object}) => {
console.log(object)
}
});
}
Insert cell
Insert cell
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