xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Module2 exercise</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: DimGray;
}
svg {
background-color: DimGray;
}
</style>
</head>
<body>
<defs>
<path id="star" d="M2.395,0.409 C2.026,0.973 ... Z"></path>
</defs>
<svg width="800" height="600">
<line x1="10" y1="10" x2="790" y2="10" stroke="darkgrey" stroke-width="2" />
<polygon points="350,75 379,161 480,161 397,215 423,301 350,250 277,301 303,215 231,161 321,161" stroke="orange" stroke-width="10" fill="orange" transform="scale(1.4) translate(-80,-10)"/>
<polygon points="340,65 369,151 470,151 387,205 413,291 340,240 267,291 293,205 221,151 311,151" stroke="darkorange" stroke-width="10" fill="darkorange" transform="scale(1.2) translate(-27,32)"/>
<text x="302" y="276" fill="white" font-size="32" font-weight="bold" font-family="Arial">THE LAW</text>
<line x1="10" y1="590" x2="790" y2="590" stroke="darkgrey" stroke-width="2" />
</svg>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("FelonyOffensesVSArrests-2000-2011.csv", function(data) {
//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