@datashaper/arquero
Advanced tools
Comparing version 3.1.0 to 4.0.0
@@ -5,4 +5,4 @@ /*! | ||
*/ | ||
import { DataType } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import { DataType } from './types.js'; | ||
/** | ||
@@ -9,0 +9,0 @@ * Returns a map of all of the column getters for a table. |
@@ -0,3 +1,6 @@ | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ import { DataType } from '@datashaper/schema'; | ||
import { determineType } from './data.js'; | ||
import { DataType } from './types.js'; | ||
/** | ||
@@ -4,0 +7,0 @@ * Returns a map of all of the column getters for a table. |
@@ -5,4 +5,4 @@ /*! | ||
*/ | ||
import type { DataType } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import type { DataType } from './types.js'; | ||
/** | ||
@@ -9,0 +9,0 @@ * Generates column typings info for a table. |
@@ -1,3 +0,7 @@ | ||
import type { Value } from './types.js'; | ||
import { DataType } from './types.js'; | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ | ||
import type { Value } from '@datashaper/schema'; | ||
import { DataType } from '@datashaper/schema'; | ||
/** | ||
@@ -4,0 +8,0 @@ * Guess the type of a table value with more discernment than typeof |
@@ -1,9 +0,6 @@ | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ import isArray from 'lodash-es/isArray.js'; | ||
import { DataType } from '@datashaper/schema'; | ||
import isArray from 'lodash-es/isArray.js'; | ||
import isDate from 'lodash-es/isDate.js'; | ||
import isNaN from 'lodash-es/isNaN.js'; | ||
import isNil from 'lodash-es/isNil.js'; | ||
import { DataType } from './types.js'; | ||
/** | ||
@@ -10,0 +7,0 @@ * Guess the type of a table value with more discernment than typeof |
@@ -5,4 +5,4 @@ /*! | ||
*/ | ||
import type { TableMetadata } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import type { TableMetadata } from './types.js'; | ||
/** | ||
@@ -9,0 +9,0 @@ * Performs type inference and stats on a table/columns. |
@@ -0,3 +1,7 @@ | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ | ||
import type { ColumnStats } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import type { ColumnStats } from './types.js'; | ||
/** | ||
@@ -4,0 +8,0 @@ * Generates detailed column stats for a table. |
@@ -1,8 +0,5 @@ | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import { op } from 'arquero'; | ||
import { DataType } from '@datashaper/schema'; | ||
import { op } from 'arquero'; | ||
import { fixedBinCount } from './binning.js'; | ||
import { determineType } from './data.js'; | ||
import { DataType } from './types.js'; | ||
/** | ||
@@ -9,0 +6,0 @@ * Generates detailed column stats for a table. |
@@ -5,56 +5,4 @@ /*! | ||
*/ | ||
import type { TableMetadata } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
export declare enum DataType { | ||
Array = "array", | ||
Boolean = "boolean", | ||
Date = "date", | ||
Number = "number", | ||
String = "string", | ||
Text = "text", | ||
Object = "object", | ||
Undefined = "undefined", | ||
Unknown = "unknown" | ||
} | ||
/** | ||
* A cell value in Arquero | ||
*/ | ||
export declare type Value = any; | ||
export interface ColumnStats { | ||
type: DataType; | ||
count: number; | ||
distinct: number; | ||
invalid: number; | ||
mode: any; | ||
min?: number; | ||
max?: number; | ||
mean?: number; | ||
median?: number; | ||
stdev?: number; | ||
bins?: Bin[]; | ||
categories?: Category[]; | ||
} | ||
export interface Bin { | ||
min: number | string; | ||
count: number; | ||
} | ||
export interface Category { | ||
name: string; | ||
count: number; | ||
} | ||
/** | ||
* Stores basic meta and stats about a column | ||
*/ | ||
export interface ColumnMetadata { | ||
name: string; | ||
type: DataType; | ||
stats?: ColumnStats; | ||
} | ||
export interface TableMetadata { | ||
rows: number; | ||
cols: number; | ||
/** | ||
* Metadata for each column | ||
*/ | ||
columns: Record<string, ColumnMetadata>; | ||
} | ||
export interface TableContainer<T = unknown> { | ||
@@ -83,5 +31,1 @@ /** | ||
} | ||
export declare enum SortDirection { | ||
Ascending = "asc", | ||
Descending = "desc" | ||
} |
@@ -1,17 +0,4 @@ | ||
export var DataType; | ||
(function(DataType) { | ||
DataType["Array"] = 'array'; | ||
DataType["Boolean"] = 'boolean'; | ||
DataType["Date"] = 'date'; | ||
DataType["Number"] = 'number'; | ||
DataType["String"] = 'string'; | ||
DataType["Text"] = 'text'; | ||
DataType["Object"] = 'object'; | ||
DataType["Undefined"] = 'undefined'; | ||
DataType["Unknown"] = 'unknown'; | ||
})(DataType || (DataType = {})); | ||
export var SortDirection; | ||
(function(SortDirection) { | ||
SortDirection["Ascending"] = 'asc'; | ||
SortDirection["Descending"] = 'desc'; | ||
})(SortDirection || (SortDirection = {})); | ||
/*! | ||
* Copyright (c) Microsoft. All rights reserved. | ||
* Licensed under the MIT license. See LICENSE file in the project. | ||
*/ export { }; |
@@ -7,25 +7,9 @@ ## API Report File for "@datashaper/arquero" | ||
import type { ColumnStats } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import type { default as ColumnTable_2 } from 'arquero/dist/types/table/column-table.js'; | ||
import { DataType } from '@datashaper/schema'; | ||
import type { TableMetadata } from '@datashaper/schema'; | ||
import type { Value } from '@datashaper/schema'; | ||
// Warning: (ae-missing-release-tag) "Bin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface Bin { | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
min: number | string; | ||
} | ||
// Warning: (ae-missing-release-tag) "Category" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface Category { | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
name: string; | ||
} | ||
// Warning: (ae-missing-release-tag) "coerce" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -41,14 +25,2 @@ // | ||
// Warning: (ae-missing-release-tag) "ColumnMetadata" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public | ||
export interface ColumnMetadata { | ||
// (undocumented) | ||
name: string; | ||
// (undocumented) | ||
stats?: ColumnStats; | ||
// (undocumented) | ||
type: DataType; | ||
} | ||
// Warning: (ae-missing-release-tag) "columnNamesWithZeros" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -59,32 +31,2 @@ // | ||
// Warning: (ae-missing-release-tag) "ColumnStats" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface ColumnStats { | ||
// (undocumented) | ||
bins?: Bin[]; | ||
// (undocumented) | ||
categories?: Category[]; | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
distinct: number; | ||
// (undocumented) | ||
invalid: number; | ||
// (undocumented) | ||
max?: number; | ||
// (undocumented) | ||
mean?: number; | ||
// (undocumented) | ||
median?: number; | ||
// (undocumented) | ||
min?: number; | ||
// (undocumented) | ||
mode: any; | ||
// (undocumented) | ||
stdev?: number; | ||
// (undocumented) | ||
type: DataType; | ||
} | ||
// Warning: (ae-missing-release-tag) "columnType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -105,26 +47,2 @@ // | ||
// Warning: (ae-missing-release-tag) "DataType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export enum DataType { | ||
// (undocumented) | ||
Array = "array", | ||
// (undocumented) | ||
Boolean = "boolean", | ||
// (undocumented) | ||
Date = "date", | ||
// (undocumented) | ||
Number = "number", | ||
// (undocumented) | ||
Object = "object", | ||
// (undocumented) | ||
String = "string", | ||
// (undocumented) | ||
Text = "text", | ||
// (undocumented) | ||
Undefined = "undefined", | ||
// (undocumented) | ||
Unknown = "unknown" | ||
} | ||
// Warning: (ae-missing-release-tag) "determineType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -188,12 +106,2 @@ // | ||
// Warning: (ae-missing-release-tag) "SortDirection" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export enum SortDirection { | ||
// (undocumented) | ||
Ascending = "asc", | ||
// (undocumented) | ||
Descending = "desc" | ||
} | ||
// Warning: (ae-missing-release-tag) "stats" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -214,20 +122,4 @@ // | ||
// Warning: (ae-missing-release-tag) "TableMetadata" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface TableMetadata { | ||
// (undocumented) | ||
cols: number; | ||
columns: Record<string, ColumnMetadata>; | ||
// (undocumented) | ||
rows: number; | ||
} | ||
// Warning: (ae-missing-release-tag) "Value" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public | ||
export type Value = any; | ||
// (No @packageDocumentation comment for this package) | ||
``` |
@@ -7,25 +7,9 @@ ## API Report File for "@datashaper/arquero" | ||
import type { ColumnStats } from '@datashaper/schema'; | ||
import type ColumnTable from 'arquero/dist/types/table/column-table'; | ||
import type { default as ColumnTable_2 } from 'arquero/dist/types/table/column-table.js'; | ||
import { DataType } from '@datashaper/schema'; | ||
import type { TableMetadata } from '@datashaper/schema'; | ||
import type { Value } from '@datashaper/schema'; | ||
// Warning: (ae-missing-release-tag) "Bin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface Bin { | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
min: number | string; | ||
} | ||
// Warning: (ae-missing-release-tag) "Category" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface Category { | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
name: string; | ||
} | ||
// Warning: (ae-missing-release-tag) "coerce" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -41,14 +25,2 @@ // | ||
// Warning: (ae-missing-release-tag) "ColumnMetadata" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public | ||
export interface ColumnMetadata { | ||
// (undocumented) | ||
name: string; | ||
// (undocumented) | ||
stats?: ColumnStats; | ||
// (undocumented) | ||
type: DataType; | ||
} | ||
// Warning: (ae-missing-release-tag) "columnNamesWithZeros" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -59,32 +31,2 @@ // | ||
// Warning: (ae-missing-release-tag) "ColumnStats" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface ColumnStats { | ||
// (undocumented) | ||
bins?: Bin[]; | ||
// (undocumented) | ||
categories?: Category[]; | ||
// (undocumented) | ||
count: number; | ||
// (undocumented) | ||
distinct: number; | ||
// (undocumented) | ||
invalid: number; | ||
// (undocumented) | ||
max?: number; | ||
// (undocumented) | ||
mean?: number; | ||
// (undocumented) | ||
median?: number; | ||
// (undocumented) | ||
min?: number; | ||
// (undocumented) | ||
mode: any; | ||
// (undocumented) | ||
stdev?: number; | ||
// (undocumented) | ||
type: DataType; | ||
} | ||
// Warning: (ae-missing-release-tag) "columnType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -105,26 +47,2 @@ // | ||
// Warning: (ae-missing-release-tag) "DataType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export enum DataType { | ||
// (undocumented) | ||
Array = "array", | ||
// (undocumented) | ||
Boolean = "boolean", | ||
// (undocumented) | ||
Date = "date", | ||
// (undocumented) | ||
Number = "number", | ||
// (undocumented) | ||
Object = "object", | ||
// (undocumented) | ||
String = "string", | ||
// (undocumented) | ||
Text = "text", | ||
// (undocumented) | ||
Undefined = "undefined", | ||
// (undocumented) | ||
Unknown = "unknown" | ||
} | ||
// Warning: (ae-missing-release-tag) "determineType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -188,12 +106,2 @@ // | ||
// Warning: (ae-missing-release-tag) "SortDirection" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export enum SortDirection { | ||
// (undocumented) | ||
Ascending = "asc", | ||
// (undocumented) | ||
Descending = "desc" | ||
} | ||
// Warning: (ae-missing-release-tag) "stats" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
@@ -214,20 +122,4 @@ // | ||
// Warning: (ae-missing-release-tag) "TableMetadata" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public (undocumented) | ||
export interface TableMetadata { | ||
// (undocumented) | ||
cols: number; | ||
columns: Record<string, ColumnMetadata>; | ||
// (undocumented) | ||
rows: number; | ||
} | ||
// Warning: (ae-missing-release-tag) "Value" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) | ||
// | ||
// @public | ||
export type Value = any; | ||
// (No @packageDocumentation comment for this package) | ||
``` |
{ | ||
"name": "@datashaper/arquero", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"type": "module", | ||
@@ -49,2 +49,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@datashaper/schema": "^3.0.0", | ||
"lodash-es": "^4.17.21" | ||
@@ -51,0 +52,0 @@ }, |
@@ -5,6 +5,6 @@ /*! | ||
*/ | ||
import { DataType } from '@datashaper/schema' | ||
import type ColumnTable from 'arquero/dist/types/table/column-table' | ||
import { determineType } from './data.js' | ||
import { DataType } from './types.js' | ||
@@ -11,0 +11,0 @@ /** |
@@ -5,6 +5,6 @@ /*! | ||
*/ | ||
import type { DataType } from '@datashaper/schema' | ||
import type ColumnTable from 'arquero/dist/types/table/column-table' | ||
import { columnType } from './columns.js' | ||
import type { DataType } from './types.js' | ||
@@ -11,0 +11,0 @@ // arquero uses 1000 as default, but we're sampling the table so assuming higher odds of valid values |
@@ -5,2 +5,4 @@ /*! | ||
*/ | ||
import type { Value } from '@datashaper/schema' | ||
import { DataType } from '@datashaper/schema' | ||
import isArray from 'lodash-es/isArray.js' | ||
@@ -11,5 +13,2 @@ import isDate from 'lodash-es/isDate.js' | ||
import type { Value } from './types.js' | ||
import { DataType } from './types.js' | ||
/** | ||
@@ -16,0 +15,0 @@ * Guess the type of a table value with more discernment than typeof |
@@ -5,2 +5,3 @@ /*! | ||
*/ | ||
import type { ColumnMetadata, TableMetadata } from '@datashaper/schema' | ||
import type ColumnTable from 'arquero/dist/types/table/column-table' | ||
@@ -10,3 +11,2 @@ | ||
import { stats } from './stats.js' | ||
import type { ColumnMetadata, TableMetadata } from './types.js' | ||
@@ -13,0 +13,0 @@ /** |
@@ -6,2 +6,4 @@ /*! | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
import type { Bin, Category, ColumnStats } from '@datashaper/schema' | ||
import { DataType } from '@datashaper/schema' | ||
import { op } from 'arquero' | ||
@@ -12,4 +14,2 @@ import type ColumnTable from 'arquero/dist/types/table/column-table' | ||
import { determineType } from './data.js' | ||
import type { Bin, Category, ColumnStats } from './types.js' | ||
import { DataType } from './types.js' | ||
@@ -16,0 +16,0 @@ /** |
@@ -5,64 +5,5 @@ /*! | ||
*/ | ||
import type { TableMetadata } from '@datashaper/schema' | ||
import type ColumnTable from 'arquero/dist/types/table/column-table' | ||
export enum DataType { | ||
Array = 'array', | ||
Boolean = 'boolean', | ||
Date = 'date', | ||
Number = 'number', | ||
String = 'string', | ||
Text = 'text', | ||
Object = 'object', | ||
Undefined = 'undefined', | ||
Unknown = 'unknown', | ||
} | ||
/** | ||
* A cell value in Arquero | ||
*/ | ||
export type Value = any | ||
export interface ColumnStats { | ||
type: DataType | ||
count: number | ||
distinct: number | ||
invalid: number | ||
mode: any | ||
min?: number | ||
max?: number | ||
mean?: number | ||
median?: number | ||
stdev?: number | ||
bins?: Bin[] | ||
categories?: Category[] | ||
} | ||
export interface Bin { | ||
min: number | string | ||
count: number | ||
} | ||
export interface Category { | ||
name: string | ||
count: number | ||
} | ||
/** | ||
* Stores basic meta and stats about a column | ||
*/ | ||
export interface ColumnMetadata { | ||
name: string | ||
type: DataType | ||
stats?: ColumnStats | ||
} | ||
export interface TableMetadata { | ||
rows: number | ||
cols: number | ||
/** | ||
* Metadata for each column | ||
*/ | ||
columns: Record<string, ColumnMetadata> | ||
} | ||
export interface TableContainer<T = unknown> { | ||
@@ -91,6 +32,1 @@ /** | ||
} | ||
export enum SortDirection { | ||
Ascending = 'asc', | ||
Descending = 'desc', | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
122595
3
60
2017
1
+ Added@datashaper/schema@^3.0.0
+ Added@datashaper/schema@3.1.1(transitive)