Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-juggler

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-juggler - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

6

build/main/lib/juggler.js

@@ -19,5 +19,3 @@ "use strict";

}
const dataSet = types
? filledDataSet
: parse_1.parseDates(filledDataSet, inferedTypes, parser);
const dataSet = parse_1.parseDates(filledDataSet, inferedTypes, parser);
const moments = stats_1.computeMoments(dataSet, inferedTypes);

@@ -29,2 +27,2 @@ const datumPreprocessor = parse_1.parseDatumFactory(inferedTypes, moments, formatter, parser);

exports.dataJuggler = dataJuggler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianVnZ2xlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvanVnZ2xlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG1DQUF3RDtBQUN4RCx5REFLK0I7QUFTL0IsdURBQW1EO0FBQ25ELHlDQUFpRTtBQUVqRSxNQUFNLFlBQVksR0FDaEIsMkVBQTJFLENBQUM7QUFZOUUsZ0NBQWdDO0FBQ2hDOztHQUVHO0FBQ0gsU0FBZ0IsV0FBVyxDQUN6QixlQUF1QyxFQUN2QyxTQUEwQixFQUFFO0lBTTVCLE1BQU0sRUFBRSxLQUFLLEdBQUcsRUFBRSxFQUFFLFNBQVMsRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFDLEdBQUcsTUFBTSxDQUFDO0lBQ3JELE1BQU0sYUFBYSxHQUFHLHdCQUFnQixDQUFDLGVBQWUsQ0FBQyxDQUFDO0lBRXhELE1BQU0sWUFBWSxHQUFHLGlDQUFpQixDQUNwQyxlQUFlLEVBQ2YsS0FBdUIsRUFDdkIsTUFBTSxDQUNQLENB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DQUN6QixlQUF1QyxFQUN2QyxTQUEwQixFQUFFO0lBTTVCLE1BQU0sRUFBRSxLQUFLLEdBQUcsRUFBRSxFQUFFLFNBQVMsRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFDLEdBQUcsTUFBTSxDQUFDO0lBQ3JELE1BQU0sYUFBYSxHQUFHLHdCQUFnQixDQUFDLGVBQWUsQ0FBQyxDQUFDO0lBRXhELE1BQU0sWUFBWSxHQUFHLGlDQUFpQixDQUNwQyxlQUFlLEVBQ2YsS0FBdUIsRUFDdkIsTUFBTSxDQUNQLENBQUM7SUFFRixJQUFJLENBQUMsMEJBQVcsQ0FBQyxlQUFlLEVBQUUsWUFBWSxDQUFDLEVBQUU7UUFDL0MsTUFBTSxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQztLQUMvQjtJQUVELE1BQU0sT0FBTyxHQUFHLGtCQUFVLENBQUMsYUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUMsQ0FBQztJQUVoRSxNQUFNLE9BQU8sR0FBRyxzQkFBYyxDQUFDLE9BQU8sRUFBRSxZQUFZLENBQUMsQ0FBQztJQUV0RCxNQUFNLGlCQUFpQixHQUFHLHlCQUFpQixDQUFDLFlBQVksRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBRXRGLE1BQU0sSUFBSSxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxpQkFBaUIsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0lBRTVELE9BQU8sRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxZQUFZLEVBQUUsQ0FBQztBQUNoRCxDQUFDO0FBOUJELGtDQThCQyJ9

@@ -15,14 +15,2 @@ "use strict";

exports.identity = (t) => t;
const defaultParseDate = (d) => {
switch (typeof d) {
case 'number':
return d;
case 'string':
return dayjs_1.default(d).unix();
case 'object': // null case for fuck sake javascript
return 0;
default:
return 0;
}
};
function parseDatumFactory(inferObject, moments, formatterObject, parser) {

@@ -36,3 +24,2 @@ return snapshot => {

const parse = lodash_1.get(parser, variable, exports.identity);
const parseDate = lodash_1.get(parser, variable, defaultParseDate);
switch (inference) {

@@ -64,7 +51,7 @@ case 'continuous': {

const { min, max } = moments[variable];
const rawValue = parseDate(value);
const rawValue = value;
const datum = {
raw: !lodash_1.isNaN(rawValue) ? rawValue : null,
raw: (!lodash_1.isNaN(rawValue) && lodash_1.isNumber(rawValue)) ? rawValue : null,
get dateTime() {
return dayjs_1.default.unix(Number(rawValue));
return dayjs_1.default.unix(this.raw || 0);
},

@@ -78,5 +65,5 @@ get isValid() {

get scaled() {
return !lodash_1.isNull(min) && !lodash_1.isNull(max) && !lodash_1.isNull(this.raw)
return !lodash_1.isNull(min) && !lodash_1.isNull(max) && !lodash_1.isNull(rawValue)
? (Number(rawValue) - min) / (max - min)
: 0;
: null;
}

@@ -119,11 +106,19 @@ };

exports.parseDatumFactory = parseDatumFactory;
const convertToUnix = (v) => {
if (lodash_1.isNumber(v)) {
return dayjs_1.default(v * 1000).unix();
}
else {
return dayjs_1.default(v).unix();
}
};
function parseDates(rawData, inferTypes, parser) {
const dateKeys = parseObjects_1.toPairs(inferTypes)
.filter(([__, t]) => t === 'date')
.map(([v, __]) => v);
.filter(([_, t]) => t === 'date')
.map(([v, _]) => v);
const isPairDate = (key, _) => dateKeys.includes(key);
const makeDayjs = (key, value) => lodash_1.get(parser, key, (v) => !lodash_1.isNaN(dayjs_1.default(String(v)).unix()) ? dayjs_1.default(String(v)).unix() : null)(value);
const makeDayjs = (key, value) => lodash_1.get(parser, key, (v) => !lodash_1.isNaN(dayjs_1.default(v).unix()) ? convertToUnix(v) : null)(value);
return rawData.map(datum => parseObjects_1.conditionalValueMap(datum, isPairDate, makeDayjs));
}
exports.parseDates = parseDates;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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zFCLE1BQXVCO0lBRXZCLE1BQU0sUUFBUSxHQUFHLHNCQUFPLENBQUMsVUFBVSxDQUFDO1NBQ2pDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLEtBQUssTUFBTSxDQUFDO1NBQ2hDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUV0QixNQUFNLFVBQVUsR0FBRyxDQUF1QixHQUFNLEVBQUUsQ0FBVSxFQUFVLEVBQUUsQ0FDdEUsUUFBUSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUV6QixNQUFNLFNBQVMsR0FBRyxDQUErQyxHQUFNLEVBQUUsS0FBUSxFQUFVLEVBQUUsQ0FDM0YsWUFBRyxDQUNELE1BQU0sRUFDTixHQUFHLEVBQ0gsQ0FBQyxDQUFJLEVBQUUsRUFBRSxDQUFDLENBQUMsY0FBSyxDQUFDLGVBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FDNUQsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUVWLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUN6QixrQ0FBbUIsQ0FDakIsS0FBSyxFQUNMLFVBQVUsRUFDVixTQUFTLENBQ1YsQ0FDRixDQUFDO0FBQ0osQ0FBQztBQTFCRCxnQ0EwQkMifQ==
import dayjs from 'dayjs';
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, DatumType, InferObject, NormalizingCategorical, NormalizingContinuous, NormalizingDatetime, StringKeyedObj } from '../../types/types';
export declare const isContinuous: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingContinuous;
export declare const isDatetime: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingDatetime;
export declare const isCategorical: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingCategorical;
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, DatumType, InferObject, StringKeyedObj } from '../../types/types';
export declare type GenericDatumValue = number | string | boolean | null;

@@ -7,0 +4,0 @@ export declare type GenericDatum<T extends StringKeyedObj> = {

@@ -14,10 +14,2 @@ "use strict";

dayjs_1.default.extend(customParseFormat_1.default); // use plugin
/** @hidden */
function hasMultipleProperties(obj, properties) {
return properties.every(p => obj.hasOwnProperty(p));
}
exports.isContinuous = (moment) => hasMultipleProperties(moment, ['min', 'max', 'sum']);
exports.isDatetime = (moment) => hasMultipleProperties(moment, ['min', 'max']) &&
!moment.hasOwnProperty('sum');
exports.isCategorical = (moment) => hasMultipleProperties(moment, ['frequencies']);
function valiDate(dateObj) {

@@ -86,2 +78,2 @@ return dayjs_1.default.isDayjs(dateObj) ? dateObj.isValid() : false;

exports.autoInferenceType = autoInferenceType;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YUluZmVyZW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdXRpbHMvZGF0YUluZmVyZW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGtEQUEwQjtBQUMxQixtQ0FBNEQ7QUFhNUQsaURBQTJDO0FBQzNDLG1DQUFxQztBQUVyQyxnREFBZ0Q7QUFDaEQsdUZBQThELENBQUMsaUJBQWlCO0FBQ2hGLG1EQUFtRDtBQUNuRCxlQUFLLENBQUMsTUFBTSxDQUFDLDJCQUFpQixDQUFDLENBQUEsQ0FBQyxhQUFhO0FBRTdDLGNBQW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0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQy9CLEdBQUcsQ0FBQyxHQUFHLENBQUMsRUFBRTtRQUNQLE1BQU0sQ0FBQyxHQUFHLFlBQUcsQ0FBQyxNQUFNLEVBQUUsR0FBRyxFQUFFLENBQUMsQ0FBVSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUM3QyxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFDM0MsT0FBTyxDQUFDLEdBQUcsRUFBRSxlQUFlLENBQUMsWUFBWSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakQsQ0FBQyxDQUFDLENBQUM7SUFDTCx5QkFBWSx3QkFBUyxDQUFDLE9BQU8sQ0FBQyxFQUFLLFdBQVcsRUFBRztBQUNuRCxDQUFDO0FBZkQsOENBZUMifQ==

@@ -1,2 +0,2 @@

import { InferObject, MomentsObject } from '../../types/types';
import { InferObject, MomentsObject, MomentsType } from '../../types/types';
import { GenericDatum } from './dataInference';

@@ -6,3 +6,3 @@ export declare function generateDefaultMoments<T>(inferObject: InferObject<T>): MomentsObject<T>;

export declare function populateNullData<T>(rawDataSet: Array<GenericDatum<T>>): Array<GenericDatum<T>>;
export declare const generateNewMoments: <T>(accumulator: MomentsObject<T>, datum: GenericDatum<T>) => MomentsObject<T>;
export declare const generateNewMoments: <T>(accumulator: MomentsObject<T>, datum: GenericDatum<T>, inferObject: InferObject<T>) => Record<keyof T, MomentsType>;
export declare function computeMoments<T>(rawDataSet: Array<GenericDatum<T>>, inferObject: InferObject<T>): MomentsObject<T>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const dataInference_1 = require("./dataInference");
const lodash_1 = require("lodash");
const parseObjects_1 = require("./parseObjects");
const mapParams = {
categorical: { frequencies: {} },
continuous: { min: null, max: null, sum: 0 },
date: { min: null, max: null }
};
const updateMin = (value, min) => Math.min(value, min);

@@ -17,3 +11,5 @@ const updateMax = (value, max) => Math.max(value, max);

const variables = getKeys(inferObject);
const moments = variables.reduce((acc, v) => (Object.assign({}, acc, { [v]: mapParams[inferObject[v]] })), {});
const moments = variables.reduce((acc, v) => (Object.assign({}, acc, { [v]: {
frequencies: {}, max: null, min: null, sum: 0
} })), {});
return moments;

@@ -35,14 +31,17 @@ }

exports.populateNullData = populateNullData;
exports.generateNewMoments = (accumulator, datum) => {
exports.generateNewMoments = (accumulator, datum, inferObject) => {
return parseObjects_1.fromPairs(parseObjects_1.toPairs(datum).map(([variable, value]) => {
const variableMoments = accumulator[variable];
if (dataInference_1.isCategorical(variableMoments) && typeof value === 'string') {
if (inferObject[variable] === 'categorical' && typeof value === 'string') {
const { frequencies } = variableMoments;
const newFrequencies = Object.assign({}, frequencies, { [value]: frequencies[value] ? frequencies[value] + 1 : 1 });
const newFrequencyMoments = {
frequencies: newFrequencies
frequencies: newFrequencies,
max: null,
min: null,
sum: 0
};
return [variable, newFrequencyMoments];
}
else if (dataInference_1.isContinuous(variableMoments) && typeof value === 'number') {
else if (inferObject[variable] === 'continuous' && typeof value === 'number') {
const { min, max, sum } = variableMoments;

@@ -53,9 +52,10 @@ const newMin = !lodash_1.isNull(min) ? updateMin(value, min) : value;

const newContinousMoments = {
frequencies: {},
max: newMax,
min: newMin,
sum: updatedSum
sum: updatedSum,
};
return [variable, newContinousMoments];
}
else if (dataInference_1.isDatetime(variableMoments) && typeof value === 'number') {
else if (inferObject[variable] === 'date' && typeof value === 'number') {
const { min, max } = variableMoments;

@@ -65,4 +65,6 @@ const newMin = !lodash_1.isNull(min) ? updateMin(value, min) : value;

const newDatetimeMoments = {
frequencies: {},
max: newMax,
min: newMin
min: newMin,
sum: 0,
};

@@ -78,6 +80,6 @@ return [variable, newDatetimeMoments];

const inferedObject = generateDefaultMoments(inferObject);
const momentsObject = rawDataSet.reduce(exports.generateNewMoments, inferedObject);
const momentsObject = rawDataSet.reduce((acc, datum) => exports.generateNewMoments(acc, datum, inferObject), inferedObject);
return momentsObject;
}
exports.computeMoments = computeMoments;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL3V0aWxzL3N0YXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsbURBTXdCO0FBRXhCLG1DQUErQjtBQUMvQixpREFBbUQ7QUFFbkQsTUFBTSxTQUFTLEdBQWlCO0lBQzlCLFdBQVcsRUFBRSxFQUFFLFdBQVcsRUFBRSxFQUFFLEVBQUU7SUFDaEMsVUFBVSxFQUFFLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUFFLEdBQUcsRUFBRSxDQUFDLEVBQUU7SUFDNUMsSUFBSSxFQUFFLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUFFO0NBQy9CLENBQUE7QUFFRCxNQUFNLFNBQVMsR0FBRyxDQUFDLEtBQWEsRUFBRSxHQUFXLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFBO0FBQ3RFLE1BQU0sU0FBUyxHQUFHLENBQUMsS0FBYSxFQUFFLEdBQVcsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUE7QUFFdEUsTUFBTSxPQUFPLEdBQUcsQ0FBSSxHQUFNLEVBQUUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFtQixDQUFBO0FBRWpFLE1BQU0sYUFBYSxHQUFHLENBQUksQ0FBUy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FBRyxFQUFFLE1BQU07Z0JBQ1gsR0FBRyxFQUFFLENBQUM7YUFDUCxDQUFBO1lBQ0QsT0FBTyxDQUFDLFFBQVEsRUFBRSxrQkFBa0IsQ0FBMkIsQ0FBQTtTQUNoRTthQUFNO1lBQ0wsT0FBTyxDQUFDLFFBQVEsRUFBRSxlQUFlLENBQXlDLENBQUE7U0FDM0U7SUFDSCxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBRUwsQ0FBQyxDQUFBO0FBRUQsU0FBZ0IsY0FBYyxDQUM1QixVQUFrQyxFQUNsQyxXQUEyQjtJQUkzQixNQUFNLGFBQWEsR0FBcUIsc0JBQXNCLENBQUMsV0FBVyxDQUFDLENBQUE7SUFDM0UsTUFBTSxhQUFhLEdBQXFCLFVBQVUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLEVBQUUsS0FBSyxFQUFFLEVBQUUsQ0FDdkUsMEJBQWtCLENBQUMsR0FBRyxFQUFFLEtBQUssRUFBRSxXQUFXLENBQUMsRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUU3RCxPQUFPLGFBQWEsQ0FBQTtBQUN0QixDQUFDO0FBWEQsd0NBV0MifQ==

@@ -23,3 +23,10 @@ import { Dayjs } from 'dayjs';

export declare type DatumType = keyof MapTypeInfer;
export declare type MomentsType = ValueOf<MapTypeInfer>;
export interface MomentsType {
sum: number;
min: number | null;
max: number | null;
frequencies: {
readonly [instance: string]: number;
};
}
export declare type MapSchema<T extends DatumType> = MapTypeInfer[T];

@@ -26,0 +33,0 @@ export interface StringKeyedObj {

@@ -17,5 +17,3 @@ import { parseDates, parseDatumFactory } from './parse';

}
const dataSet = types
? filledDataSet
: parseDates(filledDataSet, inferedTypes, parser);
const dataSet = parseDates(filledDataSet, inferedTypes, parser);
const moments = computeMoments(dataSet, inferedTypes);

@@ -26,2 +24,2 @@ const datumPreprocessor = parseDatumFactory(inferedTypes, moments, formatter, parser);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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ixNQUFNLEVBQUUsS0FBSyxHQUFHLEVBQUUsRUFBRSxTQUFTLEVBQUUsTUFBTSxHQUFHLEVBQUUsRUFBQyxHQUFHLE1BQU0sQ0FBQztJQUNyRCxNQUFNLGFBQWEsR0FBRyxnQkFBZ0IsQ0FBQyxlQUFlLENBQUMsQ0FBQztJQUV4RCxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FDcEMsZUFBZSxFQUNmLEtBQXVCLEVBQ3ZCLE1BQU0sQ0FDUCxDQUFDO0lBRUYsSUFBSSxDQUFDLFdBQVcsQ0FBQyxlQUFlLEVBQUUsWUFBWSxDQUFDLEVBQUU7UUFDL0MsTUFBTSxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQztLQUMvQjtJQUVELE1BQU0sT0FBTyxHQUFHLFVBQVUsQ0FBQyxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBRWhFLE1BQU0sT0FBTyxHQUFHLGNBQWMsQ0FBQyxPQUFPLEVBQUUsWUFBWSxDQUFDLENBQUM7SUFFdEQsTUFBTSxpQkFBaUIsR0FBRyxpQkFBaUIsQ0FBQyxZQUFZLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLENBQUMsQ0FBQztJQUV0RixNQUFNLElBQUksR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUU1RCxPQUFPLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsWUFBWSxFQUFFLENBQUM7QUFDaEQsQ0FBQyJ9

@@ -1,2 +0,2 @@

import { get, isNaN, isNull, toString } from 'lodash';
import { get, isNaN, isNull, isNumber, toString } from 'lodash';
import dayjs from 'dayjs';

@@ -10,14 +10,2 @@ // tslint:disable-next-line:no-submodule-imports

export const identity = (t) => t;
const defaultParseDate = (d) => {
switch (typeof d) {
case 'number':
return d;
case 'string':
return dayjs(d).unix();
case 'object': // null case for fuck sake javascript
return 0;
default:
return 0;
}
};
export function parseDatumFactory(inferObject, moments, formatterObject, parser) {

@@ -31,3 +19,2 @@ return snapshot => {

const parse = get(parser, variable, identity);
const parseDate = get(parser, variable, defaultParseDate);
switch (inference) {

@@ -59,7 +46,7 @@ case 'continuous': {

const { min, max } = moments[variable];
const rawValue = parseDate(value);
const rawValue = value;
const datum = {
raw: !isNaN(rawValue) ? rawValue : null,
raw: (!isNaN(rawValue) && isNumber(rawValue)) ? rawValue : null,
get dateTime() {
return dayjs.unix(Number(rawValue));
return dayjs.unix(this.raw || 0);
},

@@ -73,5 +60,5 @@ get isValid() {

get scaled() {
return !isNull(min) && !isNull(max) && !isNull(this.raw)
return !isNull(min) && !isNull(max) && !isNull(rawValue)
? (Number(rawValue) - min) / (max - min)
: 0;
: null;
}

@@ -113,10 +100,18 @@ };

}
const convertToUnix = (v) => {
if (isNumber(v)) {
return dayjs(v * 1000).unix();
}
else {
return dayjs(v).unix();
}
};
export function parseDates(rawData, inferTypes, parser) {
const dateKeys = toPairs(inferTypes)
.filter(([__, t]) => t === 'date')
.map(([v, __]) => v);
.filter(([_, t]) => t === 'date')
.map(([v, _]) => v);
const isPairDate = (key, _) => dateKeys.includes(key);
const makeDayjs = (key, value) => get(parser, key, (v) => !isNaN(dayjs(String(v)).unix()) ? dayjs(String(v)).unix() : null)(value);
const makeDayjs = (key, value) => get(parser, key, (v) => !isNaN(dayjs(v).unix()) ? convertToUnix(v) : null)(value);
return rawData.map(datum => conditionalValueMap(datum, isPairDate, makeDayjs));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL3BhcnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQ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JLENBQzVELENBQUMsS0FBSyxDQUFDLENBQUE7SUFFVixPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FDekIsbUJBQW1CLENBQ2pCLEtBQUssRUFDTCxVQUFVLEVBQ1YsU0FBUyxDQUNWLENBQ0YsQ0FBQztBQUNKLENBQUMifQ==
import dayjs from 'dayjs';
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, DatumType, InferObject, NormalizingCategorical, NormalizingContinuous, NormalizingDatetime, StringKeyedObj } from '../../types/types';
export declare const isContinuous: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingContinuous;
export declare const isDatetime: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingDatetime;
export declare const isCategorical: (moment: NormalizingContinuous | NormalizingDatetime | NormalizingCategorical) => moment is NormalizingCategorical;
import { CategoricalDatum, ContinuousDatum, DatetimeDatum, DatumType, InferObject, StringKeyedObj } from '../../types/types';
export declare type GenericDatumValue = number | string | boolean | null;

@@ -7,0 +4,0 @@ export declare type GenericDatum<T extends StringKeyedObj> = {

@@ -9,10 +9,2 @@ import dayjs from 'dayjs';

dayjs.extend(CustomParseFormat); // use plugin
/** @hidden */
function hasMultipleProperties(obj, properties) {
return properties.every(p => obj.hasOwnProperty(p));
}
export const isContinuous = (moment) => hasMultipleProperties(moment, ['min', 'max', 'sum']);
export const isDatetime = (moment) => hasMultipleProperties(moment, ['min', 'max']) &&
!moment.hasOwnProperty('sum');
export const isCategorical = (moment) => hasMultipleProperties(moment, ['frequencies']);
export function valiDate(dateObj) {

@@ -82,2 +74,2 @@ return dayjs.isDayjs(dateObj) ? dateObj.isValid() : false;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YUluZmVyZW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdX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FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFDM0MsT0FBTyxDQUFDLEdBQUcsRUFBRSxlQUFlLENBQUMsWUFBWSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakQsQ0FBQyxDQUFDLENBQUM7SUFDTCxPQUFPLEVBQUUsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRyxXQUFXLEVBQUUsQ0FBQztBQUNuRCxDQUFDIn0=

@@ -1,2 +0,2 @@

import { InferObject, MomentsObject } from '../../types/types';
import { InferObject, MomentsObject, MomentsType } from '../../types/types';
import { GenericDatum } from './dataInference';

@@ -6,3 +6,3 @@ export declare function generateDefaultMoments<T>(inferObject: InferObject<T>): MomentsObject<T>;

export declare function populateNullData<T>(rawDataSet: Array<GenericDatum<T>>): Array<GenericDatum<T>>;
export declare const generateNewMoments: <T>(accumulator: MomentsObject<T>, datum: GenericDatum<T>) => MomentsObject<T>;
export declare const generateNewMoments: <T>(accumulator: MomentsObject<T>, datum: GenericDatum<T>, inferObject: InferObject<T>) => Record<keyof T, MomentsType>;
export declare function computeMoments<T>(rawDataSet: Array<GenericDatum<T>>, inferObject: InferObject<T>): MomentsObject<T>;

@@ -1,9 +0,3 @@

import { isCategorical, isContinuous, isDatetime } from './dataInference';
import { isNull } from 'lodash';
import { fromPairs, toPairs } from './parseObjects';
const mapParams = {
categorical: { frequencies: {} },
continuous: { min: null, max: null, sum: 0 },
date: { min: null, max: null }
};
const updateMin = (value, min) => Math.min(value, min);

@@ -15,3 +9,5 @@ const updateMax = (value, max) => Math.max(value, max);

const variables = getKeys(inferObject);
const moments = variables.reduce((acc, v) => ({ ...acc, [v]: mapParams[inferObject[v]] }), {});
const moments = variables.reduce((acc, v) => ({ ...acc, [v]: {
frequencies: {}, max: null, min: null, sum: 0
} }), {});
return moments;

@@ -30,6 +26,6 @@ }

}
export const generateNewMoments = (accumulator, datum) => {
export const generateNewMoments = (accumulator, datum, inferObject) => {
return fromPairs(toPairs(datum).map(([variable, value]) => {
const variableMoments = accumulator[variable];
if (isCategorical(variableMoments) && typeof value === 'string') {
if (inferObject[variable] === 'categorical' && typeof value === 'string') {
const { frequencies } = variableMoments;

@@ -41,7 +37,10 @@ const newFrequencies = {

const newFrequencyMoments = {
frequencies: newFrequencies
frequencies: newFrequencies,
max: null,
min: null,
sum: 0
};
return [variable, newFrequencyMoments];
}
else if (isContinuous(variableMoments) && typeof value === 'number') {
else if (inferObject[variable] === 'continuous' && typeof value === 'number') {
const { min, max, sum } = variableMoments;

@@ -52,9 +51,10 @@ const newMin = !isNull(min) ? updateMin(value, min) : value;

const newContinousMoments = {
frequencies: {},
max: newMax,
min: newMin,
sum: updatedSum
sum: updatedSum,
};
return [variable, newContinousMoments];
}
else if (isDatetime(variableMoments) && typeof value === 'number') {
else if (inferObject[variable] === 'date' && typeof value === 'number') {
const { min, max } = variableMoments;

@@ -64,4 +64,6 @@ const newMin = !isNull(min) ? updateMin(value, min) : value;

const newDatetimeMoments = {
frequencies: {},
max: newMax,
min: newMin
min: newMin,
sum: 0,
};

@@ -77,5 +79,5 @@ return [variable, newDatetimeMoments];

const inferedObject = generateDefaultMoments(inferObject);
const momentsObject = rawDataSet.reduce(generateNewMoments, inferedObject);
const momentsObject = rawDataSet.reduce((acc, datum) => generateNewMoments(acc, datum, inferObject), inferedObject);
return momentsObject;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL3V0aWxzL3N0YXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFHTCxhQUFhLEVBQ2IsWUFBWSxFQUNaLFVBQVUsRUFDWCxNQUFNLGlCQUFpQixDQUFBO0FBRXhCLE9BQU8sRUF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UcsRUFBRSxDQUFDO2FBQ1AsQ0FBQTtZQUNELE9BQU8sQ0FBQyxRQUFRLEVBQUUsa0JBQWtCLENBQTJCLENBQUE7U0FDaEU7YUFBTTtZQUNMLE9BQU8sQ0FBQyxRQUFRLEVBQUUsZUFBZSxDQUF5QyxDQUFBO1NBQzNFO0lBQ0gsQ0FBQyxDQUFDLENBQUMsQ0FBQTtBQUVMLENBQUMsQ0FBQTtBQUVELE1BQU0sVUFBVSxjQUFjLENBQzVCLFVBQWtDLEVBQ2xDLFdBQTJCO0lBSTNCLE1BQU0sYUFBYSxHQUFxQixzQkFBc0IsQ0FBQyxXQUFXLENBQUMsQ0FBQTtJQUMzRSxNQUFNLGFBQWEsR0FBcUIsVUFBVSxDQUFDLE1BQU0sQ0FBQyxDQUFDLEdBQUcsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUN2RSxrQkFBa0IsQ0FBQyxHQUFHLEVBQUUsS0FBSyxFQUFFLFdBQVcsQ0FBQyxFQUFFLGFBQWEsQ0FBQyxDQUFBO0lBRTdELE9BQU8sYUFBYSxDQUFBO0FBQ3RCLENBQUMifQ==

@@ -23,3 +23,10 @@ import { Dayjs } from 'dayjs';

export declare type DatumType = keyof MapTypeInfer;
export declare type MomentsType = ValueOf<MapTypeInfer>;
export interface MomentsType {
sum: number;
min: number | null;
max: number | null;
frequencies: {
readonly [instance: string]: number;
};
}
export declare type MapSchema<T extends DatumType> = MapTypeInfer[T];

@@ -26,0 +33,0 @@ export interface StringKeyedObj {

{
"name": "data-juggler",
"version": "0.2.1",
"version": "0.3.0",
"main": "build/main/index.js",

@@ -5,0 +5,0 @@ "typings": "build/main/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc