Public
Edited
Sep 12, 2022
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof enabledAreas = checkbox({
title: "Points Enabled",
options: [
{ value: "1", label: "Point 1" },
{ value: "2", label: "Point 2" },
{ value: "3", label: "Point 3" },
{ value: "4", label: "Point 4" }
],
value: ["1",,"2","3","4"]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
locationShape = location.shape
Insert cell
locationShapeCoordiantes = location.shape.geometry.coordinates
Insert cell
pointsNearLocation = {
const seeds = {
outInEdgeCenter: 'vgfa4a21dsd21d2f'
}
const furthestVertex = location.shape.geometry.coordinates.flat().flat().reduce((prev, curr) => haversineDistance(prev, location.center) > haversineDistance(curr, location.center) ? prev : curr);
return randomPointsFromCenter(
location.center,
4,
haversineDistance(furthestVertex, location.center) * 2,
0,
seeds.outInEdgeCenter)
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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