I am trying to import some data from a .csv using d3.js. I am having trouble doing this, and was wondering if anyone could lend a hand. My .csv file is formatted like so:<
Change it to:
var dataset = [] d3.csv("data.csv", function(data) { dataset = data.map(function(d) { return [ +d["max_i"], +d["min_i"] ]; }); console.log(dataset) });
You need to inspect dataset inside the callback, once your data is returned.