In [1]:
from cartoframes.auth import set_default_credentials
set_default_credentials('cartoframes')
In [2]:
from cartoframes.viz import Map, Layer, color_bins_style
Map(
Layer(
'demographics_sf',
style=color_bins_style('masters_percent'),
default_widget=True
)
)
Out[2]:
Also, the legend that is displayed automatically when using style helpers, can be removed by setting default_legend
parameter to False
In [3]:
from cartoframes.viz import Map, Layer, color_bins_style, default_widget
Map(
Layer(
'demographics_sf',
style=color_bins_style('masters_percent'),
widgets=default_widget(title="Percent Master's Degree"),
default_legend=False
)
)
Out[3]: