Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (45 sloc) 1.25 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<link type="text/css" rel="stylesheet" href="style.css">
<title></title>
</head>
<body>
<div style="padding-left:1em" id="body">
<div id="header">
<script>
d3.json(
"http://localhost:8000/data/num_topics.json",
function(data){
d3.select("#body")
.append("ul")
.selectAll("li")
.data(data)
.enter()
.append("li")
.text(
function(d){
var msg = d.count
if (d.count == 1) {
msg += " person specifies ";
} else {
msg += " people specify "
}
msg += d.num_topics
if (d.num_topics == 1){
msg += " topic";
} else {
msg += " topics";
}
return msg;
}
)
.style("font-size","1.5em")
}
)
</script>
</div>
</div>
</body>
</html>