Using d3.carto.minimap with d3.carto.map.
Drag the main map around and zoom in and zoom out to see the bounds change in the minimap.
The minimap creates its own d3.carto.map and, with minimap.tandem() will take the layers from the main map and recreate them in the minimap.