Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

alisonnanjez/African-Growth-Stories

Domain:

socioeconomic

Record type:

project
Creator:
ali
Host:
# Identifying Clusters of African Nations Based on GDP Growth Trajectories ## What the project does This project applies **unsupervised machine learning** specifically the **K-Means clustering algorithm** to analyze and group African nations based on their GDP growth patterns from **2000 to 2023**. The analysis follows a standard data science pipeline: * **Preprocessing:** Transposing data from wide to long format and scaling features using `StandardScaler` to ensure fair distance calculations. * **Optimization:** Using the **Elbow Method** to determine that 3 clusters provide the most meaningful grouping. * **Clustering:** Categorizing 34 African countries into distinct economic profiles. * **Visualization:** Generating average GDP trend lines and comparative bar plots (displayed in billions of USD) to visualize the trajectory of each cluster. * **Evaluation:** Validating the model's performance using Silhouette, Davies-Bouldin, and Calinski-Harabasz scores. ## Why the project is useful Understanding economic trajectories is vital for regional development. This project is useful because: * **Identifying Peers:** It helps policymakers see which countries share similar economic challenges and successes. * **Economic Benchmarking:** It highlights major regional players (like Nigeria and South Africa) versus steadily growing smaller economies, allowing for better-targeted economic research. * **Data-Driven Insights:** It moves beyond simple geographical grouping to group countries by their actual economic performance over two decades. ## How users can get started with the project To replicate this analysis or explore the data, follow these steps: ### 1. Prerequisites Ensure you have Python installed along with the following libraries: ```bash pip install pandas matplotlib scikit-learn numpy ``` ### 2. Dataset Download the "GDP Growth of African Countries" dataset from Kaggle. ### 3. Running the Analysis 1. Load your data into a DataFrame named `Afric …

Visit

github.com