xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test</title>
<script src="https://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<h1>A simple 'visualization' of my dataset</h1>
<p>x-axis : friends count</p>
<p>y-axis : followers count</p>
<p>* no meaningful scales. placement by followers_count/height and friends_count/width</p>
<script>
var width = 800,
height = 500
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
//d3.select("svg").append("circle").attr("cx", "300").attr("cy", "300").attr("fill", "blue").attr("r", "100")
dataset = d3.csv("tweeps.csv", function(data) {
dataset = data
console.log(dataset);
svg.selectAll("circle")
.data(dataset)
.enter()
.append("circle")
.attr("class", "tweep")
.attr("id", function(d) { return d.id; })
.attr("fill", "blue")
.attr("r", "3")
.attr("cy", function(d) { return d.followers_count/height; })
.attr("cx", function(d) { return d.friends_count/width*30; });
});
</script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js