Published
Edited
Oct 21, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
map([data[ls], turf.buffer(data[ls], 100)])
Insert cell
map([data[ls], turf.buffer(featureWithIntersectingPoints, 100)])
Insert cell
Insert cell
arrayOfLineStrings = turf.segmentReduce(
data[ls],
(buffers, currentSegment, i) => {
const segmentBuffer = turf.buffer(currentSegment, 100);
buffers.push(segmentBuffer);
return buffers;
},
[]
)
Insert cell
linestringBuffer = arrayOfLineStrings.reduce(
(u, c) => turf.union(u, c),
arrayOfLineStrings[0]
)
Insert cell
map([data[ls], linestringBuffer])
Insert cell
turf = require(`@turf/turf@${version}`)
Insert cell
import { map } from "@chrispahm/map"
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