How cywhale/woa23 works
Project type and purpose
• This is a Python-based microservice that exposes a REST API (“woa23_app.py”) for querying World Ocean Atlas 2023 (WOA23) data.
• It uses Dask for parallel data slicing, serves JSON or CSV, and provides Swagger/OpenAPI docs.
File structure
• Top level
• woa23_app.py – the main Flask/FastAPI entry point
• setup.py, Pipfile, requirements.txt – packaging and dependency management
• conf/ – deployment scripts (ecosystem.config.js for PM2, start_app.sh)
• src/ – core modules: config, dask_client_manager, woa23_utils
• dev/ – data-preparation notebooks and utilities (zarr conversion, PostGIS ingestion)
• figs/ – example output images
• Architectural hints
• “src/dask_client_manager.py”: the project spins up or connects to a Dask cluster for compute
• “src/woa23_utils.py”: encapsulates data-access logic (reading from Zarr stores)
• Deployment scripts imply a managed process (PM2 or shell) hosting the Python API
README for additional insights
• Confirms it’s an HTTP API with two endpoints (JSON and CSV)
• References Swagger UI (auto-generated from FastAPI/Flask + OpenAPI)
• Data is pre-downloaded or fetched from NOAA WOA23 and stored as Zarr or PostGIS