Built with blockbuilder.org
forked from curran‘s block: HTML Starter
<!DOCTYPE html>
<html>
<head>
<title>HTML Starter</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<script>
var data = [
{ "name": "China", "population": 1379600000 },
{ "name": "India", "population": 1330780000 },
{ "name": "United States", "population": 324824000 },
{ "name": "Indonesia", "population": 260581000 },
{ "name": "Brazil", "population": 206879000 },
{ "name": "Pakistan", "population": 194680000 },
{ "name": "Nigeria", "population": 186987000 },
{ "name": "Bangladesh", "population": 161345000 },
{ "name": "Russia", "population": 146691020 },
{ "name": "Russia", "population": 146691020 },
{ "name": "Mexico", "population": 128632000 }
];
d3.select("body")
.selectAll("h1")
.data(data)
.enter().append("h1")
.text(function(d) { return d.name; });
</script>
</body>
</html>