geoviews.data.iris module#
- class geoviews.data.iris.CubeInterface(*, name)[source]#
Bases:
GridInterfaceThe CubeInterface provides allows HoloViews to interact with iris Cube data. When passing an iris Cube to a HoloViews Element the init method will infer the dimensions of the Cube from its coordinates. Currently the interface only provides the basic methods required for HoloViews to work with an object.
Methods
add_dimension(columns, dimension, dim_pos, ...)Adding value dimensions not currently supported by iris interface.
aggregate(columns, kdims, function, **kwargs)Aggregation currently not implemented.
applies(obj)Indicates whether the interface is designed specifically to handle the supplied object's type.
assign(dataset, new_data)Adds a dictionary containing data for multiple new dimensions to a copy of the dataset.data.
concat_dim(datasets, dim, vdims)Concatenates datasets along one dimension.
coords(dataset, dim[, ordered, expanded])Returns the coordinates along a dimension.
dtype(dataset, dimension)Returns the dtype for the selected dimension.
groupby(dataset, dims[, container_type, ...])Groups the data by one or more dimensions returning a container indexed by the grouped dimensions containing slices of the cube wrapped in the group_type.
irregular(dataset, dim)CubeInterface does not support irregular data
length(dataset)Returns the total number of samples in the dataset.
loaded()Indicates whether the required dependencies are loaded.
range(dataset, dimension)Computes the range along a particular dimension.
redim(dataset, dimensions)Rename coords on the Cube.
reindex(dataset[, kdims, vdims])Reindexes data given new key and value dimensions.
sample(dataset[, samples])Sampling currently not implemented.
select(dataset[, selection_mask])Apply a selection to the data.
select_to_constraint(dataset, selection)Transform a selection dictionary to an iris Constraint.
shape(dataset[, gridded])Returns the shape of the data.
sort(columns[, by, reverse])Cubes are assumed to be sorted by default.
validate(dataset[, vdims])Validation runs after the Dataset has been constructed and should validate that the Dataset is correctly formed and contains all declared dimensions.
values(dataset, dim[, expanded, flat, ...])Returns an array of the values along the supplied dimension.
init
mask
packed
Parameter Definitions
- classmethod add_dimension(columns, dimension, dim_pos, values, vdim)[source]#
Adding value dimensions not currently supported by iris interface.
Adding key dimensions not possible on dense interfaces.
- classmethod aggregate(columns, kdims, function, **kwargs)[source]#
Aggregation currently not implemented.
- classmethod applies(obj)[source]#
Indicates whether the interface is designed specifically to handle the supplied object’s type. By default simply checks if the object is one of the types declared on the class, however if the type is expensive to import at load time the method may be overridden.
- classmethod assign(dataset, new_data)[source]#
Adds a dictionary containing data for multiple new dimensions to a copy of the dataset.data.
- Parameters:
- dataset
Dataset The Dataset to add the dimension to
- new_data
python:dict Dictionary containing new data to add to the Dataset
- dataset
- Returns:
dataA copy of the data with the new data dimensions added
- classmethod coords(dataset, dim, ordered=False, expanded=False)[source]#
Returns the coordinates along a dimension. Ordered ensures coordinates are in ascending order and expanded creates ND-array matching the dimensionality of the dataset.
- classmethod dtype(dataset, dimension)[source]#
Returns the dtype for the selected dimension.
- Parameters:
- dataset
Dataset The dataset to query
- dimension
python:strorDimension Dimension to return the dtype for
- dataset
- Returns:
numpy.dtypeThe dtype of the selected dimension
- classmethod groupby(dataset, dims, container_type=<class 'holoviews.core.spaces.HoloMap'>, group_type=None, **kwargs)[source]#
Groups the data by one or more dimensions returning a container indexed by the grouped dimensions containing slices of the cube wrapped in the group_type. This makes it very easy to break up a high-dimensional dataset into smaller viewable chunks.
- classmethod reindex(dataset, kdims=None, vdims=None)[source]#
Reindexes data given new key and value dimensions.
- classmethod select(dataset, selection_mask=None, **selection)[source]#
Apply a selection to the data.
- classmethod select_to_constraint(dataset, selection)[source]#
Transform a selection dictionary to an iris Constraint.
- classmethod shape(dataset, gridded=False)[source]#
Returns the shape of the data.
- Parameters:
- dataset
Dataset The dataset to get the shape from
- dataset
- Returns:
python:tuple[python:int,python:int]The shape of the data (rows, cols)
- classmethod sort(columns, by=None, reverse=False)[source]#
Cubes are assumed to be sorted by default.