xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.js"></script>
</head>
<body>
<p>I think I finally did it... success!!!</p>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("HardshipChicago.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 lang="en">
<head>
<meta charset="utf-8">
<title>D3 with SVG Elements</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: #ddddff;
}
svg {
background-color: white;
}
</style>
</head>
<body>
<svg width="600" height="200">
<line x1="70" y1="40" x2="170" y2="160" stroke="red" stroke-width="3" />
<line x1="190" y1="190" x2="350" y2="45" stroke="red" stroke-width="3" />
<rect x="150" y="100" width="100" height="100" fill="grey" />
<circle cx="200" cy="50" r="50" fill="aqua" />
<text x="130" y="150" fill="charcoal" font-size="42" font-weight="bold" font-family="Helvetica">ChiCity</text>
</svg>
<script type="text/javascript">
// Your D3 code will go here
</script>
</body>
</html>
Modified http://d3js.org/d3.v3.js to a secure url
Modified http://d3js.org/d3.v3.js to a secure url
https://d3js.org/d3.v3.js
https://d3js.org/d3.v3.js