Built with blockbuilder.org
forked from syntagmatic's block: Metis Class 3 Starter Block
xxxxxxxxxx
<script src="https://d3js.org/d3.v4.min.js"></script>
<style type="text/css">
svg {
border:1px solid #d0d0d0;
}
</style>
<body></body>
<script>
// properties
var margin = {top: 20, right: 20, bottom: 20, left: 20};
var width = 800 - margin.left - margin.right;
var height = 600 - margin.top - margin.bottom;
var svg = d3.select('body').append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + [margin.left, margin.top] + ')');
d3.csv('barleyfull.csv', function(err, response) {
if (err) { throw(error) }
response.forEach(function(d) {
// is this what we wanted to do?
d.yield = +d.yield;
});
console.log(response);
});
</script>
https://d3js.org/d3.v4.min.js