schema.fieldmetadata.md

January 18, 2023 ยท View on GitHub

Home > @datashaper/schema > FieldMetadata

FieldMetadata interface

Holds core metadata/stats for a data field.

Signature:

export interface FieldMetadata 

Properties

PropertyModifiersTypeDescription
bins?Bin[](Optional) Computed histogram bins for numeric fields.
categories?Category[](Optional) List of unique categories for string fields.
count?number(Optional) Count of valid values in the column (excluding invalid, null, etc.)
distinct?number(Optional) Count of unique values in the column
invalid?number(Optional) Count of invalid/null values in the column
magnitude?number(Optional) Magnitude of the data, i.e., the absolute difference between the min and max values.
maximum?number(Optional) Max value. Note that this can be specified rather than computed, in which case it defines valid boundaries for the data values.
mean?number(Optional) Mean.
median?number(Optional) Median.
minimum?number(Optional) Min value. Note that this can be specified rather than computed, in which case it defines valid boundaries for the data values.
mode?string | number | boolean | Date(Optional) Mode
stdev?number(Optional) Standard deviation.
type?DataType(Optional) TEMP: this is determined via stats introspection, but our much more robust type discovery for the codebooks should be used, and the type on Field.