Skip to content

base

Base class for regionalizers.

Regionalizer

Bases: ABC

Abstract class for regionalizers.

transform(gdf)

abstractmethod

Regionalize a given GeoDataFrame.

This one should treat the input as a single region.

PARAMETER DESCRIPTION
gdf

GeoDataFrame to be regionalized.

TYPE: GeoDataFrame

RETURNS DESCRIPTION
GeoDataFrame

GeoDataFrame with the regionalized data.

Source code in srai/regionalizers/_base.py
@abc.abstractmethod
def transform(self, gdf: gpd.GeoDataFrame) -> gpd.GeoDataFrame:  # pragma: no cover
    """
    Regionalize a given GeoDataFrame.

    This one should treat the input as a single region.

    Args:
        gdf (gpd.GeoDataFrame): GeoDataFrame to be regionalized.

    Returns:
        GeoDataFrame with the regionalized data.
    """
    raise NotImplementedError