Exemplo n.º 1
0
 def length(cls, dataset):
     from holoviews.core.data import PandasInterface
     length = sum([geom_length(g) for g in dataset.data.geometry])
     geom_type = dataset.data.geom_type.iloc[0]
     if geom_type != 'Point':
         length += (PandasInterface.length(dataset)-1)
     return length
Exemplo n.º 2
0
 def sort(cls, dataset, by=[], reverse=False):
     geo_dims = cls.geom_dims(dataset)
     if any(d in geo_dims for d in by):
         raise DataError(
             "SpatialPandasInterface does not allow sorting "
             "by geometry dimension.", cls)
     return PandasInterface.sort(dataset, by, reverse)
Exemplo n.º 3
0
    def groupby(cls, dataset, dimensions, container_type, group_type, **kwargs):
        geo_dims = cls.geom_dims(dataset)
        if any(d in geo_dims for d in dimensions):
            raise DataError("GeoPandasInterface does not allow grouping "
                            "by geometry dimension.", cls)

        return PandasInterface.groupby(dataset, dimensions, container_type, group_type, **kwargs)
Exemplo n.º 4
0
 def redim(cls, dataset, dimensions):
     return PandasInterface.redim(dataset, dimensions)
Exemplo n.º 5
0
 def select(cls, dataset, selection_mask=None, **selection):
     from holoviews.core.data import PandasInterface
     return PandasInterface.select(dataset, selection_mask, **selection)
Exemplo n.º 6
0
 def redim(cls, dataset, dimensions):
     from holoviews.core.data import PandasInterface
     return PandasInterface.redim(dataset, dimensions)
Exemplo n.º 7
0
 def shape(cls, dataset):
     from holoviews.core.data import PandasInterface
     return PandasInterface.shape(dataset)
Exemplo n.º 8
0
 def groupby(cls, columns, dimensions, container_type, group_type, **kwargs):
     from holoviews.core.data import PandasInterface
     return PandasInterface.groupby(columns, dimensions, container_type, group_type, **kwargs)