Public
Edited
Oct 19, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3.geoContains(geometry, point)
Insert cell
Insert cell
d3.geoContains(geometry, point.toReversed())
Insert cell
d3.geoContains(
{
...geometry,
coordinates: geometry.coordinates.map((c) => c.map((p) => p.map(Math.abs)))
},
point.map(Math.abs)
)
Insert cell
d3.geoContains(
{
...geometry,
coordinates: geometry.coordinates.map((c) => c.map((p) => p.map(Math.abs)))
},
[-71.109394, 42.384].map(Math.abs)
)
Insert cell
debugging = {
return [
[0.5, 0.5],
[1, 1],
[1, 2],
[0, 0],
[0.25, 0.25]
].map((p) =>
d3.geoContains(
{
type: "Polygon",
coordinates: [
[
[0, 0],
[0, 1],
[1, 1],
[1, 0],
[0, 0]
]
]
},
p
)
);
}
Insert cell
moreDebugging = {
return d3.geoContains(
{
type: "FeatureCollection",
properties: {},
features: [
{
type: "Feature",
properties: {},
geometry
}
]
},
[10, 48]
);
}
Insert cell
d3.geoContains(
{
type: "Polygon",
coordinates: [
[
[0, 0],
[0, 1],
[1, 1],
[1, 0],
[0, 0]
]
]
},
[2, 2]
)
Insert cell
d3.geoContains(
{
type: "Polygon",
coordinates: [
[
[0, 0],
[0, 1],
[-1, 1],
[-1, 0],
[0, 0]
]
].map((c) => c.toReversed())
},
[-0.5, 2]
)
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