Please guys, im trying to understand why this code doesnt work for version 7 of d3.js. Its working for version 4
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Load d3.js -->
<!-- Create an element where the map will take place -->
<svg id="my_dataviz" width="400" height="300"></svg>
<script>
// The svg
var svg = d3.select("svg")
width = +svg.attr("width"),
height = +svg.attr("height");
// Map and projection - centraliza em bangkok
//var projection = d3.geoNaturalEarth1()
var projection = d3.geoMercator()
.scale(width / 1.3 / Math.PI)
.translate([width / 2, height / 2])
// Load external data and boot
// Draw the map
svg.append("g")
.selectAll("path")
.data(data.features)
.enter().append("path")
.attr("fill", "#69b3a2")
.attr("d", d3.geoPath()
.projection(projection)
)
.style("stroke", "#fff")
})
</script>