Trying to read a csv file with the following code:
d3.csv("static/data/gperch_test.csv", function(data) {
latlongs = data.map(function(d) { return [d.Lat,d.Lng,d.day].map(Number);});
console.log(data)
})
The console shows an object where each has Date, Lat, Lng, Species, days all in text. When I try console.log(days) and log it, I get an undefined rather than the expected output.
Does anyone know why this is happening?
Comments
Post a Comment