Skip to content

Loader

Bases: abc.ABC

Abstract class for loaders.

Source code in srai/loaders/_base.py
class Loader(abc.ABC):
    """Abstract class for loaders."""

    @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

load abstractmethod

load(*args: Any, **kwargs: Any) -> gpd.GeoDataFrame

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