By default, CARTOframes sets the center and zoom of your map to encompass all features in a dataset. In the cases where you want to set a custom extent, setting show_info=True
places zoom and latitude/longitude coordinates at the bottom left corner of the map. Copying and pasting the values to the viewport
parameter sets the opening zoom and center of the map.
from cartoframes.auth import set_default_credentials
from cartoframes.viz import Map, Layer
set_default_credentials('cartovl')
from cartoframes.viz.helpers import color_bins_layer
Map(
Layer('pittsburgh_311'),
show_info=True,
viewport={'zoom': 13.5, 'lat': 40.4353, 'lng': -79.9916}
)