kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
46 lines (45 loc) • 1.71 kB
TypeScript
import { ProcessorResult, RGBColor, Field, FieldPair, TimeLabelFormat, TooltipFields, ProtoDataset } from '@kepler.gl/types';
import { TooltipFormat } from '@kepler.gl/constants';
export declare const datasetColorMaker: Generator<RGBColor, any, unknown>;
/**
* Choose a field to use as the default color field of a layer.
*
* The heuristic is:
*
* First, exclude fields that are on the exclusion list and don't
* have names that suggest they contain metrics. Also exclude
* field names that are blank.
*
* Next, look for a field that is of real type and contains one
* of the preferred names (in order of the preferred names).
*
* Next, look for a field that is of integer type and contains
* one of the preferred names (in order of the preferred names).
*
* Next, look for the first field that is of real type (in order
* of field index).
*
* Next, look for the first field that is of integer type (in
* order of field index).
*
* It's possible no field will be chosen (i.e. because all fields
* are strings.)
*
* @param dataset
*/
export declare function findDefaultColorField({ fields, fieldPairs }: {
fields: Field[];
fieldPairs: FieldPair[];
}): null | Field;
/**
* Validate input data, adding missing field types, rename duplicate columns
*/
export declare function validateInputData(data: ProtoDataset['data']): ProcessorResult;
export declare const addTimeLabel: (formats: TimeLabelFormat[]) => {
label: string;
id: string;
format: string | null;
type: string;
}[];
export declare function getFieldFormatLabels(fieldType?: string): TooltipFormat[];
export declare const getFormatLabels: (fields: TooltipFields[], fieldName: string) => TooltipFormat[];