Open protobi opened 11 years ago
Reading files and parsing CSV files is a specialty in itself, so delegated that part to node-csv, and all works well.
var Miso = require("miso.dataset");
var csv = require('csv');
csv()
.from.options({columns: true})
.from.path(__dirname+'/../public/data/MST.csv', { delimiter: ',', escape: '"' })
.to.array( function(data){
var ds = new Miso.Dataset({
data: data
});
ds.fetch({
success : function() {
console.log("Dataset Ready. Columns: " + this.columnNames());
console.log("There are " + this.length + " rows");
}
});
});
Miso.Dataset works great within the browser, using on Node.js for first time and getting an error. Presumably a newbie error, but looks like the one reported in https://github.com/misoproject/dataset/issues/193.
Specifically it appears
global
is undefined. Was able to create the issue in a new project:express --sessions miso_test
npm install miso.dataset --save
npm install
Stack trace below: