Each of the above examples incorporates at least one tricky concept, whether its SVG particulars (transforms) or some funky math to calculate scales. The key here is to know how to find the technique you want when you need it, so lets play with each one briefly.
Investigate: SVG Transform based zooming Dynamic projection based zooming Constrained Zoom Zoom to bounding box
Each of the above examples incorporates at least one tricky concept, whether its SVG particulars (transforms) or some funky math to calculate scales. The key here is to know how to find the technique you want when you need it, so lets play with each one briefly.
More zooming examples including transitioning and interpolating zooms.
Resources: d3.behavior.zoom reference simpler drag + zoom example in a non-geo context