Skip to content

Top-level API

Everything most callers need is importable directly from climate_change.

from climate_change import run_analysis, USE_CASE_REGISTRY, validate_gee_project

climate_change

climate_change — ARIN Climate Resilience Decision Support System Core computation package. All analysis logic lives here. The FastAPI backend calls this package; it does no computation itself.

Usage

from climate_change import run_analysis, USE_CASE_REGISTRY

result = await run_analysis( module="drought", aoi_geojson={"type": "Polygon", "coordinates": [...]}, start_date="2010-01-01", end_date="2023-12-31", country="Kenya", )

run_analysis async

run_analysis(module: str, aoi_geojson: dict, start_date: str, end_date: str, country: str, gee_project: str = '', extra_params: dict | None = None, openai_api_key: str | None = None, report_output_dir: str | None = None, map_png_bytes: bytes | None = None)

Domain use cases

Lazily importable from the top-level package (climate_change.DroughtUseCase, etc.) so importing climate_change doesn't eagerly pull in every module's heavy dependencies (torch, xgboost, lightgbm, …). Documented in full on their own pages: drought, flood, food_security, disease, land_degradation.

Other re-exports

AnalysisConfig, AnalysisOutput, BaseUseCase, DaskEngine, analysis_cache, feature_cache, ensure_gee, validate_gee_project, register_module, MODULE_MAP — see core.

USE_CASE_REGISTRY, UseCaseInfo, ModelOption, get_use_case_info — see registry.

ReportBuilder — see reporting.

AIInterpreter, build_interpretation_prompt — see ai_interpreter.