Crop Price Prediction (Senegal) is an end-to-end machine learning application designed to forecast food prices in Senegal.
# 🌾 Crop Price Prediction (Senegal)
An end-to-end machine learning project to forecast food prices in Senegal. This repository contains the data analysis, model training pipeline, and a production-ready Streamlit web application.
## 📋 Overview
Food price volatility is a critical issue in many developing regions. This project aims to provide transparent and accessible price forecasting for crops in Senegal markets.
The solution consists of:
1. **Data Analysis**: Exploratory Data Analysis (EDA) on WFP market data.
2. **Machine Learning**: A Random Forest Regressor trained to predict crop prices based on location, crop type, and temporal features.
3. **Web Application**: An interactive Streamlit dashboard for real-time predictions.
## ✨ Features
- **Interactive Dashboard**: User-friendly interface to select crops, markets, and dates.
- **Real-time Predictions**: Instant price forecasting in West African CFA Franc (XOF).
- **Uncertainty Quantification**: Displays 95% confidence intervals for every prediction.
- **Model Confidence Score**: Provides a reliability metric based on ensemble variance.
- **Comprehensive Metadata**: Supports various crops (Rice, Maize, Millet, etc.) and regions across Senegal.
## 🚀 Quick Start
### Prerequisites
- Python 3.8+
- pip
### Installation
1. **Clone the repository**
```bash
git clone
github.com
cd crop-price-prediction
```
2. **Install dependencies**
```bash
pip install -r requirements.txt
```
3. **Run the application**
```bash
streamlit run app.py
```
4. **Access the app**
Open your browser to `
localhost`
## 🐳 Docker Usage
Run the application in a containerized environment:
```bash
# Build the image
docker build -t crop-price-app .
# Run the container
docker run -p 8501:8501 crop-price-app
```
## 📂 Project Structure
```
crop-price-prediction/
├── app.py # Main Streamlit application
├── Price_Prediction.ipynb …