A reference gist for the implementation of a general purpose map of the world in d3 version 4.
The projection of choice is the Winkel Tripel projection, which has a very low average error in representing area, direction, and distance (see this article for more details).
Data is obtained from Mike Bostock's topojson world atlas, which is in turn based on the Natural Earth dataset.
Zooming and panning is enabled via SVG transforms, so no reprojection and clipping operations happen during user interaction.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-selection-multi.v0.4.min.js
https://d3js.org/d3-geo-projection.v2.min.js
https://d3js.org/topojson.v2.min.js