data-juggler
Advanced tools
Comparing version 0.3.0 to 0.4.0
import { FormatterObject, GenericDatum, ParserObject } from './utils/dataInference'; | ||
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, InferObject, MomentsObject } from '../types/types'; | ||
import { ScalingFnsRecords } from './generate-scaling'; | ||
interface JuggleConfig<T> { | ||
@@ -18,3 +19,4 @@ types?: InferObject<T>; | ||
types: InferObject<T>; | ||
scalers: ScalingFnsRecords<T>; | ||
}; | ||
export {}; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const dataInference_1 = require("./utils/dataInference"); | ||
const generate_scaling_1 = require("./generate-scaling"); | ||
const parseObjects_1 = require("./utils/parseObjects"); | ||
@@ -24,5 +25,6 @@ const stats_1 = require("./utils/stats"); | ||
const data = dataSet.map(datum => datumPreprocessor(datum)); | ||
return { data, moments, types: inferedTypes }; | ||
const scalingFns = generate_scaling_1.scalesFromMoments(moments); | ||
return { data, moments, types: inferedTypes, scalers: scalingFns }; | ||
} | ||
exports.dataJuggler = dataJuggler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianVnZ2xlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvanVnZ2xlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG1DQUF3RDtBQUN4RCx5REFLK0I7QUFTL0IsdURBQW1EO0FBQ25ELHlDQUFpRTtBQUVqRSxNQUFNLFlBQVksR0FDaEIsMkVBQTJFLENBQUM7QUFZOUUsZ0NBQWdDO0FBQ2hDOztHQUVHO0FBQ0gsU0FBZ0IsV0FBVyxDQUN6QixlQUF1QyxFQUN2QyxTQUEwQixFQUFFO0lBTTVCLE1BQU0sRUFBRSxLQUFLLEdBQUcsRUFBRSxFQUFFLFNBQVMsRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFDLEdBQUcsTUFBTSxDQUFDO0lBQ3JELE1BQU0sYUF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QU8sRUFBRSxLQUFLLEVBQUUsWUFBWSxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsQ0FBQztBQUNyRSxDQUFDO0FBakNELGtDQWlDQyJ9 |
@@ -29,2 +29,5 @@ "use strict"; | ||
get scaled() { | ||
if (lodash_1.isNull(this.raw)) { | ||
return null; | ||
} | ||
return !lodash_1.isNull(min) && !lodash_1.isNull(max) | ||
@@ -120,2 +123,2 @@ ? (this.raw - min) / (max - min) | ||
exports.parseDates = parseDates; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL3BhcnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbUNBQTBGO0FBRTFGLGtEQUEwQjtBQUUxQixnREFBZ0Q7QUFDaEQsdUZBQThELENBQUMsaUJBQWlCO0FBQ2hGLG1EQUFtRDtBQUNuRCxlQUFLLENBQUMsTUFBTSxDQUFDLDJCQUFpQixDQUFDLENBQUEsQ0FBQyxhQUFhO0FBRTdDLHlEQU8rQjtBQWUvQix1REFBK0U7QUFhbEUsUUFBQSxRQUFRLEdBQUcsQ0FBSSxDQUFJLEVBQUksRUFBRSxDQUFDLENBQUMsQ0FBQTtBQUV4QyxTQUFnQixpQkFBaUIsQ0FDL0IsV0FBMkIsRUFDM0IsT0FBeUIsRUFDekIsZUFBb0MsRUFDcEMsTUFBd0I7SUFFeEIsT0FBTyxRQUFRLENBQUMsRUFBRTtRQUNoQixPQUFPLHdCQUFTLENBQ2QsTUFBTSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQyxHQUFHLENBQzFCLENBQUMsQ0FBQyxRQUFRLEVBQUUsS0FBSyxDQUErQixFQUc5QyxFQUFFO1lBQ0YsTUFBTSxTQUFTLEdBQWMsV0FBVyxDQUFDLFFBQVEsQ0FBQy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DQUFtQixDQUNqQixLQUFLLEVBQ0wsVUFBVSxFQUNWLFNBQVMsQ0FDVixDQUNGLENBQUM7QUFDSixDQUFDO0FBMUJELGdDQTBCQyJ9 |
import { FormatterObject, GenericDatum, ParserObject } from './utils/dataInference'; | ||
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, InferObject, MomentsObject } from '../types/types'; | ||
import { ScalingFnsRecords } from './generate-scaling'; | ||
interface JuggleConfig<T> { | ||
@@ -18,3 +19,4 @@ types?: InferObject<T>; | ||
types: InferObject<T>; | ||
scalers: ScalingFnsRecords<T>; | ||
}; | ||
export {}; |
import { parseDates, parseDatumFactory } from './parse'; | ||
import { autoInferenceType } from './utils/dataInference'; | ||
import { scalesFromMoments } from './generate-scaling'; | ||
import { doKeysMatch } from './utils/parseObjects'; | ||
@@ -21,4 +22,5 @@ import { computeMoments, populateNullData } from './utils/stats'; | ||
const data = dataSet.map(datum => datumPreprocessor(datum)); | ||
return { data, moments, types: inferedTypes }; | ||
const scalingFns = scalesFromMoments(moments); | ||
return { data, moments, types: inferedTypes, scalers: scalingFns }; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianVnZ2xlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvanVnZ2xlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLGlCQUFpQixFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ3hELE9BQU8sRUFDTCxpQkFBaUIsRUFJbEIsTUFBTSx1QkFBdUIsQ0FBQztBQVMvQixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbkQsT0FBTyxFQUFFLGNBQWMsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUVqRSxNQUFNLFlBQVksR0FDaEIsMkVB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YUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUMsQ0FBQztJQUVoRSxNQUFNLE9BQU8sR0FBRyxjQUFjLENBQUMsT0FBTyxFQUFFLFlBQVksQ0FBQyxDQUFDO0lBRXRELE1BQU0saUJBQWlCLEdBQUcsaUJBQWlCLENBQUMsWUFBWSxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFFdEYsTUFBTSxJQUFJLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7SUFFNUQsTUFBTSxVQUFVLEdBQUcsaUJBQWlCLENBQUMsT0FBTyxDQUFDLENBQUE7SUFFN0MsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLENBQUM7QUFDckUsQ0FBQyJ9 |
@@ -24,2 +24,5 @@ import { get, isNaN, isNull, isNumber, toString } from 'lodash'; | ||
get scaled() { | ||
if (isNull(this.raw)) { | ||
return null; | ||
} | ||
return !isNull(min) && !isNull(max) | ||
@@ -113,2 +116,2 @@ ? (this.raw - min) / (max - min) | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL3BhcnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQTRCLFFBQVEsRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUUxRixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUM7QUFFMUIsZ0RBQWdEO0FBQ2hELE9BQU8saUJBQWlCL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 -5,0 +5,0 @@ "typings": "build/main/index.d.ts", |
@@ -73,5 +73,30 @@ # data-juggler 🤹♀️ | ||
On top of that you also get some getters for each variable that return the whole column, this could be cut eventually in a censorship attempt by my boss. | ||
Edit: the censorship did happen, this is not there anymore. | ||
## The rescaling functions | ||
It could be annoying having to rescale all your functions because some time having them fitted from min-max to 0-1 is not what you need! We got your back. Another entry in the magical return object of the juggler is `scalers`! Imaging the classical situation below: | ||
```javascript | ||
const d = [ | ||
{x: 0}, | ||
{x: 1}, | ||
{x: 2} | ||
] | ||
``` | ||
You can simply apply `dataJuggler`: | ||
```javascript | ||
const { data, scalers } = dataJuggler(d, { types: infer}) | ||
``` | ||
Now if you need to rescale the data you can simply do this: | ||
```javascript | ||
const newExtent = [0, 4] | ||
const rescaleV = scalers.x(...newExtent) | ||
const rescaledX = data.map(datum => rescaleX(datum.v.scaled)) // [0, 0.25, 0.5] | ||
``` | ||
## The configuration object | ||
@@ -78,0 +103,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
427888
39
10007
232