lonboard.traits¶
lonboard.traits.ColorAccessor ¶
Bases: FixedErrorTraitType
A representation of a deck.gl color accessor.
Various input is allowed:
- A
list
ortuple
with three or four integers, ranging between 0 and 255 (inclusive). This will be used as the color for all objects. - A
str
representing a hex color or "well known" color interpretable by matplotlib.colors.to_rgba. - A numpy
ndarray
with two dimensions and data typenp.uint8
. The size of the second dimension must be3
or4
, and will correspond to either RGB or RGBA colors. - A pyarrow
FixedSizeListArray
orChunkedArray
containingFixedSizeListArray
s. The inner size of the fixed size list must be3
or4
and its child must have typeuint8
.
You can use helpers in the lonboard.colormap
module (i.e.
apply_continuous_cmap
) to simplify
constructing numpy arrays for color values.
lonboard.traits.FloatAccessor ¶
Bases: FixedErrorTraitType
A representation of a deck.gl float accessor.
Various input is allowed:
- An
int
orfloat
. This will be used as the value for all objects. - A numpy
ndarray
with a numeric data type. This will be casted to an array of data typenp.float32
. Each value in the array will be used as the value for the object at the same row index. - A pandas
Series
with a numeric data type. This will be casted to an array of data typenp.float32
. Each value in the array will be used as the value for the object at the same row index. - A pyarrow
FloatArray
,DoubleArray
orChunkedArray
containing either aFloatArray
orDoubleArray
. Each value in the array will be used as the value for the object at the same row index.