Exemple #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
Exemple #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)
Exemple #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)
Exemple #4
0
 def redim(cls, dataset, dimensions):
     return PandasInterface.redim(dataset, dimensions)
Exemple #5
0
 def select(cls, dataset, selection_mask=None, **selection):
     from holoviews.core.data import PandasInterface
     return PandasInterface.select(dataset, selection_mask, **selection)
Exemple #6
0
 def redim(cls, dataset, dimensions):
     from holoviews.core.data import PandasInterface
     return PandasInterface.redim(dataset, dimensions)
Exemple #7
0
 def shape(cls, dataset):
     from holoviews.core.data import PandasInterface
     return PandasInterface.shape(dataset)
Exemple #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)