Public
Edited
Jun 8, 2023
Insert cell
Insert cell
Insert cell
nj = import("https://cdn.skypack.dev/numjs@latest")
Insert cell
Insert cell
Insert cell
masks = new Float32Array(
decoded.split("").map(function (c) {
return c.charCodeAt(0);
})
)
Insert cell
arr = nj.array(masks)
Insert cell
reshaped_mask = arr.reshape([1, 4, 512, 512])
Insert cell
{
let container = html`<div style='height:600px;' />`;

// Give the container dimensions.
yield container;

// Create the \`map\` object with the mapboxgl.Map constructor, referencing
// the container div
let map = new mapboxgl.Map({
container,
center: [2.32424, 48.86501],
zoom: 10,
style: "mapbox://styles/mapbox/streets-v11",
scrollZoom: false
});

map.addControl(new mapboxgl.NavigationControl(), "top-right");

// Be careful to clean up the map's resources using \`map.remove()\` whenever
// this cell is re-evaluated.
invalidation.then(() => map.remove());
}
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