I have four CSVs with the same header information, each of which represents a quarterly result for a year.
So for one result, I can load it and display it in a dataTable, just using
d3.csv("data/first-quarter"), function(dataQ1){
dataQ1.forEach(function(d){
d.callTypes = d['Call Types'];
d.callDesc = d['Call Description'];
d.callVol = d['Call Volume'];
d.quarter = 'Q1';
});
var facts = crossfilter(dataQ1);
var timeDimension = facts.dimension(function(d){
return d.quarter;
});
dataTable
...
dc.renderAll();
});
However, complications arise when I try to extract from several sources and add results.
One of my approaches was to put all the path names in an array and iterate through forEach with a flag to show when it was the last iteration to display the table. But this failed with the error "Too many recursions."
And next was the nest as such
d3.csv(filesPathNames[0], function(dataQ1){
d3.csv(filesPathNames[1], function(dataQ2){
d3.csv(filesPathNames[2], function(dataQ3){
d3.csv(filesPathNames[3], function(dataQ4){
, , - , CSV . , : , dataQ1, dataQ2, dataQ3 dataQ4.
Q1, Q2, Q3 Q4 ?