ochanticipy.datasources package

Subpackages

Submodules

ochanticipy.datasources.datasource module

Base class for ochanticipy data source.

class ochanticipy.datasources.datasource.DataSource(country_config: CountryConfig, datasource_base_dir: str, is_public: bool = False, is_global_raw: bool = False, is_global_processed: bool = False, config_datasource_name: str = None)[source]

Bases: ABC

Base abstract class object that contains path convenience functions.

Cannot itself be instantiated. __init__, download(), load(), and process() methods required for subclass to be instantiated.

Parameters:
  • country_config (CountryConfig) – Country configuration

  • datasource_base_dir (str) – Module directory name (usually correspond to data source)

  • is_public (bool, default = False) – Whether the dataset is public or private. Determines top-level directory structure.

  • is_global_raw (bool, default = False) – Whether the raw dataset should be saved in the glb folder. This is normally done when it has global or regional coverage.

  • is_global_processed (bool, default = False) – Whether the processed dataset should be saved in the glb folder. This is normally done when it has global or regional coverage.

  • config_datasource_name (str = None) – The name of the attribute in the config file

abstract download(clobber: bool = False)[source]

Abstract method for downloading.

abstract load()[source]

Abstract method for loading.

abstract process(clobber: bool = False)[source]

Abstract method for processing.

Module contents

Sources for anticipatory action related data.