geoviews.data package#

Submodules#

Module contents#

class geoviews.data.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.

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

Bases: PandasAPI, MultiInterface

Methods

applies(obj)

Indicates whether the interface is designed specifically to handle the supplied object's type.

isscalar(dataset, dim[, per_geom])

Tests if dimension is scalar in each subpath.

length(dataset)

Returns the length of the multi-tabular dataset making it appear like a single array of concatenated subpaths separated by NaN values.

loaded()

Indicates whether the required dependencies are loaded.

select(dataset[, selection_mask])

Applies selectiong on all the subpaths.

select_mask(dataset, selection)

Given a Dataset object and a dictionary with dimension keys and selection keys (i.e. tuple ranges, slices, sets, lists, or literals) return a boolean mask over the rows in the Dataset object that have been selected.

shape(dataset)

Returns the shape of all subpaths, making it appear like a single array of concatenated subpaths separated by NaN values.

split(dataset, start, end, datatype, **kwargs)

Splits a multi-interface Dataset into regular Datasets using regular tabular interfaces.

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

Returns a single concatenated array of all subpaths separated by NaN values.

add_dimension

aggregate

dimension_type

dtype

geo_column

geom_dims

groupby

has_holes

holes

iloc

init

nonzero

range

redim

reindex

sample

shape_mask

sort

validate

Parameter Definitions


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 isscalar(dataset, dim, per_geom=False)[source]#

Tests if dimension is scalar in each subpath.

classmethod length(dataset)[source]#

Returns the length of the multi-tabular dataset making it appear like a single array of concatenated subpaths separated by NaN values.

classmethod loaded()[source]#

Indicates whether the required dependencies are loaded.

classmethod select(dataset, selection_mask=None, **selection)[source]#

Applies selectiong on all the subpaths.

classmethod select_mask(dataset, selection)[source]#

Given a Dataset object and a dictionary with dimension keys and selection keys (i.e. tuple ranges, slices, sets, lists, or literals) return a boolean mask over the rows in the Dataset object that have been selected.

classmethod shape(dataset)[source]#

Returns the shape of all subpaths, making it appear like a single array of concatenated subpaths separated by NaN values.

classmethod split(dataset, start, end, datatype, **kwargs)[source]#

Splits a multi-interface Dataset into regular Datasets using regular tabular interfaces.

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

Returns a single concatenated array of all subpaths separated by NaN values. If expanded keyword is False an array of arrays is returned.

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

Bases: DictInterface

Methods

applies(obj)

Indicates whether the interface is designed specifically to handle the supplied object's type.

aggregate

concat

dimension_type

dtype

geo_column

geom_dims

geom_type

has_holes

holes

iloc

init

length

range

sample

select

shape

shape_mask

validate

values

Parameter Definitions


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.