Calculate statistics
calculate_statisticsCompute summary statistics for macroeconomic data series, including min/max, mean, median, std, change, CAGR, trend, drawdown, and YoY metrics, with validation and provenance.
Instructions
Summary statistics of a series (addressed the same way as get_data).
Per series: count, first/last, min/max (with periods), mean, median, std, change/change_pct, cagr_pct,
trend_per_year/trend_r2, latest_pop_pct, pop_pct_std, max_drawdown_pct, latest_yoy_pct, mean_yoy_pct.
Rates (interest rates, inflation) change in percentage points. Validation and provenance are included.
Args:
indicator: concept id or name
country: economy, ISO code or EA (required with indicator)
source: ECOS | OECD | IMF | BIS
stat_code: ECOS table code
cycle: frequency
item_code1..4: ECOS item codes
dataflow: SDMX dataflow
key: SDMX series key
start_date: start period
end_date: end period
recent_years: window
Returns:
statistics, validation status and provenance per series
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| cycle | No | ||
| source | No | ||
| country | No | ||
| dataflow | No | ||
| end_date | No | ||
| indicator | No | ||
| stat_code | No | ||
| item_code1 | No | ||
| item_code2 | No | ||
| item_code3 | No | ||
| item_code4 | No | ||
| start_date | No | ||
| recent_years | No |