dexjs icon indicating copy to clipboard operation
dexjs copied to clipboard

Support external CSVs

Open UNFPAmaldives opened this issue 8 years ago • 1 comments

Would like to see support for loading external CSV files, rather than a column-formatted json

UNFPAmaldives avatar Oct 23 '17 17:10 UNFPAmaldives

It's too easy to convert. Once you include dex, it comes with it's own D3 library (which you can override), however, d3 comes with the exact routine you need to easily read a csv from some location and we can then instantiate a dex-csv.

d3.csv("my_csv.csv", function (error, data) {
  var csv = new dex.csv(data);
  // Do something ...
});

Of course, perhaps a convenience method of:

var csv = new dex.csv("my_csv.csv");

would be much more convenient. Great idea! I'll even take it a step further and add some sort of convenience module for loading different data formats soon.

PatMartin avatar Nov 12 '17 17:11 PatMartin