Class DataSelection<T>

Type Parameters

Hierarchy

  • DataSelection

Constructors

Properties

complete: boolean = false

Has the selection run on all tiles in the dataset?

composition: Composition<T> = null
cursor: number = 0

The cursor is an index that points to the current position within the selected points in the Scatter plot.

dataset: Dataset<T>
evaluationSetSize: number = 0

The total number of points that have been evaluated for the selection.

This is supplied because deepscatter doesn't evaluate functions on tiles untile they are loaded.

events: {
    [key: string]: ((args: any) => void)[];
} = {}

Type declaration

  • [key: string]: ((args: any) => void)[]
match_count: number[] = []
name: string

name: The name of the selection. This will be used as the colun name in the Arrow record batches and are necessary for users to define so that they can use the selection in subsequent plotAPI calls to apply aesthetics to the selection.

They must be globally unique in the session.

e.g. 'search: fish', '54-abcdf', 'selection at 07:34:12', 'selección compuesta número 1'

plot: default<T>
ready: Promise<void>

Has the selection been applied to the dataset (does not mean it has been applied to all points.)

selectionSize: number = 0

The total number of points in the selection. It is used to know the size of the selected data.

tiles: T[] = []
type?: string

Optionally, a user-defined for defining.

If you're using this, I recommend defining your own application schema but I'm not going to force you throw type hints right now because, you know. I'm not a monster.

e.g.: ['search', 'lasso', 'random', 'cherry-pick']

Accessors

  • get totalSetSize(): number
  • The total number of points in the set. At present, always a light wrapper around the total number of points in the dataset.

    Returns number

Methods

  • Returns Generator<StructRowProxy<any>, void, unknown>

  • Parameters

    • name: string
    • field: string

    Returns Promise<void>

  • Parameters

    • name: string
    • codes: number[] | string[] | bigint[]
    • key_field: string
    • options: IdentifierOptions = {}

    Returns Promise<void>

  • Ensures that the selection has been evaluated on all tiles loaded in the dataset. This is useful if, for example, your selection represents a search, and you are zoomed in on one portion of the map; this will immediately execute the search (subject to delays to avoid blocking the main thread) on all tiles that have been fetched even if out of the viewport.

    Resolves upon completion.

    Returns Promise<void>

  • Downloads all unloaded tiles in the dataset and applies the transformation to them. Use with care! For > 10,000,000 point datasets, if called from Europe this may cause the transatlantic fiber-optic internet backbone cables to melt.

    Returns Promise<void>

  • Parameters

    • event: string
    • args: any

    Returns void

  • Returns all the data points in the selection, limited to data currently on the screen.

    Parameters

    • fields: string[]

      A list of fields in the data to export.

    • format: "json" = "json"

    Returns Promise<{
        [k: string]: T;
    }>

  • Returns the nth element in the selection. This is a bit tricky because the selection is stored as a list of tiles, each of which has a list of matches. So we have to iterate through the tiles until we find the one that contains the nth match, then iterate through the matches in that tile until we find the nth match.

    Parameters

    • i: number

      the index of the row to get

    Returns StructRowProxy<any>

  • A function that combines two selections into a third selection that is the intersection of the two. Note--for more complicated queries than simple intersection/union, use the (not yet defined) disjunctive normal form constructor.

    Parameters

    Returns DataSelection<T>

  • Advances the cursor (the currently selected point) by a given number of rows. steps forward or backward. Wraps from the beginning to the end.

    Returns

    the selection, for chaining

    Parameters

    • by: number

      the number of rows to move the cursor by

    Returns DataSelection<T>

  • Parameters

    • point: StructRowProxy<any> | Record<"ix", Number | BigInt>

    Returns any

  • Parameters

    • event: string

      an internally dispatched event.

    • listener: ((args: any) => void)

      a function to call back. It takes as an argument the tile that was just added.

        • (args: any): void
        • Parameters

          • args: any

          Returns void

    Returns void

Generated using TypeDoc