As a full-stack developer, I thrive on tackling new challenges and bringing ideas to life. I’m always excited to take on projects that push the boundaries of innovation and collaborate with like-minded, creative individuals.

Phone Number

+27 84 866 2418

Email

motaungleon@gmail.com

Linkedin

Leon Motaung

Address

12 Vermeer street, Bellville, Cape Town, 7530

Social

InFoAnalytics – AI-Powered Fiscal Instability Forecasting Dashboard

InFoAnalytics – AI-Powered Fiscal Instability Forecasting Dashboard

Started: 2025-11-29

View on GitHub
Python Pandas NumPy Scikit-learn Gradient Boosting Regressor (GBR) Time Series Cross-Validation (TSCV) Matplotlib Seaborn Plotly Flask HTML CSS Render Hosting Git GitHub StandardScaler OneHotEncoder CSV-based data pipeline VS Code
Project Progress 100%

About this project

InFoAnalytics – AI for Fiscal Instability Prediction

InFoAnalytics: AI for Fiscal Instability Prediction

Author: Leon Motaung

Environment: Python, Pandas, NumPy, Scikit-learn, Flask, Plotly (Dash), XGBoost

Project Overview

InFoAnalytics is an AI-powered macroeconomic dashboard built to forecast fiscal instability across African economies using machine learning. The system predicts Budget Deficit/Surplus trajectory and extracts signals for early intervention to protect SDG funding (especially SDG 3 – Health & SDG 4 – Education).

A Gradient Boosting Regressor trained on grouped long-format time-series data achieved R² = 0.8660 using time-series cross-validation — demonstrating high predictive power for economic instability.

Live Project Access

Dashboard: https://infoanalytics-gqrb.onrender.com/

GitHub Repository: github.com/LeonMotaung/infoanalytics-AI-ML

Main Dashboard View

The landing page presents key fiscal indicators, historical trends, and country selection.

Main Dashboard View

Strategic Insights

The dashboard highlights risk zones and fiscal shifts using statistical trends and forecasting models. This allows policy-makers to react ahead of time and deploy fiscal buffers.

Strategic Insights

Unemployment Trends

Economic indicators such as unemployment, inflation, and government spending are visualized to reveal patterns and correlations across time. These features are also used as ML predictors.

Unemployment Trends

Market Analysis

Market behavior and macroeconomic dependencies are analyzed to isolate key risk drivers and supply-side shocks that influence fiscal stability.

Market Analysis

Machine Learning Approach

  • Grouped time-series data (by Country) to avoid data leakage
  • Lag-based features (1, 3, 6 periods)
  • Rolling means to capture local momentum
  • First-order differencing → solves stationarity
  • Models trained: Gradient Boosting, XGBoost, Random Forest

Core Results

Metric Value Interpretation
0.8660 86.6% variance explained (strong predictions)
RMSE 53,889.33 Error magnitude of predictions

First-order differencing was critical to achieving high accuracy.

Policy Recommendation

Based on ML results, a Fiscal Momentum Buffer (FMB) is proposed:

  • Triggers when deficit trajectory worsens
  • Protects Health & Education budgets first
  • Allows pre-emptive budget allocation

Project Structure

  • notebook.ipynb – Data processing & model training
  • app.py – Flask dashboard (deployment)
  • feature_engineering.py – Custom pipeline
  • models/ – Trained GBR model
  • 1.png–4.png – Dashboard visuals

Conclusion

This project combines machine learning + economics + policy design to create an early-warning system that helps governments protect funding for SDGs during fiscal instability.