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
}
Source: stackoverflow.com
Related Query
- D3.js Multiple GeoJSON objects
- D3.js: Set fitExtent or fitSize (or center and scale programmatically) for map with multiple geoJSON files
- Adding multiple objects to svg and adding drag behaviour issue
- How to filter objects in GeoJson based on an object?
- D3 Multiple SVG Objects Following Path
- Group array of objects by multiple keys using d3.groups
- D3.JS, How can I render multiple objects in the same data binding?
- Inconsistent behavior when applying multiple colorAxis objects to line vs. bubble plots in dimple.js
- JSON summing multiple objects where values contain a string
- Utilize two objects for a single topojson merge. Multiple datum in d3.select("svg")
- Best way to center multiple geojson features in a small multiples chart
- D3 - How to create multiple line charts from an array of objects
- Looping through array of objects within multiple objects and accessing values in D3 using underscore
- Watching for updates nested within multiple objects passed into angular component
- Project data from a single geojson when multiple geojson files are present
- Power BI custom visual, creating multiple objects
- d3js multi-line graph to iterate multiple nested arrays with multiple nested objects
- d3 and geojson with multiple features and id
- combining multiple geojson files w tsv and preserving property with topojson
- Center a map in d3 given a geoJSON object
- Difference between GeoJSON and TopoJSON
- Appending multiple non-nested elements for each data member with D3.js
- How to set multiple attributes with one value function?
- d3 add multiple classes with function
- Drawing Multiple Lines in D3.js
- How to select multiple selectors with selectAll?
- How to use D3 selectAll with multiple class names
- Hyperlinks in d3.js objects
- How/Where do I get geoJSON data for states, provinces, and administrative regions of non-US countries?
- GeoJson World Database
More Query from same tag
- Change time intervals after zooming
- Nest() function in D3 v4 generating keys with $ sign
- Apply d3 geo projection to an image
- How to turn dataset into multiple different color lines in D3.JS
- Rotating text paths in d3.js chord diagram without usual svg:text
- How to prevent a SVG marker (arrow head) to inherit path's stroke width?
- How to bring variables into the scope of the .each method in d3
- How to fill the text with white in D3
- The best way to import complex SVG graphics into D3 charts
- Multiple line chart not working with date format
- Syntax for axis transition in svg/d3
- Using plugins for d3 in angular2
- nvd3.js - unable to change color of line in line chart
- Systemjs can't find ng2-dv3.component
- Put title above slider in D3 svg element
- Is there a way to generate more than 20 colors in D3?
- Problems with return of text based on Json data
- Using Javascript D3 library, how can I determine mouse position in data set of an area element on mousemove event?
- Adding text labels to force directed graph links in d3.js
- Tick line not visible in linear time scale
- d3.js - Add background rectangle on force directed diagram groups
- Disabling an option in a dropdown menu - d3
- What is wrong with this JSON file?
- Chart won't redraw in `onchange` function
- Hiding crucial data from an SVG
- Making DOM Reflow/Refresh
- D3 svg components not resizable
- Is it possible to insert an icon in the arc of a donut chart with D3?
- D3 mouseover transitions gets "stuck"
- D3: use d3.max to get containing object?