Options
All
  • Public
  • Public/Protected
  • All
Menu

Data-Forge

Index

Type aliases

AggregateFn

AggregateFn<ValueT, ToT>: function

A user-defined function that aggregtates a value into an accumulator and returns the new result.

Type parameters

  • ValueT

  • ToT

Type declaration

    • (accum: ToT, value: ValueT): ToT
    • Parameters

      • accum: ToT
      • value: ValueT

      Returns ToT

CallbackFn

CallbackFn<ValueT>: function

A user-defined callback function that can be applied to each value.

Type parameters

  • ValueT

Type declaration

    • (value: ValueT, index: number): void
    • Parameters

      • value: ValueT
      • index: number

      Returns void

ComparerFn

ComparerFn<ValueT1, ValueT2>: function

A user-defined comparer function that Compares to values and returns true (truthy) if they are equivalent or false (falsy) if not.

Type parameters

  • ValueT1

  • ValueT2

Type declaration

    • (a: ValueT1, b: ValueT2): boolean
    • Parameters

      • a: ValueT1
      • b: ValueT2

      Returns boolean

DataFrameConfigFn

DataFrameConfigFn<IndexT, ValueT>: function

Type parameters

  • IndexT

  • ValueT

Type declaration

GapFillFn

GapFillFn<ValueT, ResultT>: function

Type parameters

  • ValueT

  • ResultT

Type declaration

    • (a: ValueT, b: ValueT): ResultT[]
    • Parameters

      • a: ValueT
      • b: ValueT

      Returns ResultT[]

JoinFn

JoinFn<ValueT1, ValueT2, ResultT>: function

A user-defined function that joins two values and produces a result.

Type parameters

  • ValueT1

  • ValueT2

  • ResultT

Type declaration

    • (a: ValueT1, b: ValueT2): ResultT
    • Parameters

      • a: ValueT1
      • b: ValueT2

      Returns ResultT

PredicateFn

PredicateFn<ValueT>: function

A user-defined predicate function, returns true or false based on input. A predicate function for testing a value against another.

Type parameters

  • ValueT

Type declaration

    • (value: any, against: any): boolean
    • Parameters

      • value: any
      • against: any

      Returns boolean

SelectorFn

SelectorFn<FromT, ToT>: function

A user-defined selector function with no index. Transforms a value into another kind of value.

Type parameters

  • FromT

  • ToT

Type declaration

    • (value: FromT): ToT
    • Parameters

      • value: FromT

      Returns ToT

SelectorWithIndexFn

SelectorWithIndexFn<FromT, ToT>: function

A user-defined selector function. Transforms a value into another kind of value.

Type parameters

  • FromT

  • ToT

Type declaration

    • (value: FromT, index: number): ToT
    • Parameters

      • value: FromT
      • index: number

      Returns ToT

SeriesAggregatorFn

SeriesAggregatorFn<IndexT, ValueT, OutputT>: function

An function that aggregates a series.

Type parameters

  • IndexT

  • ValueT

  • OutputT

Type declaration

    • (values: ISeries<IndexT, ValueT>): OutputT
    • Parameters

      Returns OutputT

SeriesConfigFn

SeriesConfigFn<IndexT, ValueT>: function

Type parameters

  • IndexT

  • ValueT

Type declaration

SeriesSelectorFn

SeriesSelectorFn<IndexT, DataFrameValueT, SeriesValueT>: function

A selector function that can select a series from a dataframe.

Type parameters

  • IndexT

  • DataFrameValueT

  • SeriesValueT

Type declaration

    • Parameters

      Returns ISeries<IndexT, SeriesValueT>

Zip2Fn

Zip2Fn<T1, T2, ReturnT>: function

Type parameters

  • T1

  • T2

  • ReturnT

Type declaration

    • (a: T1, b: T2): ReturnT
    • Parameters

      • a: T1
      • b: T2

      Returns ReturnT

Zip3Fn

Zip3Fn<T1, T2, T3, ReturnT>: function

Type parameters

  • T1

  • T2

  • T3

  • ReturnT

Type declaration

    • (a: T1, b: T2, c: T3): ReturnT
    • Parameters

      • a: T1
      • b: T2
      • c: T3

      Returns ReturnT

Zip4Fn

Zip4Fn<T1, T2, T3, T4, ReturnT>: function

Type parameters

  • T1

  • T2

  • T3

  • T4

  • ReturnT

Type declaration

    • (a: T1, b: T2, c: T3, d: T4): ReturnT
    • Parameters

      • a: T1
      • b: T2
      • c: T3
      • d: T4

      Returns ReturnT

Zip5Fn

Zip5Fn<T1, T2, T3, T4, T5, ReturnT>: function

Type parameters

  • T1

  • T2

  • T3

  • T4

  • T5

  • ReturnT

Type declaration

    • (a: T1, b: T2, c: T3, d: T4): ReturnT
    • Parameters

      • a: T1
      • b: T2
      • c: T3
      • d: T4

      Returns ReturnT

ZipNFn

ZipNFn<ValueT, ReturnT>: function

User-defined zipper functions. Used to 'zip together' multiple series or dataframes.

Type parameters

  • ValueT

  • ReturnT

Type declaration

    • (input: ISeries<number, ValueT>): ReturnT
    • Parameters

      Returns ReturnT

Functions

fromCSV

  • Deserialize a DataFrame from a CSV text string.

    Parameters

    Returns DataFrame<number, any>

    Returns a dataframe that has been deserialized from the CSV data.

fromJSON

  • fromJSON(jsonTextString: string): IDataFrame<number, any>
  • Deserialize a dataframe from a JSON text string.

    Parameters

    • jsonTextString: string

      The JSON text to deserialize.

    Returns IDataFrame<number, any>

    Returns a dataframe that has been deserialized from the JSON data.

fromJSON5

  • fromJSON5(jsonTextString: string): IDataFrame<number, any>
  • Deserialize a dataframe from a JSON5 text string.

    Parameters

    • jsonTextString: string

      The JSON5 text to deserialize.

    Returns IDataFrame<number, any>

    Returns a dataframe that has been deserialized from the JSON data.

fromObject

  • Convert a regular JavaScript obejct to a dataframe. Each row in the dataframe represents a field from the object.

    Parameters

    • obj: any

      The JavaScript object to convert to a dataframe.

    Returns IDataFrame<number, IFieldRecord>

    Returns a dataframe that lists the fields in the pass-in object.

matrix

  • matrix(numColumns: number, numRows: number, start: number, increment: number): IDataFrame<number, any>
  • Generate a data-frame containing a matrix of values.

    Parameters

    • numColumns: number

      The number of columns in the data-frame.

    • numRows: number

      The number of rows in the data-frame.

    • start: number

      The starting value.

    • increment: number

      The value to increment by for each new value.

    Returns IDataFrame<number, any>

    Returns a dataframe that contains a matrix of generated values.

range

  • range(start: number, count: number): ISeries<number, number>
  • Generate a series from a range of numbers.

    Parameters

    • start: number

      The value of the first number in the range.

    • count: number

      The number of sequential values in the range.

    Returns ISeries<number, number>

    Returns a series with a sequence of generated values. The series contains 'count' values beginning at 'start'.

replicate

  • replicate<ValueT>(value: ValueT, count: number): ISeries<number, ValueT>
  • Replicate a particular value N times to create a series.

    Type parameters

    • ValueT

    Parameters

    • value: ValueT

      The value to replicate.

    • count: number

      The number of times to replicate the value.

    Returns ISeries<number, ValueT>

    Returns a new series that contains N copies of the value.

Generated using TypeDoc