datalib1.9.2 • Public • Published
For documentation, see the datalib API Reference.
Datalib provides a set of utilities for working with data. These include:
- Loading and parsing data files (JSON, TopoJSON, CSV, TSV).
- Summary statistics (mean, deviation, median, correlation, histograms, etc).
- Group-by aggregation queries, including streaming data support.
- Data-driven string templates with expressive formatting filters.
Datalib can be used both server-side and client-side. For use in node.js,
npm install datalib or include datalib as a dependency in your package.json file. For use on the client, install datalib via
bower install datalib or include datalib.min.js on your web page. The minified JS file is built using rollup (see below for details).
To use datalib in the browser, you need to build the datalib.js and datalib.min.js files. We assume that you have npm installed.
npm installin the datalib folder to install dependencies.
npm run build. This will invoke rollup to bundle the source files into datalib.js, and then uglify-js to create the minified datalib.min.js.
If you are using Webpack 1, you need to enable a JSON-loader. To do so, first
npm install --save json-loader, then add the loader to your webpack config:
module:loaders:test: /\.json$/loader: 'json-loader'