# Ethiopia Commodity Price Prediction
An ML-powered web application for predicting commodity prices in Ethiopian markets using historical market data, time-series features, and XGBoost.
## 🚀 Live Demo
**Open Ethiopia Commodity Price Predictor →**
## Features
* Ethiopian commodity price prediction
* Market and product selection
* Time-series feature engineering
* Automatic lag feature generation
* Rolling price statistics
* Price-change features
* XGBoost machine learning model
* FastAPI prediction API
* Single-page frontend interface
* Live deployment on Render
## Overview
This project predicts commodity prices in Ethiopian markets using historical market data and machine learning.
The system uses historical prices to generate time-series features such as:
* Lag 1, 3, 6, and 12 months
* Rolling 3, 6, and 12 month averages
* Price changes over different time periods
* Calendar features such as year, month, and quarter
* Market and geographic information
The trained XGBoost model is exposed through a FastAPI backend and connected to a simple web-based frontend.
## Project Architecture
```text
User
│
▼
Frontend
│
│ Prediction Request
▼
FastAPI API
│
├── Feature Engineering
├── Historical Market Data
└── XGBoost Model
│
▼
Predicted Commodity Price
│
▼
Frontend
```
The application is deployed as a Python web service on Render.
## Repository Structure
```text
commodity-predict/
├── data/
│ ├── raw/
│ └── processed/
├── models/
├── notebooks/
├── src/
│ ├── app.py
│ ├── static/
│ │ └── index.html
│ └── data/
│ ├── __init__.py
│ ├── eda.py
│ ├── evaluate.py
│ ├── feature_engineering.py
│ ├── predict.py
│ ├── train.py
│ └── utils.py
├── requirements.txt
└── README.md
```
## Setup
Clone the repository:
```powershell
git clone
github.com
cd ethiopia-commodity-price-prediction
```
Create a virtual environment:
```powershell
python -m venv .venv …