All examples By author By category About

emeeks

Improved Circle Pack Clustering - d3.carto

Improved quadtree clustering in d3.carto.map allows for more seamless integration with hierarchical D3 layouts like Pack & Tree.

If you set the .cluster() property of a cartoLayer to true, it will cluster bsaed on a precomputed quadtree. Along with clustering, it appends "children" attributes of every point, which allows it to be passed to a hierarchical layout, as is done here with circle-packing.

A hierarchical infoviz layout like circle-packing shows the hierarchical structure of clustered cities, so that you can get a sense not only of the density of cities, but also the distribution.