The setup is simple. You have a single <div> with the id="vis" in the HTML for the visualization. In the JavaScript, you set up a global projection variable to fill soon and create an svg element:
var projection;
var margin = { top: 30, right: 30, bottom: 30, left: 30 },
width = 900 - margin.left - margin.right,
height = 600 - margin.top - margin.bottom;
var svg = d3.select('#vis')
.append('svg')
.attr('width', width + margin.left + margin.top)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + margin.left + ', ' + margin.top + ')');