score:0

getting the data is separate task with respect to transforming it.

so you could, in theory, have multiple ajax calls to fetch the data you need before you decide to do whatever with that data.

mike bostock has a queue implementation for this purpose. if you are using jquery with d3, you could look into deferred an example of which is posted here.

once you have the data-sets that you need, you can now decide how you want to transform the data or provide transitions between them.

pseudo-code:

var files = ["file1.json", "file2.json"];

//fetch data for both files and create a data set object of this format
var dataset = {
    "file1.json": {/*geojson data for file1*/},
    "file2.json": {/*geojson data for file2*/}
}

for(var item in dataset) {
    var data = dataset[item];
    //do whatever transformation you need
}

Related Query

More Query from same tag