Skip to content

Regionalizer

srai.regionalizers.Regionalizer

Bases: abc.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: gpd.GeoDataFrame

RETURNS DESCRIPTION
gpd.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