Options
All
  • Public
  • Public/Protected
  • All
Menu

Data-Forge

Index

Type aliases

AggregateFn

AggregateFn: function

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

Type declaration

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

      • accum: ToT
      • value: ValueT

      Returns ToT

CallbackFn

CallbackFn: function

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

Type declaration

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

      • value: ValueT
      • index: number

      Returns void

ComparerFn

ComparerFn: function

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

Type declaration

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

      • a: ValueT1
      • b: ValueT2

      Returns boolean

DataFrameConfigFn

DataFrameConfigFn: function

Type declaration

GapFillFn

GapFillFn: function

Type declaration

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

      • a: ValueT
      • b: ValueT

      Returns ResultT[]

JoinFn

JoinFn: function

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

Type declaration

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

      • a: ValueT1
      • b: ValueT2

      Returns ResultT

PredicateFn

PredicateFn: function

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

Type declaration

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

      • value: any
      • against: any

      Returns boolean

SelectorFn

SelectorFn: function

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

Type declaration

    • (value: FromT): ToT
    • Parameters

      • value: FromT

      Returns ToT

SelectorWithIndexFn

SelectorWithIndexFn: function

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

Type declaration

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

      • value: FromT
      • index: number

      Returns ToT

SeriesConfigFn

SeriesConfigFn: function

Type declaration

SeriesSelectorFn

SeriesSelectorFn: function

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

Type declaration

    • Parameters

      Returns ISeries<IndexT, SeriesValueT>

Zip2Fn

Zip2Fn: function

Type declaration

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

      • a: T1
      • b: T2

      Returns ReturnT

Zip3Fn

Zip3Fn: function

Type declaration

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

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

      Returns ReturnT

Zip4Fn

Zip4Fn: function

Type declaration

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

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

      Returns ReturnT

Zip5Fn

Zip5Fn: function

Type declaration

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

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

      Returns ReturnT

ZipNFn

ZipNFn: function

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

Type declaration

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

      Returns ReturnT

Functions

fromCSV

  • Deserialize a DataFrame from a CSV text string.

    Parameters

    • csvTextString: string

      The CSV text to deserialize.

    • Optional config: ICSVOptions

    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.

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