xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>HeroScore Top100 | Week 3</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.js"></script>
</head>
<body>
<p><font face= "arial" font size= "3">
HeroScore is a new feature of the social media website for the poker world www.rankinghero.com. <br>
It is a meta-ranking system for the poker world. It employs sophisticated algorithms to calculate the overall influence and prestige that a particular player has within the community. Here are displayed the TOP 100 poker players with the highest HeroScore.
</p>
<script type="text/javascript">
var svg = d3.select("body")
.append("svg")
.attr("width", 800)
.attr("height", 1500);
//Load in contents of CSV file
d3.csv("DataHeroscoreTop100.csv", function(data) {
var rects = svg.selectAll("rect")
.data(data)
.enter()
.append("rect");
rects.attr("x", 0)
.attr("y", function(d, i) {
return i * 10;
})
.attr("width", function(d) {
return d.HeroScoreTotal/20;
})
.attr("height", 8)
.append("title")
.text(function(d) {
return d.Hero + "'s HeroScore is " + d.HeroScoreTotal + " (" + d.Country + ")";
});
//Now CSV contents have been transformed into
//an array of JSON objects.
//Log 'data' to the console, for verification.
console.log(data);
});
</script>
</body>
</html>
Modified http://d3js.org/d3.v3.js to a secure url
https://d3js.org/d3.v3.js