//Width and height var w = 500; var h = 500; //Define map projection var projection = d3.geo.mercator() .center([-86, 5]) .translate([w, h]) .scale([w * 1.8]); //Define path generator var path = d3.geo.path() .projection(projection); //Create SVG var svg = d3.select("#container") .append("svg") .attr("width", w) .attr("height", h); //Load in GeoJSON data d3.json("national_estatal.json", function (json) { //Bind data and create one path per GeoJSON feature svg.selectAll("path") .data(json.geometries) .enter() .append("path") .attr("d", path) .attr("fill", "#1A9112") .attr("stroke", "#3s92114"); });