var width = 1000, height = 550; //http://www.ngs.noaa.gov/PUBS_LIB/ManualNOSNGS5.pdf var projection = d3.geo.conicConformal() .parallels([35 + 34 / 60, 36 + 46 / 60]) .rotate([98 + 00 / 60, -35 - 00 / 60]) .scale(5300) .translate([width / 2, height / 2]); var path = d3.geo.path() .projection(projection); var svg = d3.select("body") .append("svg") .attr("width", width) .attr("height", height); queue() .defer(d3.json, "/darrenjaworski/raw/5874214/finaloutput.json") .defer(d3.json, "points.json").await(ready); function ready(error, ok, points) { //state svg.append("path") .attr("class", "state") .datum(topojson.feature(ok, ok.objects.county)) .attr("d", path); //county border svg.append("path") .attr("class", "county-border") .datum(topojson.mesh(ok, ok.objects.county, function(a, b) { return a !== b;})) .attr("d", path); //state border svg.append("path") .attr("class", "state-border") .datum(topojson.mesh(ok, ok.objects.county, function(a, b) { return a === b;})) .attr("d", path); //points data var points = topojson.feature(points, points.objects.tornadoes); //prisons svg.selectAll(".points") .data(points.features.sort(function(a, b) { return b.properties.id - a.properties.id;})) .enter() .append("path") .attr("class", "points") .attr("d", path.pointRadius(3)) }