Compute
computePerform statistical transformations on Malaysian economic series: growth, CAGR, real values, per-capita, rebasing, and contribution to growth. Specify date ranges and base periods.
Instructions
Statistical operations beyond a plain lookup:
yoy / mom / qoq: same as get_series(transform=...), offered here too for a uniform entry point.
cagr: compound annual growth rate between date_from and date_to.
real: deflate series_id (nominal) by secondary_series_id (a price index, e.g. cpi_headline) into base_period prices (default: the latest date in range). secondary_series_id defaults to cpi_headline if omitted, but pick the deflator deliberately — CPI is a consumer basket, not a GDP deflator, and the two can diverge.
per_capita: divide series_id by population_series_id (default: population_malaysia), broadcasting the (annual) population estimate across every period within that year.
index_to: rebase series_id so its value at base_period (required) reads 100.
contribution_to_growth: how many percentage points of secondary_series_id's (the total's) change over the last periods_ago periods is attributable to series_id (the component). Requires secondary_series_id; both series must share a frequency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_to | No | ||
| date_from | No | ||
| operation | Yes | ||
| series_id | Yes | ||
| base_period | No | ||
| periods_ago | No | ||
| secondary_series_id | No | ||
| population_series_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||