geoviews.data.iris module#

class geoviews.data.iris.CubeInterface(*, name)[source]#

Bases: GridInterface

The 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.

concat_dim(datasets, dim, vdims)

Concatenates datasets along one dimension.

coords(dataset, dim[, ordered, expanded])

Returns the coordinates along a 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.

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.

sort(columns[, by, reverse])

Cubes are assumed to be sorted by default.

values(dataset, dim[, expanded, flat, ...])

Returns an array of the values along the supplied dimension.

assign

dtype

init

mask

packed

reindex

shape

validate

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 concat_dim(datasets, dim, vdims)[source]#

Concatenates datasets along one dimension.

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 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 irregular(dataset, dim)[source]#

CubeInterface does not support irregular data

classmethod length(dataset)[source]#

Returns the total number of samples in the dataset.

classmethod loaded()[source]#

Indicates whether the required dependencies are loaded.

classmethod range(dataset, dimension)[source]#

Computes the range along a particular dimension.

classmethod redim(dataset, dimensions)[source]#

Rename coords on the Cube.

classmethod sample(dataset, samples=None)[source]#

Sampling currently not implemented.

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 sort(columns, by=None, reverse=False)[source]#

Cubes are assumed to be sorted by default.

classmethod values(dataset, dim, expanded=True, flat=True, compute=True, keep_index=False)[source]#

Returns an array of the values along the supplied dimension.

geoviews.data.iris.coord_to_dimension(coord)[source]#

Converts an iris coordinate to a HoloViews dimension.

geoviews.data.iris.sort_coords(coord)[source]#

Sorts a list of DimCoords trying to ensure that dates and pressure levels appear first and the longitude and latitude appear last in the correct order.