aggregate
Statistics over a WHOLE selection, computed on the server: count, mean,
min, max, sum and standard deviation of one variable, overall or per
station, year, month or day. Use this for any average, total, range or
trend instead of reading rows. Any size: a selection over 500,000 rows
is split by time on the server and merged exactly. std is the
POPULATION standard deviation (ddof 0). sum adds the values as
stored, which is a total only for values that are themselves totals per
row: summing a RATE (umol m-2 s-1 per half-hour, gC m-2 d-1 per day)
or a concentration gives no physical quantity -- for a flux total
multiply the mean by the period.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | the groups: none (one result), station, a period, or both | none |
| id | Yes | a variable id from search_variables | |
| end | No | ISO date or datetime, EXCLUSIVE | |
| start | No | ISO date or datetime, inclusive (2025-01-01) | |
| cruise | No | cruise expocodes, a list or a string; ocean observation tables only | |
| lat_max | No | ||
| lat_min | No | ||
| lon_max | No | ||
| lon_min | No | ||
| station | No | station ids -- a list, or one id (or several, comma-separated) as a string; CASE-SENSITIVE: HTM150 (trigram + sampling height) for atmosphere, SE-Htm for FLUXNET sites | |
| apply_qc | No | DEFAULT TRUE: drop the observations the store's recommended quality control rejects; false keeps every observation, flagged ones included | |
| height_max | No | ||
| height_min | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | ||
| id | Yes | ||
| note | No | ||
| unit | No | ||
| groups | Yes | one entry per group: its keys (station, period), n (finite values), and mean, min, max, sum, std over them (null when n is 0) | |
| citation | Yes | ||
| n_groups | Yes | ||
| variable | Yes | ||
| rows_used | Yes | ||
| download_url | Yes | ||
| download_urls | No | ||
| download_complete | No |