# Predicting-China-Africa-Trade-Shipment-Delays
International trade profoundly impacts communities, shaping what kinds of work, capital, and goods are accessible. The growing trade relationship between China and Africa presents unique opportunities for development, but supply chain disruptions—particularly shipment delays—can create significant challenges. These disruptions lead to financial losses, inventory shortages, and difficulties in planning for businesses and communities that rely on these flows.
This project investigates a critical question:
**Can we predict shipment delays in the China–Africa trade corridor using trade characteristics such as transport mode, commodity type, shipment value, and route information?**
This is framed as a **binary classification problem**:
- **0 = On-Time**
- **1 = Delayed**
## Introduction
By identifying patterns that signal potential delays, stakeholders could proactively manage risks, optimize logistics planning, and minimize disruptions. My investigation applies machine learning methods to a simulated trade monitoring dataset representing 10,000 China–Africa shipment transactions.
The overarching goal is to understand whether **logistics and financial features alone** can predict shipment delays—or whether other hidden factors (e.g., weather, port congestion, inspections) are more decisive.
## Understanding the Data
The dataset is from Kaggle:
China-Africa Trade Monitoring Dataset
### Key Features
- **Shipment Details:** `shipment_id`, `export_country`, `import_country`, `departure_port`, `arrival_port`
- **Commodities:** `commodity`, `hs_code`, `quantity`
- **Financials:** `declared_value_usd`, `contract_value_usd`, `currency_exchange_rate`, `market_price_per_unit`
- **Logistics:** `transport_mode`, `transit_time_days`, `payment_terms`
- **Targets:** `delay_status` (categorical), later converted into `delay_binary`
### Class Balance
- **On-Time:** ~79%
- **Delayed:** ~21%
- → Dataset is **imbalanced**, which comp …