calculate
Create a derived series from two indicators using an Excel-style op: ratio (A/B), ratio_pct (A/B100), diff (A-B), sum (A+B), product (AB). Returns the per-timepoint result + summary. Use for things like debt-to-GDP ratio, revenue-per-employee, spread between two yields. autario refuses to combine columns of different kinds. Read the semantics field of the schema before combining two columns. A refused call answers error_code incompatible_semantics with both columns, the reason, and the ops that WOULD work (e.g. spend and clicks do not add but divide into cpc); pass override=true with a reason to compute it anyway, and the reason is returned with the result. Every result carries a computation block naming the columns, kinds, rows and window it used. Runs on any verified autario indicator (World Bank, FRED, Eurostat, OECD, IMF, WHO, ECB, US Census, SEC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First operand A (the numerator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables). | |
| b | Yes | Second operand B (the denominator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables). | |
| op | No | ratio | ratio_pct | diff | sum | product (default: ratio) | |
| full | No | Return the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point. | |
| time | No | Optional time window. "2010-2023" keeps 2010 through 2023, "2019-01-2024-06" works by month, and a single "2015" keeps 2015 onward. Omitted or unparseable = the whole series. | |
| entity | Yes | Entity the series is read for: an ISO 3166 alpha-3 country code such as "DEU" or "USA", or an aggregate code such as "WLD" or "EUU" (the canonical name matches too). Use the codes list_indicators and get_entity_profile accept. | |
| reason | No | Why the refused combination is correct here. Returned with the result so a human can audit the decision. | |
| override | No | Compute a combination autario refused as incompatible. Requires `reason`. |