While it may introduce some dependency issues, breaking out d3 into modules makes it easier to write/maintain tests for everything. Hopefully this makes the d3 universe more robust, but only time will tell.
https://github.com/mbostock/d3/tree/4
There's also tons of good D3 tutorials on https://www.dashingd3js.com/, if you're looking for more of this kind of stuff...