This is the code for Chapter 7, Figure 12 from D3.js in Action showing how to create a globe using the d3.geo.orthographic() projection as well as a modified zoom that changes the rotate of the projection based on mouse behavior.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js
https://d3js.org/d3.geo.projection.v0.min.js
https://d3js.org/queue.v1.min.js
https://d3js.org/colorbrewer.v1.min.js