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>Not much to see here; try looking in the console!</p>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("HealthSpendingTotalPctGDP.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>
<svg width="500" height="200">
<line x1="10" y1="8" x2="300" y2="8" stroke="red" stroke-width="3" />
<rect x="200" y="10" width="100" height="100" fill="orange" />
<line x1="200" y1="110" x2="500" y2="110" stroke="red" stroke-width="3" />
</svg>
</body>
</html>
Modified http://d3js.org/d3.v3.js to a secure url
https://d3js.org/d3.v3.js