Skip to content

Loader

srai.loaders.Loader

Bases: abc.ABC

Abstract class for loaders.

load(*args, **kwargs)

abstractmethod

Load data for a given area.

PARAMETER DESCRIPTION
*args

Positional arguments dependating on a specific loader.

TYPE: Any DEFAULT: ()

**kwargs

Keyword arguments dependating on a specific loader.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
gpd.GeoDataFrame

GeoDataFrame with the downloaded data.

Source code in srai/loaders/_base.py
@abc.abstractmethod
def load(self, *args: Any, **kwargs: Any) -> gpd.GeoDataFrame:  # pragma: no cover
    """
    Load data for a given area.

    Args:
        *args: Positional arguments dependating on a specific loader.
        **kwargs: Keyword arguments dependating on a specific loader.

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