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>
<style type="text/css">
body {
background-color: #ffffff;
font-family: Helvetica, Arial, sans-serif;
padding: 30px;
}
svg {
background-color: #F7F4EA;
}
rect {
fill: #fcd116;
}
</style>
</head>
<body>
<p>Something to see here, but don't forget to check out the console.
<a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Clipping_and_masking">Clipping and masking from the Mozilla web-site
</p>
<svg width="500" height="400">
<defs>
<mask id="mask1">
<circle cx="250" cy="200" r=200 fill="#ffffff" />
</mask>
</defs>
<circle cx="250" cy="200" r="200" fill="#005b99"/>
<rect x="150" y="0" width="80" height="400" mask="url(#mask1)" />
<rect x="25" y="160" width="450" height="80" mask="url(#mask1)" />
</svg>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("ElementsOfNationalPower_2010_Dataset.csv", function(data) {
//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