diff --git a/prototypes/app/debt-thresholds/_data/coverage.md b/prototypes/app/debt-thresholds/_data/coverage.md index af47d4b..8664699 100644 --- a/prototypes/app/debt-thresholds/_data/coverage.md +++ b/prototypes/app/debt-thresholds/_data/coverage.md @@ -75,14 +75,13 @@ IDS December 2025 (archived bulk files), WEO October 2025, projected to 2030. ## Base year 2025 -IDS November 2026 (DFO API, filled from the current bulk files), WEO October 2026, projected to 2031. +IDS November 2026 (DFO API), WEO October 2026, projected to 2031. - Countries lacking a core series: 0 - Countries without a projection: 2 (SEN, PAK) - Countries without a capacity: 0 - Creditor-group guard, 1%: 869 of 870 country-years pass - NIC 2017: sum of DFO creditors 199,338,848 against PPG 205,334,848 -- DFO against the IDS bulk files, 1%: 4470 of 4470 values agree - No 2015-19 commitments from a source, so the 58-country average terms stand in: BTN private, DJI private, GNB private, BGD private, CAF private, COM private, NER private, BDI private, KHM private, TCD private, SWZ private, HTI private, KGZ private, LSO private, MWI private, MLI private, MRT private, NPL private, SLE private, SLB private, VUT private | Country | ISO3 | Debt stock | Debt service | GDP | Revenue | Projection | Capacity | diff --git a/prototypes/app/debt-thresholds/_data/inputs.json b/prototypes/app/debt-thresholds/_data/inputs.json index 3142890..17efe8f 100644 --- a/prototypes/app/debt-thresholds/_data/inputs.json +++ b/prototypes/app/debt-thresholds/_data/inputs.json @@ -2,7 +2,7 @@ "provenance": { "sdk": "development-finance==0.2.0", "query": "External public debt (PPG, and IMF credit for service): stock, service, principal and disbursements by creditor group, and GDP, for the 58 countries in FDL's March 2026 note, 2015 to 2031", - "retrieved": "2026-11-16T22:41:58.439Z", + "retrieved": "2026-11-16T22:57:50.786Z", "citation": "World Bank International Debt Statistics (December 2025 and November 2026 releases; November 2026 read through the Development Finance Observatory) and IMF World Economic Outlook (October 2025 and October 2026)", "dfo": [ { @@ -2650,6 +2650,2230 @@ "citation": "IMF World Economic Outlook (WEO) (2026), via the Development Finance Observatory", "rows": 975, "warnings": [] + }, + { + "key": "disbursements_by_creditor", + "question": "DT.DIS.DPPG.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Disbursements on public or publicly guaranteed external debt, by creditor to 58 debtors from 163 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8f00e017e889015579768535308a2982", + "versions": [ + "cv_5d93b52a44ddd9ab63e7022c6f6d9ecc" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Disbursements on public or publicly guaranteed external debt, by creditor to 58 debtors from 163 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_084e5b3313e3b0296fbb589b84022d3d", + "definition": { + "schema_version": 1, + "spec_id": "spec_084e5b3313e3b0296fbb589b84022d3d", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Disbursement", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "PublicOrPubliclyGuaranteed", + "state": "value" + }, + "property": "guaranteeStatus" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_5d93b52a44ddd9ab63e7022c6f6d9ecc", + "artifact": { + "digest": "sha256:0d45340ed0a5cfadf303ab29cfe413472ba57618a9b66d3810d9fcbde1047102", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:34+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 29105, + "warnings": [] + }, + { + "key": "service_bilateral_by_creditor", + "question": "DT.TDS.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "External debt service of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_4a6d10df33fcf83b15ec3cf7d761112d", + "versions": [ + "cv_45406ec2db6dcbdb1f7b0dc6e2fef7d6" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "External debt service of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_667cd38f67bac08950cf1f4e3d9c54e6", + "definition": { + "schema_version": 1, + "spec_id": "spec_667cd38f67bac08950cf1f4e3d9c54e6", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "ServicingPayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_45406ec2db6dcbdb1f7b0dc6e2fef7d6", + "artifact": { + "digest": "sha256:79579941d3763e2fe153e33264ade4f140528db13828625f921b7c3889a10244", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:37+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 9469, + "warnings": [] + }, + { + "key": "principal_bilateral_by_creditor", + "question": "DT.AMT.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Principal repayments on external debt of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8f45d053b17f9d8f6c92ec4fd24e9feb", + "versions": [ + "cv_a99ee4029b564dd8eecde997012a1750" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Principal repayments on external debt of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0f9826911ec0b96505727e016cce945c", + "definition": { + "schema_version": 1, + "spec_id": "spec_0f9826911ec0b96505727e016cce945c", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "PrincipalRepayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_a99ee4029b564dd8eecde997012a1750", + "artifact": { + "digest": "sha256:4173384c01ce1eb7d43fbb8d1426f25e13383fea54faecb71336acf3f63f2e21", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:40+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 8819, + "warnings": [] + }, + { + "key": "disbursements_bilateral_by_creditor", + "question": "DT.DIS.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Disbursements on external debt to bilateral creditors, by creditor to 58 debtors from 87 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_3f4190a11f0c8e07403588347a6abcb2", + "versions": [ + "cv_b20ab3ac6518def44a79cedd9705f9fd" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Disbursements on external debt to bilateral creditors, by creditor to 58 debtors from 87 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_8721d01a2a41f1d4c120f3592ee97023", + "definition": { + "schema_version": 1, + "spec_id": "spec_8721d01a2a41f1d4c120f3592ee97023", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Disbursement", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_b20ab3ac6518def44a79cedd9705f9fd", + "artifact": { + "digest": "sha256:2c287c3e02e1b01912791053d2b82009cf9e5d2e7303c638c84b8d437d267000", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:44+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 15721, + "warnings": [] + }, + { + "key": "concessional_stock", + "question": "DT.DOD.ALLC.CD for Kenya, 2015 to 2030", + "sentence": "Outstanding external debt of 58 debtors for concessional, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_ce50414a383998cb186bda9eba6c9427", + "versions": [ + "cv_ae07a7f9844222679405b9550618110e" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Outstanding external debt of 58 debtors for concessional, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_41ec6db6e7f84ba3c1b5eedfd2930ded", + "definition": { + "schema_version": 1, + "spec_id": "spec_41ec6db6e7f84ba3c1b5eedfd2930ded", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialPosition", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "AmountOutstanding", + "state": "value" + }, + "property": "financialPositionType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "financingResource" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSConcessional", + "state": "value" + }, + "property": "idsConcessionality" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsCreditorType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsDebtorType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "includesIMFCredit" + }, + { + "binding": { + "state": "unbound" + }, + "property": "interestRateVariability" + }, + { + "binding": { + "state": "unbound" + }, + "property": "maturityBand" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_ae07a7f9844222679405b9550618110e", + "artifact": { + "digest": "sha256:140a40b92b434627e44cdddb70e343ca2ec04ccf4594a044daf761790ce753af", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:46+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 638, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "grant_element", + "question": "DT.GRE.DPPG for Kenya, 2015 to 2030", + "sentence": "Grant element mean value in percent to 58 recipients for commitment for public or publicly guaranteed, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_7f143da71cea59b211308c6b923a971d", + "versions": [ + "cv_8cc45b66f625fa6e36439a641361a1c6" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grant element mean value in percent to 58 recipients for commitment for public or publicly guaranteed, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_e4d4423e8865a961f1ac2b913a449409", + "definition": { + "schema_version": 1, + "spec_id": "spec_e4d4423e8865a961f1ac2b913a449409", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "grantElement" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "PublicOrPubliclyGuaranteed", + "state": "value" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_8cc45b66f625fa6e36439a641361a1c6", + "artifact": { + "digest": "sha256:f4c64b7c8eddd36d0428b4197088c0ec122405e305fa6b58ee8041b226089b16", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:47+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "rate_official", + "question": "DT.INR.OFFT for Kenya, 2015 to 2030", + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_e96476aa6dc0d193dc360a928dee199a", + "versions": [ + "cv_63f48f58250051c3a90f02b7381b9da9" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0dbd404f27545191ec8d21af052c225f", + "definition": { + "schema_version": 1, + "spec_id": "spec_0dbd404f27545191ec8d21af052c225f", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "interestRate" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_63f48f58250051c3a90f02b7381b9da9", + "artifact": { + "digest": "sha256:b91eaf6ab5f38c1c37f9d9e643c3e81656d3b8ef7949f724f64e64c3ae0be97f", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:49+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "rate_private", + "question": "DT.INR.PRVT for Kenya, 2015 to 2030", + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_3f0710e7c717f505f0002990ff56fc0e", + "versions": [ + "cv_ca114fc553dfdfedf72b2212c8203eed" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_6ddc625841c482c698a8614316a111eb", + "definition": { + "schema_version": 1, + "spec_id": "spec_6ddc625841c482c698a8614316a111eb", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "interestRate" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_ca114fc553dfdfedf72b2212c8203eed", + "artifact": { + "digest": "sha256:e6a1a8fbc6ef6b5cb7edd69e49f1de0dc83d9559ae6c062d4e0634a52203d4ee", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:50+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "maturity_official", + "question": "DT.MAT.OFFT for Kenya, 2015 to 2030", + "sentence": "Maturity mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_6d9499d79d16227061d9e3a00f732128", + "versions": [ + "cv_22db82cd4fb229da356c10f045d75b41" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Maturity mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_963816c32bc63fef5da9385e72c7af2f", + "definition": { + "schema_version": 1, + "spec_id": "spec_963816c32bc63fef5da9385e72c7af2f", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "maturity" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_22db82cd4fb229da356c10f045d75b41", + "artifact": { + "digest": "sha256:cf0826a09f5d2a86c1c6cfe55a1d75a190d683fda1861c1cc28a9bed23b0a149", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:52+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "maturity_private", + "question": "DT.MAT.PRVT for Kenya, 2015 to 2030", + "sentence": "Maturity mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_e0013e39b2107467c65df1454433f51b", + "versions": [ + "cv_4e30a90cb4aa5b887d43b6611c802d8f" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Maturity mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_3058d1b6d1bcb700ee96005ee32f89f4", + "definition": { + "schema_version": 1, + "spec_id": "spec_3058d1b6d1bcb700ee96005ee32f89f4", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "maturity" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_4e30a90cb4aa5b887d43b6611c802d8f", + "artifact": { + "digest": "sha256:3268b39a7875968f43afffd0231d075f41dce04a12fc558da828b04a59da87fa", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:53+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "grace_official", + "question": "DT.GPA.OFFT for Kenya, 2015 to 2030", + "sentence": "Grace period mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_a46f61118557f91f0d3c2b68165dbe12", + "versions": [ + "cv_aee0d7c8063531ab23712dcef0a734ab" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grace period mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0bde7b892606c20386c41bc4466baef3", + "definition": { + "schema_version": 1, + "spec_id": "spec_0bde7b892606c20386c41bc4466baef3", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "gracePeriod" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_aee0d7c8063531ab23712dcef0a734ab", + "artifact": { + "digest": "sha256:1c6df1ee76e4ba7c4f95d0577c6fe267d7f2a4e571061bbfa23f97ea9fb9f620", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:54+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "grace_private", + "question": "DT.GPA.PRVT for Kenya, 2015 to 2030", + "sentence": "Grace period mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_f1aa54b8115c9fd98ccb8580b3a28500", + "versions": [ + "cv_f9c2079172429473867f5c9e70c78eaa" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grace period mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_480908c64b2f9c58965aa3a55c4a4fe6", + "definition": { + "schema_version": 1, + "spec_id": "spec_480908c64b2f9c58965aa3a55c4a4fe6", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "gracePeriod" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_f9c2079172429473867f5c9e70c78eaa", + "artifact": { + "digest": "sha256:3cbd30e03b738c04bcfdc4f27751e77ce6ce6b41296c4b059387efd7cbfeaa59", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:56+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "commitments_official", + "question": "DT.COM.OFFT.CD for Kenya, 2015 to 2030", + "sentence": "Commitments of external debt (debt instrument) to official creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_e48c1e9841106b4f6018211a612ab1d2", + "versions": [ + "cv_d9483a908b86b48556e1568917f6b4b5" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Commitments of external debt (debt instrument) to official creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_153cf557a7fa9709c40373e46043e757", + "definition": { + "schema_version": 1, + "spec_id": "spec_153cf557a7fa9709c40373e46043e757", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialObligation", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_d9483a908b86b48556e1568917f6b4b5", + "artifact": { + "digest": "sha256:e3e0c2350a1ee7818d5a66fb9435c4133868848d5d319aa027610cfc6de1615a", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:57+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 628, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "commitments_private", + "question": "DT.COM.PRVT.CD for Kenya, 2015 to 2030", + "sentence": "Commitments of external debt (debt instrument) to private creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8eb7985ceb582c96d038db35557af0d4", + "versions": [ + "cv_fc8a543dc123d3e929004c555e592eb5" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Commitments of external debt (debt instrument) to private creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_a841d4992e6594edcc80505644560149", + "definition": { + "schema_version": 1, + "spec_id": "spec_a841d4992e6594edcc80505644560149", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialObligation", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_fc8a543dc123d3e929004c555e592eb5", + "artifact": { + "digest": "sha256:51e6e1f4e7d265d606ceca86d9cb512f09ebd647b6b2d87281564fbc7715297e", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:58+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 355, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 14 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "imf_principal", + "question": "DT.AMT.DIMF.CD for Kenya from the IMF, 2015 to 2030", + "sentence": "Principal repayments on external debt of 58 debtors owed to International Monetary Fund for debt instrument, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_92fe956734b081dc6c19369a503d8818", + "versions": [ + "cv_85698a37ff5f90053ce48337f3d7dca0" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Principal repayments on external debt of 58 debtors owed to International Monetary Fund for debt instrument, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_9973126bf6c31759175294b5ee122483", + "definition": { + "schema_version": 1, + "spec_id": "spec_9973126bf6c31759175294b5ee122483", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "PrincipalRepayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + } + ], + "entities": { + "origin": [ + "InternationalMonetaryFund" + ], + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_85698a37ff5f90053ce48337f3d7dca0", + "artifact": { + "digest": "sha256:8a241538c80679845b274430d9347f312dca53952ccccbb62793ab9480c4a22f", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:56:29+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 896, + "warnings": [] + }, + { + "key": "service_private", + "question": "DT.TDS.PRVT.CD for Kenya, 2015 to 2030", + "sentence": "External debt service of 58 debtors owed to private creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_3ac8d286e89a615162dc56e0a1ed177d", + "versions": [ + "cv_945b54d2c5fa83353e5559faf5f35c31" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "External debt service of 58 debtors owed to private creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_3141d43cbdc9501b37bb7ad317706f86", + "definition": { + "schema_version": 1, + "spec_id": "spec_3141d43cbdc9501b37bb7ad317706f86", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "ServicingPayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_945b54d2c5fa83353e5559faf5f35c31", + "artifact": { + "digest": "sha256:c70f9e22325a242050a8b9b44ec1cc57c742b372b82739840cb5beb624206e41", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:56:31+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 755, + "warnings": [ + "The served coverage falls short of the requested scope. No observations were served for 5 requested entities. [coverage_below_scope]" + ] } ], "preloads": [ @@ -2739,70 +4963,6 @@ ], "source": "https://www.imf.org/en/Publications/WEO, read with bblocks-data-importers 0.5.0 and imf-reader 2.3.0" }, - { - "name": "World Bank International Debt Statistics, November 2026 release, bulk files", - "baseYear": 2025, - "vintage": "November 2026", - "series": [ - "DT.AMT.BLAT.CD", - "DT.AMT.DIMF.CD", - "DT.AMT.DPPG.CD", - "DT.AMT.MLAT.CD", - "DT.AMT.PRVT.CD", - "DT.COM.OFFT.CD", - "DT.COM.PRVT.CD", - "DT.DIS.BLAT.CD", - "DT.DIS.DIMF.CD", - "DT.DIS.DPPG.CD", - "DT.DIS.MLAT.CD", - "DT.DIS.PRVT.CD", - "DT.DOD.ALLC.CD", - "DT.DOD.DIMF.CD", - "DT.DOD.DPPG.CD", - "DT.GPA.OFFT", - "DT.GPA.PRVT", - "DT.GRE.DPPG", - "DT.INR.OFFT", - "DT.INR.PRVT", - "DT.INT.DIMF.CD", - "DT.MAT.OFFT", - "DT.MAT.PRVT", - "DT.TDS.BLAT.CD", - "DT.TDS.DPPG.CD", - "DT.TDS.MLAT.CD", - "DT.TDS.PRVT.CD" - ], - "counterparts": [ - "World", - "China" - ], - "files": [ - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092201/A_D.xlsx", - "bytes": 134537761 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092202/E_K.xlsx", - "bytes": 161753053 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092203/L_M.xlsx", - "bytes": 173315697 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0093225/N_Q.xlsx", - "bytes": 46330567 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092204/R_U.xlsx", - "bytes": 198269062 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092205/V_Z.xlsx", - "bytes": 37045610 - } - ] - }, { "name": "IMF World Economic Outlook, October 2026", "baseYear": 2025, diff --git a/prototypes/app/debt-thresholds/_data/pipeline/__init__.py b/prototypes/app/debt-thresholds/_data/pipeline/__init__.py index 6f284fd..9d0df9d 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/__init__.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/__init__.py @@ -7,10 +7,8 @@ December 2025 release (actuals to 2024), and IMF WEO October 2025. The DFO holds only the current IDS release, so this base year reads the World Bank's IDS bulk files as the Internet Archive saved them on 3 and 4 January 2026. -- 2025 on current data: the IDS release the DFO holds, through the DFO API (the pinned readings), - filled from the current IDS bulk files for what the API does not carry (China's - official and private split, IMF repurchases after 2025, lending terms), and IMF - WEO October 2026. +- 2025 on current data: the IDS release the DFO holds, read entirely through the DFO + API (the pinned readings in `pipeline.sources.dfo_api`), and IMF WEO October 2026. The files it writes, and the shape of each, are described in `pipeline.run`; the creditor groups in `pipeline.creditors`; the coverage report in `pipeline.coverage`. diff --git a/prototypes/app/debt-thresholds/_data/pipeline/config.py b/prototypes/app/debt-thresholds/_data/pipeline/config.py index 9239e90..e515080 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/config.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/config.py @@ -1,7 +1,7 @@ """Constants of the method, the two base-year views and the output paths.""" from dataclasses import dataclass -from datetime import date, datetime +from datetime import date from pathlib import Path from typing import Literal, Self @@ -21,25 +21,21 @@ class View: base: int ids: str - ids_dir: str + # Cache folder of the IDS bulk files; None when the view reads IDS through the DFO. + ids_dir: str | None archived: bool weo: tuple[Literal["April", "October"], int] capacity_as_of: str - use_dfo: bool @property def end(self) -> int: """The last projected year.""" return self.base + HORIZON - -def release_dir(release: str) -> str: - """Return the cache folder name for an IDS release named "November 2026": `ids-2026-11`. - - The current view's bulk files and parsed panel live in this folder, so a new - release downloads and parses afresh instead of reusing an older one's files. - """ - return f"ids-{datetime.strptime(release, '%B %Y'):%Y-%m}" + @property + def use_dfo(self) -> bool: + """True when the view reads IDS and its base-year GDP through the DFO.""" + return self.ids_dir is None def views(today: date, *, current_ids: str) -> tuple[View, View]: @@ -47,8 +43,7 @@ def views(today: date, *, current_ids: str) -> tuple[View, View]: `today` stamps the current view's capacity vintage, so the clock is read by the caller and not at import. `current_ids` names the IDS release the DFO - holds (`sources.dfo_api.ids_release`), so the label and the cache folder - follow the data. + holds (`sources.dfo_api.ids_release`), so the label follows the data. """ return ( View( @@ -58,16 +53,14 @@ def views(today: date, *, current_ids: str) -> tuple[View, View]: archived=True, weo=("October", 2025), capacity_as_of="2026-03-14", - use_dfo=False, ), View( base=2025, ids=current_ids, - ids_dir=release_dir(current_ids), + ids_dir=None, archived=False, weo=("October", 2026), capacity_as_of=today.isoformat(), - use_dfo=True, ), ) diff --git a/prototypes/app/debt-thresholds/_data/pipeline/coverage.py b/prototypes/app/debt-thresholds/_data/pipeline/coverage.py index 71c9d49..40b8e5f 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/coverage.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/coverage.py @@ -1,7 +1,7 @@ """The coverage report: which series each country has in each base year. `coverage.md` lists the 58 countries by series for both base years, then the -creditor-group guard and the DFO-against-bulk check. The run fails when more than +creditor-group guard and the lending-terms fallback. The run fails when more than `MAX_MISSING` countries lack a core series (debt stock, debt service, GDP, revenue) in the default year. """ @@ -63,11 +63,7 @@ def render_coverage( ] for view in views: rows, check = coverage[view.base], checks[view.base] - source = ( - "archived bulk files" - if view.archived - else "DFO API, filled from the current bulk files" - ) + source = "DFO API" if view.use_dfo else "archived bulk files" lines += [ f"## Base year {view.base}", "", @@ -94,13 +90,6 @@ def render_coverage( lines += [f" - {failure}" for failure in guard["failures"][:20]] if guard["failed"] > 20: lines.append(f" - and {guard['failed'] - 20} more") - if check["cross"]: - cross = check["cross"] - lines.append( - f"- DFO against the IDS bulk files, 1%: {cross['compared'] - cross['differ']} " - f"of {cross['compared']} values agree" - ) - lines += [f" - {example}" for example in cross["examples"]] if check["terms_fallback"]: lines.append( "- No 2015-19 commitments from a source, so the 58-country average " diff --git a/prototypes/app/debt-thresholds/_data/pipeline/panel.py b/prototypes/app/debt-thresholds/_data/pipeline/panel.py index 4673bfd..8a0f1d4 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/panel.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/panel.py @@ -2,43 +2,29 @@ from collections.abc import Mapping -from pipeline.config import TOLERANCE, View +from pipeline.config import MAX_MISSING from pipeline.countries import ISO3 +from pipeline.errors import DataError type Series = dict[int, float] type Panel = dict[str, dict[str, Series]] # ISO3 -> panel key -> year -> value -def merge_panels(primary: Panel, fill: Panel) -> Panel: - """Return a panel where `primary` wins and `fill` supplies the keys and years it lacks.""" - merged: Panel = {} - for iso3 in ISO3: - keys = {key: dict(series) for key, series in fill.get(iso3, {}).items()} - for key, series in primary.get(iso3, {}).items(): - keys.setdefault(key, {}).update(series) - merged[iso3] = keys - return merged - - -def cross_check(from_dfo: Panel, bulk: Panel, view: View) -> dict: - """Count the values where the DFO and the bulk files differ by more than 1%.""" - keys = ("ppg_service", "ppg_stock", "mlat_service", "blat_service", "china_service") - compared = differ = 0 - examples = [] - for iso3 in ISO3: - for key in keys: - for year, amount in from_dfo[iso3].get(key, {}).items(): - other = bulk[iso3].get(key, {}).get(year) - if other is None or year > view.end: - continue - compared += 1 - if abs(amount - other) > TOLERANCE * max(abs(other), 1.0): - differ += 1 - if len(examples) < 10: - examples.append( - f"{iso3} {key} {year}: DFO {amount:,.0f}, bulk {other:,.0f}" - ) - return {"compared": compared, "differ": differ, "examples": examples} +def check_actuals(panel: Panel, base: int, *, source: str, hint: str = "") -> None: + """Raise `DataError` unless the release's actual debt stocks end in `base`. + + At most `MAX_MISSING` countries may lack a `base` stock, and none may have one + for the year after. `source` names the release in the message, and `hint` + follows it. + """ + stocks = [keys.get("ppg_stock", {}) for keys in panel.values()] + actual = sum(1 for s in stocks if base in s) + later = sum(1 for s in stocks if base + 1 in s) + if actual < len(ISO3) - MAX_MISSING or later > 0: + raise DataError( + f"{source} does not end its actuals in {base}: {actual} countries have a " + f"{base} debt stock and {later} one for {base + 1}.{hint}" + ) def amount_of(keys: Mapping[str, Series], key: str, year: int) -> float: diff --git a/prototypes/app/debt-thresholds/_data/pipeline/run.py b/prototypes/app/debt-thresholds/_data/pipeline/run.py index 9d268f7..836538e 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/run.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/run.py @@ -4,7 +4,7 @@ logging or exits. It writes, into the output folder: - `coverage.md`: the countries by series for both base years, the creditor-group - guard and the DFO-against-bulk check. The run returns 1 when more than + guard and the lending-terms fallback. The run returns 1 when more than `MAX_MISSING` countries lack a core series in the default year. - `inputs.json`: an envelope whose `data` maps base year, then ISO3 code, to the `inputs` dict `pipeline.project.project_service` takes, shaped as that module's @@ -38,7 +38,7 @@ from pipeline.creditors import estimate_imf_charges, guard_groups from pipeline.errors import DataError from pipeline.output import write_envelope, write_text -from pipeline.panel import Series, cross_check, merge_panels +from pipeline.panel import Series from pipeline.provenance import Ledger, citation, envelope_provenance from pipeline.sources.dfo_api import fetch_dfo, ids_release from pipeline.sources.ids_bulk import load_ids @@ -101,13 +101,11 @@ def build_thresholds(out: Path, *, client: httpx.Client, now: datetime, ids: str inputs: dict[str, dict[str, dict]] = {} checks: dict[int, dict] = {} for view in both: - panel = load_ids(view, paths=paths, client=client, ledger=ledger) creditor_sums: dict[str, Series] = {} - cross = None if view.use_dfo: - from_dfo, creditor_sums = fetch_dfo(view, ledger=ledger) - cross = cross_check(from_dfo, panel, view) - panel = merge_panels(from_dfo, panel) + panel, creditor_sums = fetch_dfo(view, ledger=ledger) + else: + panel = load_ids(view, paths=paths, client=client, ledger=ledger) weo = load_weo(view, ledger=ledger) panel = estimate_imf_charges(panel, view) terms, fallback = lending_terms(panel) @@ -122,7 +120,6 @@ def build_thresholds(out: Path, *, client: httpx.Client, now: datetime, ids: str ) checks[view.base] = { "guard": guard_groups(panel, view, creditor_sums), - "cross": cross, "terms_fallback": fallback, } diff --git a/prototypes/app/debt-thresholds/_data/pipeline/sources/dfo_api.py b/prototypes/app/debt-thresholds/_data/pipeline/sources/dfo_api.py index fd75bab..d511b05 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/sources/dfo_api.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/sources/dfo_api.py @@ -15,7 +15,7 @@ from pipeline.config import FIRST_FLOW_YEAR, View from pipeline.countries import ISO3 from pipeline.errors import DataError -from pipeline.panel import Panel, Series +from pipeline.panel import Panel, Series, check_actuals from pipeline.provenance import Ledger log = logging.getLogger("pipeline") @@ -23,6 +23,7 @@ PINNED_ORIGIN = { "imf_stock": ("InternationalMonetaryFund",), "imf_flows": ("InternationalMonetaryFund",), + "imf_principal": ("InternationalMonetaryFund",), "imf_interest": ("InternationalMonetaryFund",), } DFO_KEYS = { @@ -38,7 +39,29 @@ "stock": "ppg_stock", "imf_stock": "imf_stock", "imf_interest": "imf_interest", + "imf_principal": "imf_principal", + "service_private": "prvt_service", "gdp": "gdp", + "concessional_stock": "ppg_concessional_stock", + "grant_element": "ppg_grant_element", + "rate_official": "inr_offt", + "rate_private": "inr_prvt", + "maturity_official": "mat_offt", + "maturity_private": "mat_prvt", + "grace_official": "gpa_offt", + "grace_private": "gpa_prvt", + "commitments_official": "com_offt", + "commitments_private": "com_prvt", +} +# Readings by single creditor, kept for China's part: all Chinese creditors, and the +# bilateral (official) part. +CHINA_KEYS = { + "service_by_creditor": "china_service", + "principal_by_creditor": "china_principal", + "disbursements_by_creditor": "china_disb", + "service_bilateral_by_creditor": "china_blat_service", + "principal_bilateral_by_creditor": "china_blat_principal", + "disbursements_bilateral_by_creditor": "china_blat_disb", } IDS_NODE = "provenance/WorldBankInternationalDebtStatistics" @@ -60,7 +83,8 @@ def fetch_dfo(view: View, *, ledger: Ledger) -> tuple[Panel, dict[str, Series]]: """Return the current IDS release and WEO GDP through the DFO, one call per pinned reading. The result is the panel and, per ISO3, the sum of debt service over single - creditors, for the guard. Each reading is recorded in `ledger`. + creditors, for the guard. Each reading is recorded in `ledger`. Raises + `DataError` when the release's actual debt stocks do not end in the base year. """ # Imported here so the parsing helpers load without the SDK installed. import dfo @@ -114,26 +138,26 @@ def fetch_dfo(view: View, *, ledger: Ledger) -> tuple[Panel, dict[str, Series]]: frame["year"] = frame["time_period"].astype(int) frame = frame[frame["iso3"].isin(ISO3) & frame["value"].notna()] - if key.endswith("_by_creditor"): - flow = key.removesuffix("_by_creditor") + if key in CHINA_KEYS: if "InternationalMonetaryFund" in set(frame["financingProvider"]): raise DataError(f"the IMF is among the creditors in {key}.") - if flow == "service": + if key == "service_by_creditor": sums = frame.groupby(["iso3", "year"])["value"].sum() for (iso3, year), total in sums.items(): creditor_sums[iso3][int(year)] = float(total) china = frame[frame["financingProvider"] == "country/CHN"] - put(collected, _rows(china), f"china_{flow}") + put(collected, _rows(china), CHINA_KEYS[key]) elif key == "imf_flows": - for word, target in ( - ("Disbursement", "imf_disb"), - ("PrincipalRepayment", "imf_principal"), - ): - put(collected, _rows(frame[frame["stat_var"].str.contains(word)]), target) + # Repurchases come from the `imf_principal` reading, which runs to the + # end of the projection; the ones in this reading stop at the base year. + disbursed = frame[frame["stat_var"].str.contains("Disbursement")] + put(collected, _rows(disbursed), "imf_disb") else: put(collected, _rows(frame), DFO_KEYS[key]) - return {iso3: dict(keys) for iso3, keys in collected.items()}, dict(creditor_sums) + panel = {iso3: dict(keys) for iso3, keys in collected.items()} + check_actuals(panel, view.base, source=f"the DFO's IDS {view.ids} release") + return panel, dict(creditor_sums) def _rows(frame) -> Iterable[tuple[str, int, float]]: diff --git a/prototypes/app/debt-thresholds/_data/pipeline/sources/ids_bulk.py b/prototypes/app/debt-thresholds/_data/pipeline/sources/ids_bulk.py index ba9b4dc..144f050 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/sources/ids_bulk.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/sources/ids_bulk.py @@ -9,10 +9,10 @@ from pathlib import Path from typing import TYPE_CHECKING -from pipeline.config import MAX_MISSING, Paths, View +from pipeline.config import Paths, View from pipeline.countries import ISO3 from pipeline.errors import DataError -from pipeline.panel import Panel, Series +from pipeline.panel import Panel, Series, check_actuals from pipeline.provenance import Ledger if TYPE_CHECKING: @@ -83,6 +83,8 @@ def load_ids(view: View, *, paths: Paths, client: httpx.Client, ledger: Ledger) # Imported here so the parsing helpers load without the HTTP client installed. from pipeline.sources.http import download + if view.ids_dir is None: + raise DataError(f"the {view.base} view reads IDS through the DFO, not the bulk files.") folder = paths.cache / view.ids_dir files = [] for name, capture in IDS_FILES.items(): @@ -174,12 +176,9 @@ def parse_ids_sheets(sheets: Iterable[Sheet]) -> tuple[Panel, int]: def check_release(panel: Panel, view: View, *, paths: Paths) -> None: """Raise `DataError` when the files' last actual year is not the view's base year.""" - stocks = [keys.get("ppg_stock", {}) for keys in panel.values()] - actual = sum(1 for s in stocks if view.base in s) - later = sum(1 for s in stocks if view.base + 1 in s) - if actual < len(ISO3) - MAX_MISSING or later > 0: - raise DataError( - f"the IDS files in {paths.cache / view.ids_dir} are not the " - f"{view.ids} release: {actual} countries have a {view.base} debt stock " - f"and {later} one for {view.base + 1}. Delete the folder to download again." - ) + check_actuals( + panel, + view.base, + source=f"the {view.ids} release in {paths.cache / str(view.ids_dir)}", + hint=" Delete the folder to download again.", + ) diff --git a/prototypes/app/debt-thresholds/_data/pipeline/sources/pinned_specs.json b/prototypes/app/debt-thresholds/_data/pipeline/sources/pinned_specs.json index 760fb75..74e01ba 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/sources/pinned_specs.json +++ b/prototypes/app/debt-thresholds/_data/pipeline/sources/pinned_specs.json @@ -14,5 +14,21 @@ "imf_stock": {"question":"Kenya's debt outstanding to the IMF","definition":{"schema_version":1,"spec_id":"spec_dc17a41610710fe77774f66e97c90a33","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialPosition","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialPositionType","binding":{"state":"value","ref":"AmountOutstanding"}},{"property":"financingResource","binding":{"state":"unbound"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsConcessionality","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"unbound"}},{"property":"idsDebtorType","binding":{"state":"unbound"}},{"property":"includesIMFCredit","binding":{"state":"unbound"}},{"property":"interestRateVariability","binding":{"state":"unbound"}},{"property":"maturityBand","binding":{"state":"unbound"}}],"entities":{"destination":["country/KEN"],"origin":["InternationalMonetaryFund"]},"requested_window":{"kind":"all"}}}}, "imf_flows": {"question":"Kenya's use of IMF credit","definition":{"schema_version":1,"spec_id":"spec_3cbd7f1a0b8a8fa6e6c45c510e0f667a","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"unbound"}},{"property":"financingResource","binding":{"state":"unbound"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsConcessionality","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"unbound"}},{"property":"idsDebtorType","binding":{"state":"unbound"}},{"property":"includesIMFCredit","binding":{"state":"value","ref":"WithIMFCredit"}},{"property":"maturityBand","binding":{"state":"value","ref":"LongTermMaturity"}},{"property":"netOf","binding":{"state":"unbound"}},{"property":"nettingBasis","binding":{"state":"unbound"}}],"entities":{"destination":["country/KEN"],"origin":["InternationalMonetaryFund"]},"requested_window":{"kind":"all"}}}}, "imf_interest": {"question":"Kenya's interest payments to the IMF","definition":{"schema_version":1,"spec_id":"spec_6d3151f6312bd902c312e66a1f1cbe1d","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"InterestPayment"}},{"property":"financingResource","binding":{"state":"unbound"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsConcessionality","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"unbound"}},{"property":"idsDebtorType","binding":{"state":"unbound"}},{"property":"includesIMFCredit","binding":{"state":"unbound"}},{"property":"interestRateVariability","binding":{"state":"unbound"}},{"property":"maturityBand","binding":{"state":"unbound"}}],"entities":{"destination":["country/KEN"],"origin":["InternationalMonetaryFund"]},"requested_window":{"kind":"all"}}}}, - "gdp": {"question":"GDP of Kenya in current US dollars, IMF WEO","definition":{"schema_version":1,"spec_id":"spec_87d36f43c943c253bfc64adffd442cb9","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"EconomicProduction","measured_property":"valueAdded","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"currencyConversionBasis","binding":{"state":"unbound"}},{"property":"fixedCapitalConsumptionBasis","binding":{"state":"value","ref":"GrossOfFixedCapitalConsumption"}},{"property":"productTaxBasis","binding":{"state":"value","ref":"IncludingProductTaxes"}}],"entities":{"observationAbout":["country/KEN"]},"requested_window":{"kind":"all"},"facets":{"provenance":{"state":"value","ref":"provenance/IMFWorldEconomicOutlook"},"unit":{"state":"value","request":{"currency":"USD","prices":"current"}}}}}} + "gdp": {"question":"GDP of Kenya in current US dollars, IMF WEO","definition":{"schema_version":1,"spec_id":"spec_87d36f43c943c253bfc64adffd442cb9","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"EconomicProduction","measured_property":"valueAdded","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"currencyConversionBasis","binding":{"state":"unbound"}},{"property":"fixedCapitalConsumptionBasis","binding":{"state":"value","ref":"GrossOfFixedCapitalConsumption"}},{"property":"productTaxBasis","binding":{"state":"value","ref":"IncludingProductTaxes"}}],"entities":{"observationAbout":["country/KEN"]},"requested_window":{"kind":"all"},"facets":{"provenance":{"state":"value","ref":"provenance/IMFWorldEconomicOutlook"},"unit":{"state":"value","request":{"currency":"USD","prices":"current"}}}}}}, + "disbursements_by_creditor": {"question":"DT.DIS.DPPG.CD for Kenya by creditor, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_8f00e017e889015579768535308a2982","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"Disbursement"}},{"property":"guaranteeStatus","binding":{"state":"value","ref":"PublicOrPubliclyGuaranteed"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030},"open_roles":["origin"]}}}, + "service_bilateral_by_creditor": {"question":"DT.TDS.BLAT.CD for Kenya by creditor, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_4a6d10df33fcf83b15ec3cf7d761112d","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"ServicingPayment"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeBLAT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030},"open_roles":["origin"]}}}, + "principal_bilateral_by_creditor": {"question":"DT.AMT.BLAT.CD for Kenya by creditor, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_8f45d053b17f9d8f6c92ec4fd24e9feb","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"PrincipalRepayment"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeBLAT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030},"open_roles":["origin"]}}}, + "disbursements_bilateral_by_creditor": {"question":"DT.DIS.BLAT.CD for Kenya by creditor, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_3f4190a11f0c8e07403588347a6abcb2","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"Disbursement"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeBLAT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030},"open_roles":["origin"]}}}, + "concessional_stock": {"question":"DT.DOD.ALLC.CD for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_ce50414a383998cb186bda9eba6c9427","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialPosition","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialPositionType","binding":{"state":"value","ref":"AmountOutstanding"}},{"property":"financingResource","binding":{"state":"unbound"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsConcessionality","binding":{"state":"value","ref":"IDSConcessional"}},{"property":"idsCreditorType","binding":{"state":"unbound"}},{"property":"idsDebtorType","binding":{"state":"unbound"}},{"property":"includesIMFCredit","binding":{"state":"unbound"}},{"property":"interestRateVariability","binding":{"state":"unbound"}},{"property":"maturityBand","binding":{"state":"unbound"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "grant_element": {"question":"DT.GRE.DPPG for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_7f143da71cea59b211308c6b923a971d","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"grantElement","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"value","ref":"PublicOrPubliclyGuaranteed"}},{"property":"idsCreditorType","binding":{"state":"unbound"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "rate_official": {"question":"DT.INR.OFFT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_e96476aa6dc0d193dc360a928dee199a","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"interestRate","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeOFFT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "rate_private": {"question":"DT.INR.PRVT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_3f0710e7c717f505f0002990ff56fc0e","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"interestRate","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypePRVT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "maturity_official": {"question":"DT.MAT.OFFT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_6d9499d79d16227061d9e3a00f732128","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"maturity","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeOFFT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "maturity_private": {"question":"DT.MAT.PRVT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_e0013e39b2107467c65df1454433f51b","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"maturity","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypePRVT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "grace_official": {"question":"DT.GPA.OFFT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_a46f61118557f91f0d3c2b68165dbe12","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"gracePeriod","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeOFFT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "grace_private": {"question":"DT.GPA.PRVT for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_f1aa54b8115c9fd98ccb8580b3a28500","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"gracePeriod","stat_type":"meanValue"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"guaranteeStatus","binding":{"state":"unbound"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypePRVT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "commitments_official": {"question":"DT.COM.OFFT.CD for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_e48c1e9841106b4f6018211a612ab1d2","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"financingResource","binding":{"state":"value","ref":"DebtInstrument"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypeOFFT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "commitments_private": {"question":"DT.COM.PRVT.CD for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_8eb7985ceb582c96d038db35557af0d4","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialObligation","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialObligationType","binding":{"state":"value","ref":"Commitment"}},{"property":"financingResource","binding":{"state":"value","ref":"DebtInstrument"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypePRVT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "imf_principal": {"question":"DT.AMT.DIMF.CD for Kenya from the IMF, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_92fe956734b081dc6c19369a503d8818","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"PrincipalRepayment"}},{"property":"financingResource","binding":{"state":"value","ref":"DebtInstrument"}}],"entities":{"destination":["country/KEN"],"origin":["InternationalMonetaryFund"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}}, + "service_private": {"question":"DT.TDS.PRVT.CD for Kenya, 2015 to 2030","definition":{"schema_version":1,"spec_id":"spec_3ac8d286e89a615162dc56e0a1ed177d","identity":{"identity_version":"spec1","shape":{"kind":"statvar_schema","population_type":"FinancialFlow","measured_property":"amount","stat_type":"measuredValue","measurement_qualifier":"Nominal"},"slots":[{"property":"financialFlowType","binding":{"state":"value","ref":"ServicingPayment"}},{"property":"idsCreditorType","binding":{"state":"value","ref":"IDSCreditorTypePRVT"}}],"entities":{"destination":["country/KEN"]},"requested_window":{"kind":"range","start_year":2015,"end_year":2030}}}} } diff --git a/prototypes/app/debt-thresholds/_data/pipeline/valuation.py b/prototypes/app/debt-thresholds/_data/pipeline/valuation.py index 6dd7ea7..6a7406c 100644 --- a/prototypes/app/debt-thresholds/_data/pipeline/valuation.py +++ b/prototypes/app/debt-thresholds/_data/pipeline/valuation.py @@ -3,7 +3,7 @@ from collections.abc import Mapping from pipeline.config import FIRST_FLOW_YEAR -from pipeline.panel import Series, span +from pipeline.panel import Series, amount_of, span def present_value(keys: Mapping[str, Series], base: int) -> float | None: @@ -11,23 +11,30 @@ def present_value(keys: Mapping[str, Series], base: int) -> float | None: The IMF-World Bank thresholds are set on the present value of debt, which IDS does not publish. The estimate takes the concessional share of the stock - (`DT.DOD.ALLC.CD` over `DT.DOD.DPPG.CD`, capped at one) and the mean grant element - of new commitments from 2015 to the base year (`DT.GRE.DPPG`, in %), and returns - face value * (1 - share * grant element). Commercial debt stays at face value. + (`DT.DOD.ALLC.CD` over `DT.DOD.DPPG.CD`, capped at one) and the grant element of + new commitments from 2015 to the base year (`DT.GRE.DPPG`, in %), averaged with + each year weighted by its commitments (`DT.COM.OFFT.CD` plus `DT.COM.PRVT.CD`), + and returns face value * (1 - share * grant element). A year without commitments + weighs nothing, whether a source reports its grant element as 0 or leaves it out. + Commercial debt stays at face value. - Returns None when the stock, the concessional stock or every grant element is missing. + Returns None when the stock or the concessional stock is missing, or no year has + both a grant element and commitments. """ face = keys.get("ppg_stock", {}).get(base) concessional = keys.get("ppg_concessional_stock", {}).get(base) - elements = [ - value - for year, value in keys.get("ppg_grant_element", {}).items() - if year in span(FIRST_FLOW_YEAR, base) - ] - if face is None or concessional is None or not elements: + if face is None or concessional is None: + return None + weighted = total = 0.0 + for year, element in keys.get("ppg_grant_element", {}).items(): + if year not in span(FIRST_FLOW_YEAR, base): + continue + weight = amount_of(keys, "com_offt", year) + amount_of(keys, "com_prvt", year) + weighted += element * weight + total += weight + if total <= 0: return None if face <= 0: return face share = min(1.0, concessional / face) - grant_element = sum(elements) / len(elements) / 100 - return face * (1 - share * grant_element) + return face * (1 - share * weighted / total / 100) diff --git a/prototypes/app/debt-thresholds/_data/tests/test_build.py b/prototypes/app/debt-thresholds/_data/tests/test_build.py index a23b9c1..3d5e2bc 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_build.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_build.py @@ -37,6 +37,7 @@ def test_build_view_shapes_records_and_inputs_for_every_country() -> None: "imf_stock": {2024: 20.0}, "ppg_concessional_stock": {2024: 50.0}, "ppg_grant_element": {2024: 40.0}, + "com_offt": {2024: 10.0}, } built, inputs = build_view( VIEW, diff --git a/prototypes/app/debt-thresholds/_data/tests/test_config.py b/prototypes/app/debt-thresholds/_data/tests/test_config.py index c1a1a1f..5fc94f8 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_config.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_config.py @@ -10,13 +10,7 @@ def test_views_stamp_current_capacity_with_today(): assert old.capacity_as_of == "2026-03-14" assert current.capacity_as_of == "2026-11-16" assert (old.use_dfo, current.use_dfo) == (False, True) - - -def test_current_cache_folder_follows_the_release(): - _, november = views(date(2026, 11, 16), current_ids="November 2026") - _, april = views(date(2027, 4, 20), current_ids="April 2027") - assert november.ids_dir == "ids-2026-11" - assert april.ids_dir == "ids-2027-04" + assert (old.ids_dir, current.ids_dir) == ("ids-2025-12", None) def test_view_end_adds_horizon(): diff --git a/prototypes/app/debt-thresholds/_data/tests/test_coverage.py b/prototypes/app/debt-thresholds/_data/tests/test_coverage.py index d0fd2a8..a329c19 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_coverage.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_coverage.py @@ -62,10 +62,9 @@ def test_render_coverage_structure() -> None: missing = {b: [r["iso3"] for r in rows if r["missing"]] for b, rows in coverage.items()} guard = {"checked": 10, "failed": 22, "failures": [f"f{i}" for i in range(22)]} checks = { - VIEWS[0].base: {"guard": guard, "cross": None, "terms_fallback": []}, + VIEWS[0].base: {"guard": guard, "terms_fallback": []}, VIEWS[1].base: { "guard": {"checked": 4, "failed": 0, "failures": []}, - "cross": {"compared": 5, "differ": 1, "examples": ["KEN x 2024"]}, "terms_fallback": ["AAA", "BBB"], }, } @@ -90,8 +89,6 @@ def test_render_coverage_structure() -> None: assert " - f19" in lines assert " - f20" not in lines assert " - and 2 more" in lines - assert "- DFO against the IDS bulk files, 1%: 4 of 5 values agree" in lines - assert " - KEN x 2024" in lines assert ( "- No 2015-19 commitments from a source, so the 58-country average terms stand in: AAA, BBB" ) in lines diff --git a/prototypes/app/debt-thresholds/_data/tests/test_panel.py b/prototypes/app/debt-thresholds/_data/tests/test_panel.py index b8b4c5f..30496d6 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_panel.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_panel.py @@ -1,36 +1,25 @@ -from datetime import date - import pytest -from pipeline.config import views from pipeline.countries import ISO3 -from pipeline.panel import Panel, amount_of, cross_check, merge_panels, span, whole - -VIEW = views(date(2026, 1, 1), current_ids="November 2026")[1] - - -def empty() -> Panel: - return {iso3: {} for iso3 in ISO3} - - -def test_merge_primary_wins_and_fill_supplies_gaps(): - primary = {"KEN": {"ppg_stock": {2024: 1.0}}} - fill = {"KEN": {"ppg_stock": {2023: 5.0, 2024: 9.0}, "gdp": {2024: 3.0}}} - merged = merge_panels(primary, fill) - assert merged["KEN"] == {"ppg_stock": {2023: 5.0, 2024: 1.0}, "gdp": {2024: 3.0}} - assert set(merged) == set(ISO3) - assert fill["KEN"]["ppg_stock"][2024] == 9.0 # inputs are not mutated - - -def test_cross_check_counts_values_beyond_tolerance(): - dfo, bulk = empty(), empty() - dfo["KEN"] = {"ppg_service": {2024: 100.0, 2025: 100.5, 2026: 50.0, 2040: 1.0}} - bulk["KEN"] = {"ppg_service": {2024: 100.5, 2025: 100.0, 2026: 100.0, 2040: 9.0}} - result = cross_check(dfo, bulk, VIEW) - # 2024 and 2025 are within 1%; 2026 differs; 2040 is past the view's end. - assert result["compared"] == 3 - assert result["differ"] == 1 - assert result["examples"] == ["KEN ppg_service 2026: DFO 50, bulk 100"] +from pipeline.errors import DataError +from pipeline.panel import amount_of, check_actuals, span, whole + + +@pytest.mark.parametrize( + ("stocks", "ok"), + [ + ({2025: 1.0}, True), # actuals end in the base year + ({2025: 1.0, 2026: 1.0}, False), # a later actual: a newer release + ({2024: 1.0}, False), # no base-year stock: an older release + ], +) +def test_check_actuals_needs_a_release_ending_in_the_base_year(stocks, ok): + panel = {iso3: {"ppg_stock": dict(stocks)} for iso3 in ISO3} + if ok: + check_actuals(panel, 2025, source="the test release") + else: + with pytest.raises(DataError, match="the test release does not end its actuals in 2025"): + check_actuals(panel, 2025, source="the test release") def test_amount_of_reads_missing_and_none_as_zero(): diff --git a/prototypes/app/debt-thresholds/_data/tests/test_sources_dfo_api.py b/prototypes/app/debt-thresholds/_data/tests/test_sources_dfo_api.py index 01a5b52..3b3d5d2 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_sources_dfo_api.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_sources_dfo_api.py @@ -5,7 +5,14 @@ import pytest from pipeline.errors import DataError -from pipeline.sources.dfo_api import DFO_KEYS, PINNED_ORIGIN, Collected, pinned_specs, put +from pipeline.sources.dfo_api import ( + CHINA_KEYS, + DFO_KEYS, + PINNED_ORIGIN, + Collected, + pinned_specs, + put, +) def test_put_stores_one_value_per_country_year(): @@ -22,7 +29,6 @@ def test_put_refuses_several_rows_per_country_year(): def test_pinned_specs_cover_every_reading_the_fetch_maps(): specs = pinned_specs() - plain = {key for key in specs if not key.endswith("_by_creditor") and key != "imf_flows"} - assert plain == set(DFO_KEYS) + assert set(specs) == set(DFO_KEYS) | set(CHINA_KEYS) | {"imf_flows"} assert set(PINNED_ORIGIN) <= set(specs) assert all(pin["definition"]["spec_id"].startswith("spec_") for pin in specs.values()) diff --git a/prototypes/app/debt-thresholds/_data/tests/test_sources_ids_bulk.py b/prototypes/app/debt-thresholds/_data/tests/test_sources_ids_bulk.py index dfdf0e6..b907024 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_sources_ids_bulk.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_sources_ids_bulk.py @@ -45,5 +45,5 @@ def test_check_release_refuses_a_release_with_later_actuals(tmp_path: Path): good = {iso3: {"ppg_stock": {view.base: 1.0}} for iso3 in ISO3} check_release(good, view, paths=paths) later = {iso3: {"ppg_stock": {view.base: 1.0, view.base + 1: 1.0}} for iso3 in ISO3} - with pytest.raises(DataError, match="are not the December 2025 release"): + with pytest.raises(DataError, match="does not end its actuals in 2024"): check_release(later, view, paths=paths) diff --git a/prototypes/app/debt-thresholds/_data/tests/test_valuation.py b/prototypes/app/debt-thresholds/_data/tests/test_valuation.py index cb0dfe5..404ad03 100644 --- a/prototypes/app/debt-thresholds/_data/tests/test_valuation.py +++ b/prototypes/app/debt-thresholds/_data/tests/test_valuation.py @@ -5,26 +5,30 @@ from pipeline.valuation import present_value -def _keys(*, face=1000.0, concessional=600.0, elements=None) -> dict: +def _keys(*, face=1000.0, concessional=600.0, elements=None, official=None, private=None) -> dict: return { "ppg_stock": {2024: face}, "ppg_concessional_stock": {2024: concessional}, "ppg_grant_element": elements if elements is not None else {2015: 30.0, 2024: 50.0}, + "com_offt": official if official is not None else {2015: 100.0}, + "com_prvt": private if private is not None else {2024: 300.0}, } -def test_present_value_discounts_the_concessional_share_by_the_mean_grant_element() -> None: - # 60% concessional, mean grant element 40%: 1000 * (1 - 0.6 * 0.4) - assert present_value(_keys(), 2024) == pytest.approx(760.0) +def test_present_value_discounts_the_concessional_share_by_the_weighted_grant_element() -> None: + # Grant element (30 * 100 + 50 * 300) / 400 = 45%, so 1000 * (1 - 0.6 * 0.45). + assert present_value(_keys(), 2024) == pytest.approx(730.0) @pytest.mark.parametrize( ("keys", "expected"), [ + # A year without commitments weighs nothing, though IDS reports its element as 0. + (_keys(elements={2015: 0.0, 2024: 50.0}, official={}), 700.0), # Grant elements outside 2015 to the base year are ignored. - (_keys(elements={2014: 90.0, 2024: 50.0, 2025: 90.0}), 700.0), + (_keys(elements={2014: 90.0, 2024: 50.0}, official={2014: 900.0}), 700.0), # A concessional stock above the PPG stock counts as all of it. - (_keys(concessional=1200.0), 600.0), + (_keys(concessional=1200.0), 550.0), # No concessional debt leaves face value. (_keys(concessional=0.0), 1000.0), ], @@ -33,8 +37,11 @@ def test_present_value_edges(keys: dict, expected: float) -> None: assert present_value(keys, 2024) == pytest.approx(expected) -@pytest.mark.parametrize("missing", ["ppg_stock", "ppg_concessional_stock", "ppg_grant_element"]) +@pytest.mark.parametrize( + "missing", ["ppg_stock", "ppg_concessional_stock", "ppg_grant_element", "commitments"] +) def test_present_value_is_missing_without_its_inputs(missing: str) -> None: keys = _keys() - keys[missing] = {} + for key in ("com_offt", "com_prvt") if missing == "commitments" else (missing,): + keys[key] = {} assert present_value(keys, 2024) is None diff --git a/prototypes/app/debt-thresholds/_data/thresholds.json b/prototypes/app/debt-thresholds/_data/thresholds.json index 48347f9..9b9cfef 100644 --- a/prototypes/app/debt-thresholds/_data/thresholds.json +++ b/prototypes/app/debt-thresholds/_data/thresholds.json @@ -2,7 +2,7 @@ "provenance": { "sdk": "development-finance==0.2.0", "query": "External public debt (PPG, and IMF credit for service): stock, service, principal and disbursements by creditor group, and GDP, for the 58 countries in FDL's March 2026 note, 2015 to 2031", - "retrieved": "2026-11-16T22:41:58.439Z", + "retrieved": "2026-11-16T22:57:50.786Z", "citation": "World Bank International Debt Statistics (December 2025 and November 2026 releases; November 2026 read through the Development Finance Observatory) and IMF World Economic Outlook (October 2025 and October 2026)", "dfo": [ { @@ -2650,6 +2650,2230 @@ "citation": "IMF World Economic Outlook (WEO) (2026), via the Development Finance Observatory", "rows": 975, "warnings": [] + }, + { + "key": "disbursements_by_creditor", + "question": "DT.DIS.DPPG.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Disbursements on public or publicly guaranteed external debt, by creditor to 58 debtors from 163 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8f00e017e889015579768535308a2982", + "versions": [ + "cv_5d93b52a44ddd9ab63e7022c6f6d9ecc" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Disbursements on public or publicly guaranteed external debt, by creditor to 58 debtors from 163 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_084e5b3313e3b0296fbb589b84022d3d", + "definition": { + "schema_version": 1, + "spec_id": "spec_084e5b3313e3b0296fbb589b84022d3d", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Disbursement", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "PublicOrPubliclyGuaranteed", + "state": "value" + }, + "property": "guaranteeStatus" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_5d93b52a44ddd9ab63e7022c6f6d9ecc", + "artifact": { + "digest": "sha256:0d45340ed0a5cfadf303ab29cfe413472ba57618a9b66d3810d9fcbde1047102", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:34+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 29105, + "warnings": [] + }, + { + "key": "service_bilateral_by_creditor", + "question": "DT.TDS.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "External debt service of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_4a6d10df33fcf83b15ec3cf7d761112d", + "versions": [ + "cv_45406ec2db6dcbdb1f7b0dc6e2fef7d6" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "External debt service of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_667cd38f67bac08950cf1f4e3d9c54e6", + "definition": { + "schema_version": 1, + "spec_id": "spec_667cd38f67bac08950cf1f4e3d9c54e6", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "ServicingPayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_45406ec2db6dcbdb1f7b0dc6e2fef7d6", + "artifact": { + "digest": "sha256:79579941d3763e2fe153e33264ade4f140528db13828625f921b7c3889a10244", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:37+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 9469, + "warnings": [] + }, + { + "key": "principal_bilateral_by_creditor", + "question": "DT.AMT.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Principal repayments on external debt of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8f45d053b17f9d8f6c92ec4fd24e9feb", + "versions": [ + "cv_a99ee4029b564dd8eecde997012a1750" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Principal repayments on external debt of 58 debtors owed to 68 creditors owed to bilateral creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0f9826911ec0b96505727e016cce945c", + "definition": { + "schema_version": 1, + "spec_id": "spec_0f9826911ec0b96505727e016cce945c", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "PrincipalRepayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_a99ee4029b564dd8eecde997012a1750", + "artifact": { + "digest": "sha256:4173384c01ce1eb7d43fbb8d1426f25e13383fea54faecb71336acf3f63f2e21", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:40+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 8819, + "warnings": [] + }, + { + "key": "disbursements_bilateral_by_creditor", + "question": "DT.DIS.BLAT.CD for Kenya by creditor, 2015 to 2030", + "sentence": "Disbursements on external debt to bilateral creditors, by creditor to 58 debtors from 87 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_3f4190a11f0c8e07403588347a6abcb2", + "versions": [ + "cv_b20ab3ac6518def44a79cedd9705f9fd" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Disbursements on external debt to bilateral creditors, by creditor to 58 debtors from 87 creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_8721d01a2a41f1d4c120f3592ee97023", + "definition": { + "schema_version": 1, + "spec_id": "spec_8721d01a2a41f1d4c120f3592ee97023", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Disbursement", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypeBLAT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "open_roles": [ + "origin" + ], + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_b20ab3ac6518def44a79cedd9705f9fd", + "artifact": { + "digest": "sha256:2c287c3e02e1b01912791053d2b82009cf9e5d2e7303c638c84b8d437d267000", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:44+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 15721, + "warnings": [] + }, + { + "key": "concessional_stock", + "question": "DT.DOD.ALLC.CD for Kenya, 2015 to 2030", + "sentence": "Outstanding external debt of 58 debtors for concessional, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_ce50414a383998cb186bda9eba6c9427", + "versions": [ + "cv_ae07a7f9844222679405b9550618110e" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Outstanding external debt of 58 debtors for concessional, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_41ec6db6e7f84ba3c1b5eedfd2930ded", + "definition": { + "schema_version": 1, + "spec_id": "spec_41ec6db6e7f84ba3c1b5eedfd2930ded", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialPosition", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "AmountOutstanding", + "state": "value" + }, + "property": "financialPositionType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "financingResource" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSConcessional", + "state": "value" + }, + "property": "idsConcessionality" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsCreditorType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsDebtorType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "includesIMFCredit" + }, + { + "binding": { + "state": "unbound" + }, + "property": "interestRateVariability" + }, + { + "binding": { + "state": "unbound" + }, + "property": "maturityBand" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_ae07a7f9844222679405b9550618110e", + "artifact": { + "digest": "sha256:140a40b92b434627e44cdddb70e343ca2ec04ccf4594a044daf761790ce753af", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:46+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 638, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "grant_element", + "question": "DT.GRE.DPPG for Kenya, 2015 to 2030", + "sentence": "Grant element mean value in percent to 58 recipients for commitment for public or publicly guaranteed, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_7f143da71cea59b211308c6b923a971d", + "versions": [ + "cv_8cc45b66f625fa6e36439a641361a1c6" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grant element mean value in percent to 58 recipients for commitment for public or publicly guaranteed, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_e4d4423e8865a961f1ac2b913a449409", + "definition": { + "schema_version": 1, + "spec_id": "spec_e4d4423e8865a961f1ac2b913a449409", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "grantElement" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "PublicOrPubliclyGuaranteed", + "state": "value" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "state": "unbound" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_8cc45b66f625fa6e36439a641361a1c6", + "artifact": { + "digest": "sha256:f4c64b7c8eddd36d0428b4197088c0ec122405e305fa6b58ee8041b226089b16", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:47+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "rate_official", + "question": "DT.INR.OFFT for Kenya, 2015 to 2030", + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_e96476aa6dc0d193dc360a928dee199a", + "versions": [ + "cv_63f48f58250051c3a90f02b7381b9da9" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0dbd404f27545191ec8d21af052c225f", + "definition": { + "schema_version": 1, + "spec_id": "spec_0dbd404f27545191ec8d21af052c225f", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "interestRate" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_63f48f58250051c3a90f02b7381b9da9", + "artifact": { + "digest": "sha256:b91eaf6ab5f38c1c37f9d9e643c3e81656d3b8ef7949f724f64e64c3ae0be97f", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:49+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "rate_private", + "question": "DT.INR.PRVT for Kenya, 2015 to 2030", + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_3f0710e7c717f505f0002990ff56fc0e", + "versions": [ + "cv_ca114fc553dfdfedf72b2212c8203eed" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Interest rate mean value in percent to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_6ddc625841c482c698a8614316a111eb", + "definition": { + "schema_version": 1, + "spec_id": "spec_6ddc625841c482c698a8614316a111eb", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "interestRate" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_ca114fc553dfdfedf72b2212c8203eed", + "artifact": { + "digest": "sha256:e6a1a8fbc6ef6b5cb7edd69e49f1de0dc83d9559ae6c062d4e0634a52203d4ee", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:50+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "maturity_official", + "question": "DT.MAT.OFFT for Kenya, 2015 to 2030", + "sentence": "Maturity mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_6d9499d79d16227061d9e3a00f732128", + "versions": [ + "cv_22db82cd4fb229da356c10f045d75b41" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Maturity mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_963816c32bc63fef5da9385e72c7af2f", + "definition": { + "schema_version": 1, + "spec_id": "spec_963816c32bc63fef5da9385e72c7af2f", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "maturity" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_22db82cd4fb229da356c10f045d75b41", + "artifact": { + "digest": "sha256:cf0826a09f5d2a86c1c6cfe55a1d75a190d683fda1861c1cc28a9bed23b0a149", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:52+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "maturity_private", + "question": "DT.MAT.PRVT for Kenya, 2015 to 2030", + "sentence": "Maturity mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_e0013e39b2107467c65df1454433f51b", + "versions": [ + "cv_4e30a90cb4aa5b887d43b6611c802d8f" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Maturity mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_3058d1b6d1bcb700ee96005ee32f89f4", + "definition": { + "schema_version": 1, + "spec_id": "spec_3058d1b6d1bcb700ee96005ee32f89f4", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "maturity" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_4e30a90cb4aa5b887d43b6611c802d8f", + "artifact": { + "digest": "sha256:3268b39a7875968f43afffd0231d075f41dce04a12fc558da828b04a59da87fa", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:53+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "grace_official", + "question": "DT.GPA.OFFT for Kenya, 2015 to 2030", + "sentence": "Grace period mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_a46f61118557f91f0d3c2b68165dbe12", + "versions": [ + "cv_aee0d7c8063531ab23712dcef0a734ab" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grace period mean value to 58 recipients for commitment from official creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_0bde7b892606c20386c41bc4466baef3", + "definition": { + "schema_version": 1, + "spec_id": "spec_0bde7b892606c20386c41bc4466baef3", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "gracePeriod" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_aee0d7c8063531ab23712dcef0a734ab", + "artifact": { + "digest": "sha256:1c6df1ee76e4ba7c4f95d0577c6fe267d7f2a4e571061bbfa23f97ea9fb9f620", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:54+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 609, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "grace_private", + "question": "DT.GPA.PRVT for Kenya, 2015 to 2030", + "sentence": "Grace period mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "specId": "spec_f1aa54b8115c9fd98ccb8580b3a28500", + "versions": [ + "cv_f9c2079172429473867f5c9e70c78eaa" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Grace period mean value to 58 recipients for commitment from private creditors, 2015 to 2025. World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_480908c64b2f9c58965aa3a55c4a4fe6", + "definition": { + "schema_version": 1, + "spec_id": "spec_480908c64b2f9c58965aa3a55c4a4fe6", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "meanValue", + "population_type": "FinancialObligation", + "measured_property": "gracePeriod" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "state": "unbound" + }, + "property": "guaranteeStatus" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_f9c2079172429473867f5c9e70c78eaa", + "artifact": { + "digest": "sha256:3cbd30e03b738c04bcfdc4f27751e77ce6ce6b41296c4b059387efd7cbfeaa59", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:56+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 279, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 16 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "commitments_official", + "question": "DT.COM.OFFT.CD for Kenya, 2015 to 2030", + "sentence": "Commitments of external debt (debt instrument) to official creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_e48c1e9841106b4f6018211a612ab1d2", + "versions": [ + "cv_d9483a908b86b48556e1568917f6b4b5" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Commitments of external debt (debt instrument) to official creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_153cf557a7fa9709c40373e46043e757", + "definition": { + "schema_version": 1, + "spec_id": "spec_153cf557a7fa9709c40373e46043e757", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialObligation", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + }, + { + "binding": { + "ref": "IDSCreditorTypeOFFT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_d9483a908b86b48556e1568917f6b4b5", + "artifact": { + "digest": "sha256:e3e0c2350a1ee7818d5a66fb9435c4133868848d5d319aa027610cfc6de1615a", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:57+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 628, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. [coverage_below_scope]" + ] + }, + { + "key": "commitments_private", + "question": "DT.COM.PRVT.CD for Kenya, 2015 to 2030", + "sentence": "Commitments of external debt (debt instrument) to private creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_8eb7985ceb582c96d038db35557af0d4", + "versions": [ + "cv_fc8a543dc123d3e929004c555e592eb5" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Commitments of external debt (debt instrument) to private creditors to 58 recipients, 2015 to 2025. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_a841d4992e6594edcc80505644560149", + "definition": { + "schema_version": 1, + "spec_id": "spec_a841d4992e6594edcc80505644560149", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialObligation", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "Commitment", + "state": "value" + }, + "property": "financialObligationType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_fc8a543dc123d3e929004c555e592eb5", + "artifact": { + "digest": "sha256:51e6e1f4e7d265d606ceca86d9cb512f09ebd647b6b2d87281564fbc7715297e", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:52:58+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 355, + "warnings": [ + "The served coverage falls short of the requested scope. Requested 2015 to 2031; the data covers 2015 to 2025. No observations were served for 14 requested entities. [coverage_below_scope]" + ] + }, + { + "key": "imf_principal", + "question": "DT.AMT.DIMF.CD for Kenya from the IMF, 2015 to 2030", + "sentence": "Principal repayments on external debt of 58 debtors owed to International Monetary Fund for debt instrument, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_92fe956734b081dc6c19369a503d8818", + "versions": [ + "cv_85698a37ff5f90053ce48337f3d7dca0" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "Principal repayments on external debt of 58 debtors owed to International Monetary Fund for debt instrument, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_9973126bf6c31759175294b5ee122483", + "definition": { + "schema_version": 1, + "spec_id": "spec_9973126bf6c31759175294b5ee122483", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "PrincipalRepayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "DebtInstrument", + "state": "value" + }, + "property": "financingResource" + } + ], + "entities": { + "origin": [ + "InternationalMonetaryFund" + ], + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_85698a37ff5f90053ce48337f3d7dca0", + "artifact": { + "digest": "sha256:8a241538c80679845b274430d9347f312dca53952ccccbb62793ab9480c4a22f", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:56:29+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 896, + "warnings": [] + }, + { + "key": "service_private", + "question": "DT.TDS.PRVT.CD for Kenya, 2015 to 2030", + "sentence": "External debt service of 58 debtors owed to private creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "specId": "spec_3ac8d286e89a615162dc56e0a1ed177d", + "versions": [ + "cv_945b54d2c5fa83353e5559faf5f35c31" + ], + "ref": { + "format_version": 1, + "members": [ + { + "parts": [], + "sentence": "External debt service of 58 debtors owed to private creditors, 2015 to 2031. Current US dollars · World Bank International Debt Statistics (IDS).", + "spec": { + "spec_id": "spec_3141d43cbdc9501b37bb7ad317706f86", + "definition": { + "schema_version": 1, + "spec_id": "spec_3141d43cbdc9501b37bb7ad317706f86", + "identity": { + "shape": { + "kind": "statvar_schema", + "stat_type": "measuredValue", + "population_type": "FinancialFlow", + "measured_property": "amount", + "measurement_qualifier": "Nominal" + }, + "slots": [ + { + "binding": { + "ref": "ServicingPayment", + "state": "value" + }, + "property": "financialFlowType" + }, + { + "binding": { + "ref": "IDSCreditorTypePRVT", + "state": "value" + }, + "property": "idsCreditorType" + } + ], + "entities": { + "destination": [ + "country/AGO", + "country/BDI", + "country/BEN", + "country/BFA", + "country/BGD", + "country/BTN", + "country/CAF", + "country/CIV", + "country/CMR", + "country/COD", + "country/COG", + "country/COM", + "country/DJI", + "country/EGY", + "country/ETH", + "country/GHA", + "country/GIN", + "country/GMB", + "country/GNB", + "country/HND", + "country/HTI", + "country/IND", + "country/JOR", + "country/KEN", + "country/KGZ", + "country/KHM", + "country/LAO", + "country/LBR", + "country/LSO", + "country/MAR", + "country/MDG", + "country/MLI", + "country/MMR", + "country/MOZ", + "country/MRT", + "country/MWI", + "country/NER", + "country/NGA", + "country/NIC", + "country/NPL", + "country/PAK", + "country/PHL", + "country/PNG", + "country/RWA", + "country/SEN", + "country/SLB", + "country/SLE", + "country/STP", + "country/SWZ", + "country/TCD", + "country/TJK", + "country/TUN", + "country/TZA", + "country/UGA", + "country/UZB", + "country/VNM", + "country/VUT", + "country/ZMB" + ] + }, + "identity_version": "spec1", + "requested_window": { + "kind": "range", + "end_year": 2031, + "start_year": 2015 + } + } + } + }, + "content_version": "cv_945b54d2c5fa83353e5559faf5f35c31", + "artifact": { + "digest": "sha256:c70f9e22325a242050a8b9b44ec1cc57c742b372b82739840cb5beb624206e41", + "rendering": { + "format": "parquet", + "bundle": false, + "without_party_totals": true + } + } + } + ] + }, + "fetchedAt": "2026-11-16T22:56:31+00:00", + "citation": "World Bank International Debt Statistics (IDS) (2026), via the Development Finance Observatory", + "rows": 755, + "warnings": [ + "The served coverage falls short of the requested scope. No observations were served for 5 requested entities. [coverage_below_scope]" + ] } ], "preloads": [ @@ -2739,70 +4963,6 @@ ], "source": "https://www.imf.org/en/Publications/WEO, read with bblocks-data-importers 0.5.0 and imf-reader 2.3.0" }, - { - "name": "World Bank International Debt Statistics, November 2026 release, bulk files", - "baseYear": 2025, - "vintage": "November 2026", - "series": [ - "DT.AMT.BLAT.CD", - "DT.AMT.DIMF.CD", - "DT.AMT.DPPG.CD", - "DT.AMT.MLAT.CD", - "DT.AMT.PRVT.CD", - "DT.COM.OFFT.CD", - "DT.COM.PRVT.CD", - "DT.DIS.BLAT.CD", - "DT.DIS.DIMF.CD", - "DT.DIS.DPPG.CD", - "DT.DIS.MLAT.CD", - "DT.DIS.PRVT.CD", - "DT.DOD.ALLC.CD", - "DT.DOD.DIMF.CD", - "DT.DOD.DPPG.CD", - "DT.GPA.OFFT", - "DT.GPA.PRVT", - "DT.GRE.DPPG", - "DT.INR.OFFT", - "DT.INR.PRVT", - "DT.INT.DIMF.CD", - "DT.MAT.OFFT", - "DT.MAT.PRVT", - "DT.TDS.BLAT.CD", - "DT.TDS.DPPG.CD", - "DT.TDS.MLAT.CD", - "DT.TDS.PRVT.CD" - ], - "counterparts": [ - "World", - "China" - ], - "files": [ - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092201/A_D.xlsx", - "bytes": 134537761 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092202/E_K.xlsx", - "bytes": 161753053 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092203/L_M.xlsx", - "bytes": 173315697 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0093225/N_Q.xlsx", - "bytes": 46330567 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092204/R_U.xlsx", - "bytes": 198269062 - }, - { - "url": "https://datacatalogfiles.worldbank.org/ddh-published/0038015/DR0092205/V_Z.xlsx", - "bytes": 37045610 - } - ] - }, { "name": "IMF World Economic Outlook, October 2026", "baseYear": 2025, @@ -2847,7 +5007,7 @@ "2024": { "year": 2024, "debtFace": 3322918900, - "debtPV": 3192025982, + "debtPV": 3341243028, "gdp": 3098000000, "capacity": "strong", "capacitySource": "dsa", @@ -3039,7 +5199,7 @@ "2025": { "year": 2025, "debtFace": 3284537829, - "debtPV": 3141719214, + "debtPV": 3261863854, "gdp": 3509759000, "capacity": "strong", "capacitySource": "dsa", @@ -3238,7 +5398,7 @@ "2024": { "year": 2024, "debtFace": 2794536990, - "debtPV": 2564207802, + "debtPV": 2596951128, "gdp": 4291000000, "capacity": "weak", "capacitySource": "dsa", @@ -3430,7 +5590,7 @@ "2025": { "year": 2025, "debtFace": 2864744060, - "debtPV": 2588918255, + "debtPV": 2640257698, "gdp": 4489378000, "capacity": "weak", "capacitySource": "dsa", @@ -3629,7 +5789,7 @@ "2024": { "year": 2024, "debtFace": 1310171789, - "debtPV": 1109010787, + "debtPV": 1064672791, "gdp": 2186000000, "capacity": "weak", "capacitySource": "dsa", @@ -3821,7 +5981,7 @@ "2025": { "year": 2025, "debtFace": 1400709956, - "debtPV": 1171463249, + "debtPV": 1120395577, "gdp": 2655691000, "capacity": "medium", "capacitySource": "dsa", @@ -4020,7 +6180,7 @@ "2024": { "year": 2024, "debtFace": 9150147490, - "debtPV": 6557754999, + "debtPV": 6504423994, "gdp": 22745000000, "capacity": "weak", "capacitySource": "dsa", @@ -4212,7 +6372,7 @@ "2025": { "year": 2025, "debtFace": 9295232055, - "debtPV": 6805449863, + "debtPV": 6530887102, "gdp": 23603114000, "capacity": "weak", "capacitySource": "dsa", @@ -4411,7 +6571,7 @@ "2024": { "year": 2024, "debtFace": 15473254703, - "debtPV": 15244256753, + "debtPV": 15353366275, "gdp": 26326000000, "capacity": "weak", "capacitySource": "dsa", @@ -4603,7 +6763,7 @@ "2025": { "year": 2025, "debtFace": 16017665500, - "debtPV": 15802371849, + "debtPV": 15893498816, "gdp": 28709065000, "capacity": "weak", "capacitySource": "dsa", @@ -4802,7 +6962,7 @@ "2024": { "year": 2024, "debtFace": 5334336291, - "debtPV": 5181226764, + "debtPV": 5212168965, "gdp": 14774000000, "capacity": "weak", "capacitySource": "dsa", @@ -4994,7 +7154,7 @@ "2025": { "year": 2025, "debtFace": 6386070786, - "debtPV": 6225956026, + "debtPV": 6275559343, "gdp": 15425708000, "capacity": "weak", "capacitySource": "dsa", @@ -5193,7 +7353,7 @@ "2024": { "year": 2024, "debtFace": 10024589006, - "debtPV": 9516239826, + "debtPV": 9599464104, "gdp": 15908000000, "capacity": "weak", "capacitySource": "dsa", @@ -5385,7 +7545,7 @@ "2025": { "year": 2025, "debtFace": 10116261206, - "debtPV": 9637645054, + "debtPV": 9698659591, "gdp": 16906450000, "capacity": "weak", "capacitySource": "dsa", @@ -5584,7 +7744,7 @@ "2024": { "year": 2024, "debtFace": 25093882285, - "debtPV": 23580689074, + "debtPV": 23835670536, "gdp": 32816000000, "capacity": "strong", "capacitySource": "dsa", @@ -5776,7 +7936,7 @@ "2025": { "year": 2025, "debtFace": 27694845847, - "debtPV": 25995499055, + "debtPV": 26277814852, "gdp": 37076468000, "capacity": "strong", "capacitySource": "dsa", @@ -5939,7 +8099,7 @@ "2024": { "year": 2024, "debtFace": 77581679615, - "debtPV": 64642361129, + "debtPV": 64990915871, "gdp": 450461000000, "capacity": "medium", "capacitySource": "dsa", @@ -6131,7 +8291,7 @@ "2025": { "year": 2025, "debtFace": 83456652763, - "debtPV": 70284840493, + "debtPV": 70516013742, "gdp": 457903817000, "capacity": "medium", "capacitySource": "dsa", @@ -6330,7 +8490,7 @@ "2024": { "year": 2024, "debtFace": 438777676, - "debtPV": 378008531, + "debtPV": 312235698, "gdp": 2831000000, "capacity": "weak", "capacitySource": "dsa", @@ -6522,7 +8682,7 @@ "2025": { "year": 2025, "debtFace": 464944299, - "debtPV": 411174782, + "debtPV": 361861251, "gdp": 4636131000, "capacity": "weak", "capacitySource": "dsa", @@ -6721,7 +8881,7 @@ "2024": { "year": 2024, "debtFace": 323974704, - "debtPV": 220489307, + "debtPV": 208847795, "gdp": 1442000000, "capacity": "medium", "capacitySource": "dsa", @@ -6913,7 +9073,7 @@ "2025": { "year": 2025, "debtFace": 378360980, - "debtPV": 265151783, + "debtPV": 239210812, "gdp": 1608049000, "capacity": "medium", "capacitySource": "dsa", @@ -7112,7 +9272,7 @@ "2024": { "year": 2024, "debtFace": 106926880075, - "debtPV": 106574777108, + "debtPV": 106396913545, "gdp": 383105000000, "capacity": "strong", "capacitySource": "assumed", @@ -7304,7 +9464,7 @@ "2025": { "year": 2025, "debtFace": 114576924655, - "debtPV": 114262788514, + "debtPV": 114052988789, "gdp": 364638351000, "capacity": "strong", "capacitySource": "assumed", @@ -7503,7 +9663,7 @@ "2024": { "year": 2024, "debtFace": 33950250176, - "debtPV": 27705267341, + "debtPV": 28093721907, "gdp": 142073000000, "capacity": "weak", "capacitySource": "dsa", @@ -7695,7 +9855,7 @@ "2025": { "year": 2025, "debtFace": 36308242412, - "debtPV": 29534720226, + "debtPV": 29838243676, "gdp": 126350980000, "capacity": "weak", "capacitySource": "dsa", @@ -7894,7 +10054,7 @@ "2024": { "year": 2024, "debtFace": 1009688795, - "debtPV": 740796282, + "debtPV": 741304325, "gdp": 2355000000, "capacity": "medium", "capacitySource": "dsa", @@ -8086,7 +10246,7 @@ "2025": { "year": 2025, "debtFace": 1047496099, - "debtPV": 773816154, + "debtPV": 769865978, "gdp": 2783092000, "capacity": "strong", "capacitySource": "dsa", @@ -8285,7 +10445,7 @@ "2024": { "year": 2024, "debtFace": 4093001848, - "debtPV": 3546216085, + "debtPV": 3666251573, "gdp": 24229000000, "capacity": "weak", "capacitySource": "dsa", @@ -8477,7 +10637,7 @@ "2025": { "year": 2025, "debtFace": 5187614266, - "debtPV": 4564198549, + "debtPV": 4707462133, "gdp": 42272473000, "capacity": "weak", "capacitySource": "dsa", @@ -8676,7 +10836,7 @@ "2024": { "year": 2024, "debtFace": 4527618637, - "debtPV": 2976462172, + "debtPV": 3022256912, "gdp": 19866000000, "capacity": "medium", "capacitySource": "dsa", @@ -8868,7 +11028,7 @@ "2025": { "year": 2025, "debtFace": 5573465218, - "debtPV": 3570257412, + "debtPV": 3596800076, "gdp": 21269730000, "capacity": "medium", "capacitySource": "dsa", @@ -9067,7 +11227,7 @@ "2024": { "year": 2024, "debtFace": 89555608083, - "debtPV": 86781258210, + "debtPV": 86928514391, "gdp": 371408000000, "capacity": "strong", "capacitySource": "assumed", @@ -9223,7 +11383,7 @@ "2025": { "year": 2025, "debtFace": 92898820157, - "debtPV": 90136248644, + "debtPV": 90277165079, "gdp": 408160033000, "capacity": "strong", "capacitySource": "assumed", @@ -9386,7 +11546,7 @@ "2024": { "year": 2024, "debtFace": 7252683040, - "debtPV": 7149275461, + "debtPV": 7152623005, "gdp": 31496000000, "capacity": "weak", "capacitySource": "dsa", @@ -9578,7 +11738,7 @@ "2025": { "year": 2025, "debtFace": 7519318854, - "debtPV": 7410462272, + "debtPV": 7415293825, "gdp": 33097745000, "capacity": "weak", "capacitySource": "dsa", @@ -9777,7 +11937,7 @@ "2024": { "year": 2024, "debtFace": 24277203877, - "debtPV": 20142896386, + "debtPV": 20203366182, "gdp": 79236000000, "capacity": "medium", "capacitySource": "dsa", @@ -9969,7 +12129,7 @@ "2025": { "year": 2025, "debtFace": 27527515839, - "debtPV": 22901595280, + "debtPV": 22969873543, "gdp": 89613915000, "capacity": "medium", "capacitySource": "dsa", @@ -10168,7 +12328,7 @@ "2024": { "year": 2024, "debtFace": 20816257886, - "debtPV": 20359998292, + "debtPV": 20342919688, "gdp": 52925000000, "capacity": "strong", "capacitySource": "assumed", @@ -10360,7 +12520,7 @@ "2025": { "year": 2025, "debtFace": 21007274315, - "debtPV": 20492230190, + "debtPV": 20468103984, "gdp": 57264299000, "capacity": "strong", "capacitySource": "assumed", @@ -10559,7 +12719,7 @@ "2024": { "year": 2024, "debtFace": 46109545926, - "debtPV": 46112929789, + "debtPV": 46112980937, "gdp": 115214000000, "capacity": "strong", "capacitySource": "assumed", @@ -10751,7 +12911,7 @@ "2025": { "year": 2025, "debtFace": 49754911996, - "debtPV": 49773692589, + "debtPV": 49770897624, "gdp": 140683116000, "capacity": "strong", "capacitySource": "assumed", @@ -10950,7 +13110,7 @@ "2024": { "year": 2024, "debtFace": 8920517760, - "debtPV": 8157719421, + "debtPV": 8271602823, "gdp": 21487000000, "capacity": "strong", "capacitySource": "dsa", @@ -11142,7 +13302,7 @@ "2025": { "year": 2025, "debtFace": 11202076067, - "debtPV": 10366046562, + "debtPV": 10510361951, "gdp": 24612884000, "capacity": "strong", "capacitySource": "dsa", @@ -11341,7 +13501,7 @@ "2024": { "year": 2024, "debtFace": 12516539291, - "debtPV": 11448814071, + "debtPV": 11567474564, "gdp": 54394000000, "capacity": "weak", "capacitySource": "dsa", @@ -11533,7 +13693,7 @@ "2025": { "year": 2025, "debtFace": 14236033218, - "debtPV": 13020917946, + "debtPV": 13161500244, "gdp": 59159168000, "capacity": "medium", "capacitySource": "dsa", @@ -11732,7 +13892,7 @@ "2024": { "year": 2024, "debtFace": 31249010244, - "debtPV": 30410895435, + "debtPV": 30512485482, "gdp": 87096000000, "capacity": "medium", "capacitySource": "dsa", @@ -11924,7 +14084,7 @@ "2025": { "year": 2025, "debtFace": 35857696082, - "debtPV": 34910446005, + "debtPV": 35038811694, "gdp": 99897427000, "capacity": "strong", "capacitySource": "dsa", @@ -12123,7 +14283,7 @@ "2024": { "year": 2024, "debtFace": 25584060934, - "debtPV": 25241607280, + "debtPV": 25658952478, "gdp": 82825000000, "capacity": "medium", "capacitySource": "dsa", @@ -12315,7 +14475,7 @@ "2025": { "year": 2025, "debtFace": 26546486202, - "debtPV": 26066237079, + "debtPV": 26602222302, "gdp": 114707564000, "capacity": "medium", "capacitySource": "dsa", @@ -12514,7 +14674,7 @@ "2024": { "year": 2024, "debtFace": 23707731206, - "debtPV": 23460997905, + "debtPV": 23456640351, "gdp": 53428000000, "capacity": "strong", "capacitySource": "assumed", @@ -12706,7 +14866,7 @@ "2025": { "year": 2025, "debtFace": 26296050435, - "debtPV": 26015120075, + "debtPV": 26019030356, "gdp": 61697074000, "capacity": "strong", "capacitySource": "assumed", @@ -12905,7 +15065,7 @@ "2024": { "year": 2024, "debtFace": 35582544109, - "debtPV": 33244326268, + "debtPV": 33409696431, "gdp": 119307000000, "capacity": "medium", "capacitySource": "dsa", @@ -13097,7 +15257,7 @@ "2025": { "year": 2025, "debtFace": 38751061226, - "debtPV": 36524004591, + "debtPV": 36731431716, "gdp": 135919027000, "capacity": "medium", "capacitySource": "dsa", @@ -13296,7 +15456,7 @@ "2024": { "year": 2024, "debtFace": 50191529195, - "debtPV": 49179145798, + "debtPV": 49693378570, "gdp": 252109000000, "capacity": "strong", "capacitySource": "assumed", @@ -13488,7 +15648,7 @@ "2025": { "year": 2025, "debtFace": 56884060832, - "debtPV": 55956423453, + "debtPV": 56485692089, "gdp": 290490877000, "capacity": "strong", "capacitySource": "assumed", @@ -13687,7 +15847,7 @@ "2024": { "year": 2024, "debtFace": 5121248651, - "debtPV": 3302272410, + "debtPV": 3290439023, "gdp": 23130000000, "capacity": "medium", "capacitySource": "dsa", @@ -13879,7 +16039,7 @@ "2025": { "year": 2025, "debtFace": 6235463245, - "debtPV": 4067922065, + "debtPV": 4044320911, "gdp": 27679505000, "capacity": "medium", "capacitySource": "dsa", @@ -14078,7 +16238,7 @@ "2024": { "year": 2024, "debtFace": 601229942, - "debtPV": 513885480, + "debtPV": 501240767, "gdp": 4827000000, "capacity": "weak", "capacitySource": "dsa", @@ -14270,7 +16430,7 @@ "2025": { "year": 2025, "debtFace": 602661370, - "debtPV": 513392317, + "debtPV": 501812690, "gdp": 6784283000, "capacity": "weak", "capacitySource": "dsa", @@ -14469,7 +16629,7 @@ "2024": { "year": 2024, "debtFace": 11917966029, - "debtPV": 8754096675, + "debtPV": 8874704822, "gdp": 46098000000, "capacity": "medium", "capacitySource": "dsa", @@ -14661,7 +16821,7 @@ "2025": { "year": 2025, "debtFace": 12781989661, - "debtPV": 9501761580, + "debtPV": 9595469104, "gdp": 50658773000, "capacity": "medium", "capacitySource": "dsa", @@ -14860,7 +17020,7 @@ "2024": { "year": 2024, "debtFace": 2443737367, - "debtPV": 2292128907, + "debtPV": 2273841050, "gdp": 19836000000, "capacity": "weak", "capacitySource": "dsa", @@ -15052,7 +17212,7 @@ "2025": { "year": 2025, "debtFace": 2556285436, - "debtPV": 2386417162, + "debtPV": 2368924107, "gdp": 21957559000, "capacity": "weak", "capacitySource": "dsa", @@ -15251,7 +17411,7 @@ "2024": { "year": 2024, "debtFace": 7924885122, - "debtPV": 5908093114, + "debtPV": 5777488506, "gdp": 74498000000, "capacity": "weak", "capacitySource": "dsa", @@ -15443,7 +17603,7 @@ "2025": { "year": 2025, "debtFace": 9244797466, - "debtPV": 6573077464, + "debtPV": 6420360461, "gdp": 92901030000, "capacity": "weak", "capacitySource": "dsa", @@ -15642,7 +17802,7 @@ "2024": { "year": 2024, "debtFace": 866919775, - "debtPV": 857277131, + "debtPV": 856300686, "gdp": 4944000000, "capacity": "strong", "capacitySource": "assumed", @@ -15834,7 +17994,7 @@ "2025": { "year": 2025, "debtFace": 1189572150, - "debtPV": 1180884151, + "debtPV": 1182493121, "gdp": 5206788000, "capacity": "strong", "capacitySource": "assumed", @@ -16033,7 +18193,7 @@ "2024": { "year": 2024, "debtFace": 250601500, - "debtPV": 221313677, + "debtPV": 191694795, "gdp": 25285000000, "capacity": "weak", "capacitySource": "dsa", @@ -16225,7 +18385,7 @@ "2025": { "year": 2025, "debtFace": 242067492, - "debtPV": 215565253, + "debtPV": 183433037, "gdp": 32102279000, "capacity": "weak", "capacitySource": "dsa", @@ -16424,7 +18584,7 @@ "2024": { "year": 2024, "debtFace": 238949800499, - "debtPV": 230065395379, + "debtPV": 230737503730, "gdp": 3909892000000, "capacity": "strong", "capacitySource": "assumed", @@ -16616,7 +18776,7 @@ "2025": { "year": 2025, "debtFace": 252897692214, - "debtPV": 244023041474, + "debtPV": 244543062465, "gdp": 3908963671000, "capacity": "strong", "capacitySource": "assumed", @@ -16815,7 +18975,7 @@ "2024": { "year": 2024, "debtFace": 4216586368, - "debtPV": 3213668991, + "debtPV": 3201712925, "gdp": 17491000000, "capacity": "medium", "capacitySource": "dsa", @@ -17007,7 +19167,7 @@ "2025": { "year": 2025, "debtFace": 5140959288, - "debtPV": 4054396539, + "debtPV": 4188313018, "gdp": 22625108000, "capacity": "strong", "capacitySource": "dsa", @@ -17206,7 +19366,7 @@ "2024": { "year": 2024, "debtFace": 1016058493, - "debtPV": 850150330, + "debtPV": 853476803, "gdp": 2298000000, "capacity": "medium", "capacitySource": "dsa", @@ -17398,7 +19558,7 @@ "2025": { "year": 2025, "debtFace": 1115501382, - "debtPV": 934771337, + "debtPV": 939098865, "gdp": 2765798000, "capacity": "medium", "capacitySource": "dsa", @@ -17597,7 +19757,7 @@ "2024": { "year": 2024, "debtFace": 1408536038, - "debtPV": 841479816, + "debtPV": 942027710, "gdp": 4778000000, "capacity": "weak", "capacitySource": "dsa", @@ -17789,7 +19949,7 @@ "2025": { "year": 2025, "debtFace": 1633837377, - "debtPV": 972561446, + "debtPV": 1092022974, "gdp": 5215934000, "capacity": "weak", "capacitySource": "dsa", @@ -17988,7 +20148,7 @@ "2024": { "year": 2024, "debtFace": 4765753163, - "debtPV": 2843925323, + "debtPV": 2830476093, "gdp": 17421000000, "capacity": "medium", "capacitySource": "dsa", @@ -18180,7 +20340,7 @@ "2025": { "year": 2025, "debtFace": 5666535638, - "debtPV": 3320297494, + "debtPV": 3302533879, "gdp": 19467730000, "capacity": "medium", "capacitySource": "dsa", @@ -18379,7 +20539,7 @@ "2024": { "year": 2024, "debtFace": 3003754814, - "debtPV": 1773441242, + "debtPV": 1773575138, "gdp": 11797000000, "capacity": "weak", "capacitySource": "dsa", @@ -18571,7 +20731,7 @@ "2025": { "year": 2025, "debtFace": 3320034936, - "debtPV": 2039354777, + "debtPV": 2021281168, "gdp": 15095519000, "capacity": "weak", "capacitySource": "dsa", @@ -18770,7 +20930,7 @@ "2024": { "year": 2024, "debtFace": 5618291338, - "debtPV": 3769305288, + "debtPV": 3764942455, "gdp": 22789000000, "capacity": "medium", "capacitySource": "dsa", @@ -18962,7 +21122,7 @@ "2025": { "year": 2025, "debtFace": 6414175274, - "debtPV": 4308837821, + "debtPV": 4295182510, "gdp": 31231985000, "capacity": "medium", "capacitySource": "dsa", @@ -19161,7 +21321,7 @@ "2024": { "year": 2024, "debtFace": 3607484340, - "debtPV": 3231568386, + "debtPV": 3222586386, "gdp": 11003000000, "capacity": "medium", "capacitySource": "dsa", @@ -19353,7 +21513,7 @@ "2025": { "year": 2025, "debtFace": 3664943443, - "debtPV": 3262453073, + "debtPV": 3234760772, "gdp": 12603024000, "capacity": "medium", "capacitySource": "dsa", @@ -19552,7 +21712,7 @@ "2024": { "year": 2024, "debtFace": 9239552754, - "debtPV": 7135970010, + "debtPV": 5871879299, "gdp": 61653000000, "capacity": "medium", "capacitySource": "dsa", @@ -19744,7 +21904,7 @@ "2025": { "year": 2025, "debtFace": 9069288439, - "debtPV": 7111853576, + "debtPV": 5622216251, "gdp": 82309346000, "capacity": "medium", "capacitySource": "dsa", @@ -19943,7 +22103,7 @@ "2024": { "year": 2024, "debtFace": 8870826934, - "debtPV": 4987894508, + "debtPV": 4970258294, "gdp": 42914000000, "capacity": "strong", "capacitySource": "dsa", @@ -20135,7 +22295,7 @@ "2025": { "year": 2025, "debtFace": 9809952845, - "debtPV": 5496004686, + "debtPV": 5481218230, "gdp": 45489810000, "capacity": "strong", "capacitySource": "dsa", @@ -20334,7 +22494,7 @@ "2024": { "year": 2024, "debtFace": 7206043640, - "debtPV": 7031892380, + "debtPV": 7006279976, "gdp": 19694000000, "capacity": "strong", "capacitySource": "dsa", @@ -20526,7 +22686,7 @@ "2025": { "year": 2025, "debtFace": 7440590482, - "debtPV": 7292761684, + "debtPV": 7270314586, "gdp": 22237176000, "capacity": "strong", "capacitySource": "dsa", @@ -20725,7 +22885,7 @@ "2024": { "year": 2024, "debtFace": 8345599360, - "debtPV": 6060108111, + "debtPV": 6197791084, "gdp": 14251000000, "capacity": "strong", "capacitySource": "dsa", @@ -20917,7 +23077,7 @@ "2025": { "year": 2025, "debtFace": 9298460508, - "debtPV": 6842247002, + "debtPV": 6958647765, "gdp": 16372776000, "capacity": "strong", "capacitySource": "dsa", @@ -21116,7 +23276,7 @@ "2024": { "year": 2024, "debtFace": 254540060, - "debtPV": 224389042, + "debtPV": 214181137, "gdp": 828000000, "capacity": "weak", "capacitySource": "dsa", @@ -21308,7 +23468,7 @@ "2025": { "year": 2025, "debtFace": 286350748, - "debtPV": 250103266, + "debtPV": 239432602, "gdp": 981111000, "capacity": "weak", "capacitySource": "dsa", @@ -21507,7 +23667,7 @@ "2024": { "year": 2024, "debtFace": 1314090731, - "debtPV": 961908526, + "debtPV": 905242185, "gdp": 7792000000, "capacity": "weak", "capacitySource": "dsa", @@ -21699,7 +23859,7 @@ "2025": { "year": 2025, "debtFace": 1313326907, - "debtPV": 952881926, + "debtPV": 899517518, "gdp": 7711041000, "capacity": "weak", "capacitySource": "dsa", @@ -21898,7 +24058,7 @@ "2024": { "year": 2024, "debtFace": 284840422, - "debtPV": 164680726, + "debtPV": 151861142, "gdp": 1778000000, "capacity": "weak", "capacitySource": "dsa", @@ -22090,7 +24250,7 @@ "2025": { "year": 2025, "debtFace": 381577158, - "debtPV": 215014191, + "debtPV": 198456391, "gdp": 1728408000, "capacity": "weak", "capacitySource": "dsa", @@ -22289,7 +24449,7 @@ "2024": { "year": 2024, "debtFace": 2995608795, - "debtPV": 2685261311, + "debtPV": 2801628112, "gdp": 14199000000, "capacity": "strong", "capacitySource": "dsa", @@ -22481,7 +24641,7 @@ "2025": { "year": 2025, "debtFace": 2860343923, - "debtPV": 2574242069, + "debtPV": 2674817306, "gdp": 17541694000, "capacity": "strong", "capacitySource": "dsa", @@ -22680,7 +24840,7 @@ "2024": { "year": 2024, "debtFace": 14099703963, - "debtPV": 11521234528, + "debtPV": 11611185309, "gdp": 56232000000, "capacity": "medium", "capacitySource": "dsa", @@ -22872,7 +25032,7 @@ "2025": { "year": 2025, "debtFace": 17515733252, - "debtPV": 15754980711, + "debtPV": 16856522281, "gdp": 66450627000, "capacity": "medium", "capacitySource": "dsa", @@ -23071,7 +25231,7 @@ "2024": { "year": 2024, "debtFace": 39164853498, - "debtPV": 38332382747, + "debtPV": 38513568509, "gdp": 114962000000, "capacity": "strong", "capacitySource": "dsa", @@ -23263,7 +25423,7 @@ "2025": { "year": 2025, "debtFace": 47264391399, - "debtPV": 46237288126, + "debtPV": 46518658181, "gdp": 147069036000, "capacity": "strong", "capacitySource": "dsa", @@ -23462,7 +25622,7 @@ "2024": { "year": 2024, "debtFace": 352895057, - "debtPV": 277445402, + "debtPV": 268473988, "gdp": 1090000000, "capacity": "medium", "capacitySource": "dsa", @@ -23654,7 +25814,7 @@ "2025": { "year": 2025, "debtFace": 386909509, - "debtPV": 311586225, + "debtPV": 293280386, "gdp": 1306102000, "capacity": "medium", "capacitySource": "dsa", @@ -23853,7 +26013,7 @@ "2024": { "year": 2024, "debtFace": 38450213371, - "debtPV": 30824159453, + "debtPV": 30975250101, "gdp": 459472000000, "capacity": "strong", "capacitySource": "assumed", @@ -24045,7 +26205,7 @@ "2025": { "year": 2025, "debtFace": 36129680299, - "debtPV": 29306986718, + "debtPV": 29043918430, "gdp": 494045513000, "capacity": "strong", "capacitySource": "assumed", @@ -24244,7 +26404,7 @@ "2024": { "year": 2024, "debtFace": 9565004967, - "debtPV": 9176293100, + "debtPV": 9271796896, "gdp": 37100000000, "capacity": "strong", "capacitySource": "dsa", @@ -24436,7 +26596,7 @@ "2025": { "year": 2025, "debtFace": 9523532973, - "debtPV": 9184266147, + "debtPV": 9265244744, "gdp": 39598296000, "capacity": "strong", "capacitySource": "dsa", @@ -24635,7 +26795,7 @@ "2024": { "year": 2024, "debtFace": 45727304918, - "debtPV": 45222971466, + "debtPV": 45300051900, "gdp": 160606000000, "capacity": "strong", "capacitySource": "assumed", @@ -24827,7 +26987,7 @@ "2025": { "year": 2025, "debtFace": 55144706869, - "debtPV": 54394347695, + "debtPV": 54501462892, "gdp": 183973267000, "capacity": "strong", "capacitySource": "assumed", @@ -25026,7 +27186,7 @@ "2024": { "year": 2024, "debtFace": 80508809537, - "debtPV": 78423207118, + "debtPV": 78605171067, "gdp": 461617000000, "capacity": "strong", "capacitySource": "assumed", @@ -25218,7 +27378,7 @@ "2025": { "year": 2025, "debtFace": 89883811212, - "debtPV": 87666170224, + "debtPV": 87851565683, "gdp": 487086085000, "capacity": "strong", "capacitySource": "assumed", diff --git a/prototypes/app/debt-thresholds/_data/types.ts b/prototypes/app/debt-thresholds/_data/types.ts index 6a521a2..7f9ae5d 100644 --- a/prototypes/app/debt-thresholds/_data/types.ts +++ b/prototypes/app/debt-thresholds/_data/types.ts @@ -45,7 +45,8 @@ export type BaseYear = { debtFace: number | null; /** * The same debt at estimated present value: the concessional share of the stock - * discounted by the mean grant element of commitments from 2015 to the base year (IDS). + * discounted by the grant element of commitments from 2015 to the base year, weighted + * by the amount committed each year (IDS). */ debtPV: number | null; /** GDP in the base year, IMF WEO. */