Accessing CSV file with D3 inside meteor
I have successfully fetched an HTML table displaying data from a csv file using D3, but when I moved the same code into the meteor project, I got problems. The data object passed to the callback for d3.csv () fetches the HTML file line 1 at a time, not the csv data. This only happens when you try to launch it into a meteor.
My code is set up like this:
if (Meteor.isClient) {
d3.csv("data/dataset.csv", function(data) {
console.dir(data);
// do stuff
});
}
if (Meteor.isServer) {
// do other stuff
}
Any ideas on why this might be happening?
+3
source to share