A Chiasm component that loads delimiter separated value (DSV) data tables. This is a thin wrapper around the dsv-dataset module, which is a metadata specification and parsing library for data sets. Take a look at the unit test for example usage. When a "path" property is specified, the component appends ".csv" and ".json" to it and uses an XMLHttpRequest to fetch those two paths. The ".csv" fils should contain a data table, and the ".json" file should contain metadata about the table including column types.
The following script will set up the component in a Chiasm application:
var ChiasmDatasetLoader = ;var chiasm = ;chiasmpluginsdatasetLoader = ChiasmDatasetLoader;chiasm;
Here are a few sample lines from
Here is the content of
The following code will print out the parsed table:
The following JSON will be printed:
Notice how numeric columns have been parsed to numbers. This data structure is an instance of chiasm-dataset.
To see how this component can be used to fetch data for visualizations, check out this Magic Bar Chart example.