block by emeeks 86da8f19e58ccb668750

Automated Voronoi Layer - d3.carto

Full Screen

Automatic voronoi generation in d3.carto.map allows for the creation of regions from point data.

The map.createVoronoiLayer function takes two variable: a point d3.carto.layer (either CSV or XY Array) and a margin (in degrees). It creates a feature carto layer that splits the area of the points into regions.

This will have issues if you pass point data that has more than one point at the same XY location.

index.html

d3map.css