File size: 1,742 Bytes
b00e8cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: gpl
language:
- en
tags:
- finance
- Africa
- FDI
size_categories:
- 1K<n<10K
---
# Africa Foreign Direct Investment, Net Inflows (Current US$) Dataset

## Overview
This dataset contains foreign direct investment, net inflows (current us$) data for African countries from the World Bank.

## Data Details
- **Indicator Code**: BX.KLT.DINV.CD.WD
- **Description**: Foreign Direct Investment, Net Inflows (Current US$)
- **Geographic Coverage**: 54 African countries
- **Time Period**: 1970-2024
- **Data Points**: 2,756 observations
- **Coverage**: 78.52% of possible country-year combinations

## File Formats

### Main Dataset (`bx_klt_dinv_cd_wd_africa.csv`)
- **Rows**: 54 countries
- **Columns**: 65 years (1960-2024)
- **Structure**: Countries as rows, years as columns
- **Missing Value Treatment**: Interpolation → Forward Fill → Backward Fill
- **Use Case**: Cross-sectional analysis, heatmaps, correlation analysis

## Data Quality

### Coverage Statistics
- **Total Observations**: 2,756
- **Coverage Rate**: 78.52%
- **Earliest Data**: 1970
- **Latest Data**: 2024

### Countries with No Data
0 countries have no observations:
None

## Usage Examples

### Python
```python
import pandas as pd

# Load main dataset
df = pd.read_csv('bx_klt_dinv_cd_wd_africa.csv', index_col=[0, 1])
```

### R
```r
# Load main dataset
df <- read.csv('bx_klt_dinv_cd_wd_africa.csv', row.names=c(1,2))
```

## Source
World Bank Open Data - Foreign Direct Investment, Net Inflows (Current US$)
- **Original File**: API_BX.KLT.DINV.CD.WD_DS2_en_excel_v2_37552.xls
- **Processed**: 2025-08-18

## License
This dataset is derived from World Bank Open Data and is available under the Creative Commons Attribution 4.0 International License.