UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

55 lines (54 loc) 2.77 kB
import { Layer } from '@kepler.gl/layers'; import { Datasets } from '@kepler.gl/table'; import { SpatialJoinGeometries } from '@openassistant/geoda'; import { Field, ProtoDataset } from '@kepler.gl/types'; /** * Interpolate the colors from the original colors with the given number of colors * @param originalColors The original colors * @param numberOfColors The number of colors * @returns The interpolated colors */ export declare function interpolateColor(originalColors: string[], numberOfColors: number): string[]; /** * Get the values from a dataset for a variable * @param datasets * @param datasetName * @param variableName * @returns {number[]} */ export declare function getValuesFromDataset(datasets: Datasets, layers: Layer[], datasetName: string, variableName: string): unknown[]; export declare function getValuesFromVectorTileLayer(datasetId: string, layers: Layer[], field: Field): unknown[]; /** * Highlight the rows in a dataset * @param datasets The kepler.gl datasets * @param layers The kepler.gl layers * @param datasetName The name of the dataset * @param selectedRowIndices The indices of the rows to highlight * @param layerSetIsValid The function to set the layer validity */ export declare function highlightRows(datasets: Datasets, layers: Layer[], datasetName: string, selectedRowIndices: number[], layerSetIsValid: (layer: Layer, isValid: boolean) => void): void; /** * Get the dataset context, which is used to provide the dataset information to the AI assistant * @param datasets The kepler.gl datasets * @param layers The kepler.gl layers * @returns The dataset context */ export declare function getDatasetContext(datasets?: Datasets, layers?: Layer[]): string; /** * Get the geometries from a dataset * @param datasets The kepler.gl datasets * @param layers The kepler.gl layers * @param layerData The layer data * @param datasetName The name of the dataset * @returns The geometries */ export declare function getGeometriesFromDataset(datasets: Datasets, layers: Layer[], layerData: any[], datasetName: string): SpatialJoinGeometries; /** * Save the data as a new dataset by joining it with the left dataset * @param datasets The kepler.gl datasets * @param datasetName The name of the left dataset * @param data The data to save * @param addDataToMap The function to add the data to the map */ export declare function saveAsDataset(datasets: Datasets, layers: Layer[], datasetName: string, newDatasetName: string, data: Record<string, number[]>): ProtoDataset | undefined; export declare function highlightRowsByColumnValues(datasets: Datasets, layers: Layer[], datasetName: string, columnName: string, selectedValues: unknown[], layerSetIsValid: (layer: Layer, isValid: boolean) => void): void;