The cluster_size_style
helper creates a cluster map with continuously sized points.Use help(cluster_size_style)
to get more information about the different settings that can be applied.
Cluster operations are performed in the back-end, so the cluster_size_style
helper can be used only with CARTO tables or SQL queries. It cannot be used with GeoDataFrames.
from cartoframes.auth import set_default_credentials
set_default_credentials('cartoframes')
from cartoframes.viz import Layer, cluster_size_style
Layer('vancouver_trees', cluster_size_style('diameter'))
Layer('vancouver_trees', cluster_size_style('diameter', operation='sum', resolution=64))