I need to populate a 2d array, e.g.,
var dataset = [[1,3,3,5,6,7],[3,5,8,3,2,6],[9,0,6,3,6,3],[3,4,4,5,6,8],[3,4,5,2,1,8]];
Where the information comes from external sources, while I have the control in the format to store them (csv,json etc., to be read by functions like d3.csv
, d3.json
etc.).
What are the simplest ways to store 2d array in external files, and to read in to populate the variable like dataset
when doing d3 processing?