International Debt Statistics (IDS) importer
The InternationalDebtStatistics importer is a specialized
WorldBank data importer
for the IDS database (id=6) containing debt stock and flow data.
About IDS
IDS provides comprehensive annual external debt stocks and flows data for low- and middle-income countries that report public and publicly guaranteed external debt to the World Bank's Debtor Reporting System (DRS).
Visit the IDS here.
Basic Usage
To start using the IDS importer, instantiate an instance of the importer
This object is built on top of the WorldBank importer connected to the IDS database
(id=6). You can fetch data for indicators by calling the get_data method.
principal_data = ids.get_data('DT.AMT.MLAT.CD', years=[2023])
print(principal_data.head())
# Output:
# year entity_code entity_name indicator_code value counterpart_code ...
# 0 2023 ZWE Zimbabwe DT.AMT.MLAT.CD 0.0 913 ...
# 1 2023 ZMB Zambia DT.AMT.MLAT.CD 33223157.7 913 ...
# 2 2023 UGA Uganda DT.AMT.MLAT.CD 32692206.2 913 ...
# ...
Get debt stock or service indicators
The import offers convenient functionality to get all indicators and data for debt stocks and service.
To see the indicators for debt stocks or service:
# debt service indicators
debt_service_indicators = ids.debt_service_indicators()
# debt stock indicators
ids.debt_stocks_indicators()
print(debt_service_indicators)
# Output:
# {'DT.AMT.BLAT.CD': 'Bilateral',
# 'DT.AMT.MLAT.CD': 'Multilateral',
# 'DT.AMT.PBND.CD': 'Private',
# ...}
To fetch all data for debt stock or debt service indicators: