xxxxxxxxxx
<html>
<head>
<title>Knight D3 Module 2</title>
</head>
<body>
<svg width=960 height=500>
<rect x=50 y=50 width=200 height=600></rect>
<circle cx=150 cy=150 r=50 style="fill:red; stroke:white; stroke-width:5px"></circle>
<circle cx=150 cy=275 r=50 style="fill:yellow; stroke:white; stroke-width:5px"></circle>
<circle cx=150 cy=400 r=50 style="fill:green; stroke:white; stroke-width:5px"></circle>
</svg>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
d3.csv("no-ceilings-data.csv", function(row){
//accessor to convert to numbers
var obj = {}
Object.keys(row).forEach(function(k){
var v = row[k]
obj[k] = +v || v;
})
return obj
}, function(err, data){
//callback with data loaded
if (err) return console.error(err);
data.forEach(function(d){
console.log(d);
})
})
</script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js