About
d3-dsv is a library to parse a DSV string (not file) into an array of rows where the property are the headers. To parse a CSV file, see D3 - CSV.
Articles Related
Example
A template string containing the CSV data is passed to the d3.csvParse function.
s = `id,value
1,First
2,Second`;
var dataArray = d3.csvParse(s, function(d) {
return {
id: d.id,
value: d.value,
i2d: d.id*2 // 2 * id transformation
};
});
console.table(dataArray);