holoviews.element.stats module#
- class holoviews.element.stats.Bivariate(data=None, kdims=None, vdims=None, **kwargs)[source]#
Bases:
Selection2DExpr,StatisticsElementBivariate elements are containers for two dimensional data, which is to be visualized as a kernel density estimate. The data should be supplied in a tabular format of x- and y-columns.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: datatypegroup = String(constant=True, default='Bivariate', label='Group')A string describing the data wrapped by the object.
kdims = List(bounds=(2, 2), default=[Dimension('x'), Dimension('y')], label='Kdims')The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
vdims = List(bounds=(0, 1), default=[Dimension('Density')], label='Vdims')The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
- class holoviews.element.stats.BoxWhisker(data=None, kdims=None, vdims=None, **kwargs)[source]#
Bases:
Selection1DExpr,Dataset,Element2DBoxWhisker represent data as a distributions highlighting the median, mean and various percentiles. It may have a single value dimension and any number of key dimensions declaring the grouping of each violin.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: datatypegroup = String(constant=True, default='BoxWhisker', label='Group')A string describing the data wrapped by the object.
kdims = List(bounds=(0, None), default=[], label='Kdims')The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
vdims = List(bounds=(1, 1), default=[Dimension('y')], label='Vdims')The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
- class holoviews.element.stats.Distribution(data=None, kdims=None, vdims=None, **kwargs)[source]#
Bases:
Selection1DExpr,StatisticsElementDistribution elements provides a representation for a one-dimensional distribution which can be visualized as a kernel density estimate. The data should be supplied in a tabular format and will use the first column.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: datatypegroup = String(constant=True, default='Distribution', label='Group')A string describing the data wrapped by the object.
kdims = List(bounds=(1, 1), default=[Dimension('Value')], label='Kdims')The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
vdims = List(bounds=(0, 1), default=[Dimension('Density')], label='Vdims')The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
- class holoviews.element.stats.HexTiles(data=None, kdims=None, vdims=None, **kwargs)[source]#
Bases:
Selection2DExpr,Dataset,Element2DHexTiles is a statistical element with a visual representation that renders a density map of the data values as a hexagonal grid.
Before display the data is aggregated either by counting the values in each hexagonal bin or by computing aggregates.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdims, vdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: datatypegroup = String(constant=True, default='HexTiles', label='Group')A string describing the data wrapped by the object.
kdims = List(bounds=(2, 2), default=[Dimension('x'), Dimension('y')], label='Kdims')The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
- class holoviews.element.stats.StatisticsElement(data=None, kdims=None, vdims=None, **kwargs)[source]#
-
StatisticsElement provides a baseclass for Element types that compute statistics based on the input data, usually a density. The value dimension of such elements are therefore usually virtual and not computed until the element is plotted.
- Attributes:
datasetThe Dataset that this object was created from
Methods
columns([dimensions])Convert dimension values to a dictionary.
dframe([dimensions, multi_index])Convert dimension values to DataFrame.
dimension_values(dim[, expanded, flat])Return the values along the requested dimension.
get_dimension_type(dim)Get the type of the requested dimension.
range(dim[, data_range, dimension_range])Return the lower and upper bounds of values along dimension.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdims, kdims, vdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: group, datatype- columns(dimensions=None)[source]#
Convert dimension values to a dictionary.
Returns a dictionary of column arrays along each dimension of the element.
- Parameters:
- dimensions
Dimensions to return as columns
- Returns:
Dictionaryofarraysforeachdimension
- property dataset#
The Dataset that this object was created from
- dframe(dimensions=None, multi_index=False)[source]#
Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.
- Parameters:
- dimensions
Dimensions to return as columns
- multi_index
Convert key dimensions to (multi-)index
- Returns:
DataFrameofcolumnscorrespondingtoeachdimension
- dimension_values(dim, expanded=True, flat=True)[source]#
Return the values along the requested dimension.
- Parameters:
- dimension
str The dimension to return values for.
- expandedbool,
optional Whether to return the expanded values. Behavior depends on the type of data:
Columnar: If false, returns unique values
Geometry: If false, returns scalar values per geometry
Gridded: If false, returns 1D coordinates
- flatbool,
optional Whether to flatten array.
- dimension
- Returns:
np.ndarrayArray of values along the requested dimension.
- get_dimension_type(dim)[source]#
Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.
- Parameters:
- dimension
Dimension to look up by name or by index
- Returns:
Declaredtypeofvaluesalongthedimension
- class holoviews.element.stats.Violin(data=None, kdims=None, vdims=None, **kwargs)[source]#
Bases:
BoxWhiskerViolin elements represent data as 1D distributions visualized as a kernel-density estimate. It may have a single value dimension and any number of key dimensions declaring the grouping of each violin.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData: labelholoviews.core.dimension.Dimensioned: cdimsholoviews.core.element.Element2D: extentsholoviews.core.data.Dataset: datatypeholoviews.element.stats.BoxWhisker: kdims, vdimsgroup = String(constant=True, default='Violin', label='Group')A string describing the data wrapped by the object.