Calculate Purchasing Power Parity
calculate_pppGiven a US-denominated annual income and a target country code, returns the effective local purchasing power (income / pppIndex), the lifestyle equilibrium cost (income * pppIndex), and the purchasing power ratio (1 / pppIndex). Figures use real PPP data (World Bank, IMF, OECD, Penn World Table) relative to a US baseline of 1.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | Optional city slug (e.g. 'london', 'san-francisco') for a sub-national Capital-to-Rural adjustment: multiplies the national price level by a per-city factor (curated overrides / US-metro BEA RPP / population-tier heuristic). Unknown slug = national figure. | |
| income | Yes | Nominal annual income, denominated against the US baseline. | |
| source | No | PPP dataset to draw figures from. 'consensus' = per-country median across the GDP-based providers (recommended default); 'worldbank' = World Bank GDP price level; 'imf' = IMF WEO implied PPP; 'oecd' = OECD PPP-for-GDP (members + key partners only); 'pwt' = Penn World Table; 'worldbank-cons' = World Bank household-consumption price level; 'bigmac' = The Economist Big Mac index (single-good consumer PPP, ~40 countries); 'factbook' = CIA World Factbook derived price level for ~100 micro-states/territories the macro sources ignore (coarse). Defaults to 'consensus' if omitted. | consensus |
| target | Yes | ISO 3166-1 alpha-2 target country code (case-insensitive). Available codes depend on the chosen source. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| source | No | ||
| target | No | ||
| metrics | No |