Year
stringdate 1960-01-01 00:00:00
2024-01-01 00:00:00
| foreign_direct_investment_net_bop_current_us_
float64 -40,557,211,850.65
12.7B
⌀ | gni_current_us_
float64 11.6M
555B
| gni_per_capita_growth_annual_
float64 -49.05
87.5
⌀ | net_trade_in_goods_and_services_bop_current_us_
float64 -35,699,565,000
36.2B
⌀ |
|---|---|---|---|---|
1960-01-01
| -172,906,145.605199
| 3,221,537,433.209238
| 0.811493
| -1,435,820,349.97679
|
1961-01-01
| -172,906,145.605199
| 2,972,128,128.886423
| 0.811493
| -1,435,820,349.97679
|
1962-01-01
| -172,906,145.605199
| 2,203,115,963.751707
| 0.811493
| -1,435,820,349.97679
|
1963-01-01
| -172,906,145.605199
| 2,764,286,863.031845
| 0.811493
| -1,435,820,349.97679
|
1964-01-01
| -172,906,145.605199
| 2,909,775,635.70222
| 0.811493
| -1,435,820,349.97679
|
1965-01-01
| -172,906,145.605199
| 3,055,264,428.627564
| 0.811493
| -1,435,820,349.97679
|
1966-01-01
| -172,906,145.605199
| 2,918,329,370.110957
| 0.811493
| -1,435,820,349.97679
|
1967-01-01
| -172,906,145.605199
| 3,289,850,498.069702
| 0.811493
| -1,435,820,349.97679
|
1968-01-01
| -172,906,145.605199
| 3,791,382,118.102677
| 0.811493
| -1,435,820,349.97679
|
1969-01-01
| -172,906,145.605199
| 4,257,253,264.088344
| 0.811493
| -1,435,820,349.97679
|
1970-01-01
| -172,906,145.605199
| 4,741,997,079.23339
| 0.811493
| -1,435,820,349.97679
|
1971-01-01
| -172,906,145.605199
| 5,036,471,769.342663
| 0.811493
| -1,435,820,349.97679
|
1972-01-01
| -172,906,145.605199
| 6,744,425,093.990312
| 0.811493
| -1,435,820,349.97679
|
1973-01-01
| -172,906,145.605199
| 8,632,149,037.412035
| 0.811493
| -1,435,820,349.97679
|
1974-01-01
| -172,906,145.605199
| 13,138,114,166.11852
| 5.210277
| -1,435,820,349.97679
|
1975-01-01
| -172,906,145.605199
| 15,380,661,000.3322
| 0.736252
| -1,435,820,349.97679
|
1976-01-01
| -172,906,145.605199
| 17,416,028,003.098114
| 2.832536
| -1,435,820,349.97679
|
1977-01-01
| -172,906,145.605199
| 19,801,319,536.85265
| -3.608749
| -1,435,820,349.97679
|
1978-01-01
| -134,900,022.727477
| 25,098,700,446.30475
| 7.347062
| -2,589,071,838.06679
|
1979-01-01
| -10,121,282.377754
| 31,537,622,126.886093
| 3.856849
| -246,803,577.980623
|
1980-01-01
| -315,052,964.941577
| 40,477,140,236.35487
| -2.467349
| 1,816,831,490.13455
|
1981-01-01
| 1,390,237.827535
| 42,348,269,779.37851
| -0.916642
| 1,781,126,363.37677
|
1982-01-01
| 64,892,761.821765
| 43,217,921,376.10971
| 3.661226
| 1,477,290,255.70084
|
1983-01-01
| 14,199,799.535207
| 47,009,480,391.747406
| 3.039351
| 1,468,635,148.98694
|
1984-01-01
| 13,846,038.077762
| 52,019,565,675.87228
| 3.173126
| 1,572,829,658.7464
|
1985-01-01
| 1,988,941.485342
| 56,393,654,500.97458
| 0.877814
| 2,180,476,550.37989
|
1986-01-01
| -10,633,056.755713
| 61,999,012,720.75022
| -2.238294
| -1,300,848,163.49388
|
1987-01-01
| 11,340,810.249343
| 64,846,954,477.166
| -3.48771
| 1,522,761,521.66181
|
1988-01-01
| -8,115,282.090587
| 56,590,566,390.86543
| -5.057771
| 68,472,692.639326
|
1989-01-01
| -3,942,928.303325
| 53,588,210,262.70681
| 2.287117
| 424,784,809.211557
|
1990-01-01
| 4,353,889.334925
| 59,780,577,656.19634
| -1.689121
| 3,355,174,104.4059
|
1991-01-01
| 38,651,265.707152
| 43,168,049,163.97691
| -5.405419
| 4,698,239,987.00797
|
1992-01-01
| -42,752,396.12907
| 45,843,140,788.80934
| 0.821856
| 6,091,294,273.650179
|
1993-01-01
| -124,156,057.965291
| 48,195,614,970.43079
| -3.344395
| 7,484,348,560.292389
|
1994-01-01
| -205,559,719.801513
| 40,808,325,036.48687
| -3.674717
| 8,877,402,846.934599
|
1995-01-01
| -286,963,381.637735
| 39,574,279,247.5974
| 0.695611
| 10,270,457,133.576809
|
1996-01-01
| -368,367,043.473956
| 44,381,551,167.399
| 1.957286
| 11,663,511,420.219015
|
1997-01-01
| -449,770,705.310178
| 45,957,623,524.23351
| 0.100074
| 13,056,565,706.861229
|
1998-01-01
| -531,174,367.146399
| 46,187,780,578.266304
| 3.960049
| 14,449,619,993.503435
|
1999-01-01
| -612,578,028.982621
| 46,350,667,435.23642
| 1.25542
| 15,842,674,280.145643
|
2000-01-01
| -693,981,690.818842
| 52,080,377,793.23121
| 1.252127
| 17,235,728,566.787857
|
2001-01-01
| -775,385,352.655064
| 57,817,856,450.49557
| 4.000366
| 18,628,782,853.430065
|
2002-01-01
| -856,789,014.491285
| 59,323,635,606.078674
| 3.124459
| 20,021,837,140.072277
|
2003-01-01
| -938,192,676.327507
| 71,027,324,448.38957
| 5.196142
| 21,414,891,426.714485
|
2004-01-01
| -1,019,596,338.163728
| 88,398,583,969.60336
| 2.334536
| 22,807,945,713.356693
|
2005-01-01
| -1,100,999,999.99995
| 102,459,870,112.45164
| 2.924625
| 24,200,999,999.9989
|
2006-01-01
| -1,762,000,000.00007
| 118,661,478,758.19183
| 1.90153
| 31,947,000,000.0015
|
2007-01-01
| -1,539,745,127.74472
| 140,762,493,433.62332
| 4.52374
| 30,125,606,755.243103
|
2008-01-01
| -2,320,754,663.57849
| 179,148,225,224.05344
| 1.27009
| 32,476,308,401.8163
|
2009-01-01
| -2,532,507,565.45895
| 149,162,398,987.97778
| -0.70529
| -909,806,577.24988
|
2010-01-01
| -2,081,136,054.38595
| 177,703,049,242.4897
| 3.603392
| 9,943,077,524.8936
|
2011-01-01
| -2,037,319,357.9126
| 216,589,368,243.66016
| 0.06346
| 17,000,013,500.8074
|
2012-01-01
| -1,541,844,615.21892
| 224,964,112,461.51093
| 0.135846
| 12,805,677,994.9307
|
2013-01-01
| -1,963,635,049.70214
| 225,944,267,491.8481
| -0.310263
| 2,923,291,764.88608
|
2014-01-01
| -1,520,777,119.23079
| 234,461,348,665.9933
| 1.72917
| -7,677,836,862.53171
|
2015-01-01
| 638,915,215.34559
| 183,649,437,186.97495
| 1.079293
| -25,384,908,362.184498
|
2016-01-01
| -1,591,723,072.05371
| 179,594,281,655.13672
| 3.485586
| -27,449,490,180.5443
|
2017-01-01
| -1,238,809,875.76889
| 187,682,164,214.7478
| -1.134131
| -22,402,635,934.4411
|
2018-01-01
| -619,904,539.936102
| 190,390,454,064.65552
| -1.734533
| -15,701,394,555.1328
|
2019-01-01
| -1,350,051,614.14718
| 189,548,593,096.82245
| -0.780804
| -15,707,643,325.1665
|
2020-01-01
| -1,129,312,783.55399
| 162,137,110,259.9214
| -6.127533
| -17,445,134,687.8103
|
2021-01-01
| -919,756,337.019922
| 182,588,498,523.6672
| 1.654267
| -2,441,125,782.8098
|
2022-01-01
| -155,552,355.31552
| 220,378,411,278.2864
| 1.182383
| 22,612,781,485.8998
|
2023-01-01
| -1,050,427,910.7179
| 244,041,138,304.92752
| 3.84949
| 8,294,855,820.68271
|
2024-01-01
| -1,050,427,910.7179
| 244,041,138,304.92752
| 3.84949
| 8,294,855,820.68271
|
1960-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1961-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1962-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1963-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1964-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1965-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1966-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1967-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1968-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1969-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1970-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1971-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1972-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1973-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1974-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1975-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1976-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1977-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1978-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1979-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1980-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1981-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1982-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1983-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1984-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1985-01-01
| -278,000,000
| 6,684,938,832.809681
| 0.409341
| 388,000,000
|
1986-01-01
| -234,000,000
| 6,684,938,832.809681
| 0.409341
| -211,000,000
|
1987-01-01
| -119,000,000
| 6,684,938,832.809681
| 0.409341
| 689,000,000
|
1988-01-01
| -131,000,000
| 6,684,938,832.809681
| 0.409341
| 114,000,000
|
1989-01-01
| -200,000,000
| 10,027,408,249.21452
| 0.409341
| 651,000,000
|
1990-01-01
| 335,700,000
| 10,027,408,249.21452
| 0.409341
| 606,900,000
|
1991-01-01
| -664,500,000
| 10,603,784,541.19696
| 0.409341
| 434,300,000
|
1992-01-01
| -287,956,000
| 3,498,025,673.089886
| 0.409341
| -54,757,000
|
1993-01-01
| -302,100,000
| 3,237,547,175.395429
| 0.409341
| -18,200,000
|
1994-01-01
| -170,300,000
| 1,943,279,029.734984
| 0.409341
| 149,800,000
|
Master Datacard for Macroeconomics, Trade and Investment Indicators for African Countries
This repository contains time-series datasets for key macroeconomics, trade, and investment indicators for 54 African countries. The data is sourced from The World Bank and has been cleaned, processed, and organized for analysis.
Each country has its own set of files, including a main CSV dataset and a corresponding datacard in Markdown format. The data covers the period from 1960 to 2024, where available.
Repository Structure
The datasets are organized by country. Each country's folder contains:
- A CSV file with the naming convention:
{CountryName}-Macroeconomics_Trade_and_Investment-Indicators-Dataset-{StartYear}-{EndYear}.csv - A detailed datacard named
datacard_Macroeconomics_Trade_and_Investment.md.
Indicators Included
This collection includes the following indicators:
- Foreign direct investment, net (BoP, current US$)
- GNI (current US$)
- GNI per capita growth (annual %)
- Net trade in goods and services (BoP, current US$)
Countries Included
This dataset covers all 54 sovereign nations of Africa as recognized by the source data:
- Algeria
- Angola
- Benin
- Botswana
- Burkina Faso
- Burundi
- Cabo Verde
- Cameroon
- Central African Republic
- Chad
- Comoros
- Congo, Dem. Rep.
- Congo, Rep.
- Cote d'Ivoire
- Djibouti
- Egypt, Arab Rep.
- Equatorial Guinea
- Eritrea
- Eswatini
- Ethiopia
- Gabon
- Gambia, The
- Ghana
- Guinea
- Guinea-Bissau
- Kenya
- Lesotho
- Liberia
- Libya
- Madagascar
- Malawi
- Mali
- Mauritania
- Mauritius
- Morocco
- Mozambique
- Namibia
- Niger
- Nigeria
- Rwanda
- Sao Tome and Principe
- Senegal
- Seychelles
- Sierra Leone
- Somalia
- South Africa
- South Sudan
- Sudan
- Tanzania
- Togo
- Tunisia
- Uganda
- Zambia
- Zimbabwe
Data Preparation
The raw data from The World Bank was processed using a Python script with the following steps:
- Filtering: Data was filtered for each of the 54 African countries.
- Reshaping: Wide-format data (with years as columns) was melted into a long format.
- Merging: All indicator files for a country were merged into a single time-series dataset based on the 'Year' column.
- Cleaning: The 'Year' column was converted to a standard date format (
YYYY-MM-DD). - Missing Data Handling: Gaps in the time-series were filled using linear interpolation followed by a back-fill to ensure data continuity.
How to Use
You can access the data directly through the Hugging Face Hub, either by downloading individual files or by using the datasets library to load the data.
from datasets import load_dataset
# Example: Load the dataset for Nigeria
dataset = load_dataset('electricsheepafrica/Macroeconomics-Trade-and-Investment-Indicators-For-African-Countries', data_files='Nigeria/Nigeria-Macroeconomics_Trade_and_Investment-Indicators-Dataset-1960-2024.csv')
print(dataset)
- Downloads last month
- 9