Public
Edited
Dec 17, 2022
Importers
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
maldives_bbox = turf.multiPoint([
[72.62205806252797, 5.02326322992478],
[72.62205806252797, 4.074298650200802],
[73.86812667290087, 4.074298650200802],
[73.86812667290087, 5.02326322992478],
[72.62205806252797, 5.02326322992478]
])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function fix_feature(feature) {
const bbox = d3.geoBounds(feature).toString();
if (bbox === `-180,-90,180,90`) {
return turf.rewind(feature, { reverse: true });
}
return feature;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
turf = require("@turf/turf")
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