Climate Demo (Lao PDR)

Aggregate to CHAP CSV

Exports CHAP CSV

Description

Aggregate a GeoZarr dataset to DHIS2 org units and export CHAP CSV

Org-unit aggregation workflow that exports CHAP-ready wide CSV. Loads a published GeoZarr dataset over a time range, spatially aggregates its variable(s) within each GeoJSON feature (e.g. a DHIS2 organisation unit) using the chosen method, and writes one row per location-period with columns time_period, location, and one column per variable.

Each feature's GeoJSON id becomes the location, each time step becomes time_period (formatted according to period_type). Aggregation is at the dataset's native temporal resolution, so set period_type to match it (e.g. month for a monthly dataset). This is the same pipeline as aggregate_to_dhis2_json but emits CHAP CSV instead of DHIS2 JSON.

Usage — call this process as the result of a process graph:

{
  "agg": {
    "process_id": "aggregate_to_chap_csv",
    "arguments": {
      "dataset_id": "era5land_precipitation_monthly",
      "temporal_extent": ["2025-01-01", "2025-12-31"],
      "geometries": { "type": "FeatureCollection", "features": [ ... ] },
      "method": "mean",
      "period_type": "month"
    },
    "result": true
  }
}

Parameters

Name Type Description
dataset_id
required
string ID of the published GeoZarr collection to aggregate (as listed under /datasets).
temporal_extent
required
temporal-interval Time range to load as [start, end] ISO-8601 date strings.
geometries
required
geojson GeoJSON FeatureCollection of organisation units. Each feature's id becomes the CSV location.
method
required, default "mean"
mean | min | max | sum | median Spatial aggregation method applied to the pixels within each org unit: mean (default), min, max, sum, or median.
period_type
required, default "month"
string Period type used to format each time step as time_period (day, week, month, quarter, year). Should match the dataset's native temporal resolution.

Produces

Exports CHAP CSV.

Automation

No automation runs this workflow on this instance.