Published
Edited
Aug 21, 2018
Importers
2 stars
Insert cell
Insert cell
Insert cell
geoformat(3)({
type: "Point",
coordinates: [Math.random() * 180, Math.random() * 90]
})
Insert cell
geoformat(0)({
type: "MultiPoints",
coordinates: [
[Math.random() * 180, Math.random() * 90],
[Math.random() * 180, Math.random() * 90],
[0.1, 0.1],
[0.3, 0.4], // test the repeats
[Math.random() * 180, Math.random() * 90]
]
})
Insert cell
// format coordinates with 3 digits, remove properties
// (we use viewof to limit the size of the display)
viewof json = {
const json = geoformat(3, ["properties"])(geo),
show = md`\`\`\`{json}
${json.substring(0, 10000)}
\`\`\``;

show.value = json;
return show;
}
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