Food price prediction and analysis app for Kenya
Food Price Predictor - Kenya 🍽️
Streamlit web app that tracks Kenyan food prices across markets, shows trends, predicts future prices, and gives smart shopping recommendations. Perfect for dealing with those crazy grocery price swings.
🔴 Live Demo:
food-price-predictor-3e5qhn…
✨ What You'll Get
📊 Current Prices - Latest prices by market/food + full history
📈 Price Trends - Interactive charts + monthly patterns
🔮 Price Prediction - Future price forecasts (seasonal trends)
💡 Buying Tips - Buy now/wait advice based on your budget
📥 CSV Export - Download any food/market data
📱 Mobile-friendly - Works everywhere
🏗️ Folder Structure
text
food-price-predictor-kenya/
├── app.py # Main app (this file)
├── wfp_food_prices_ken.csv # REQUIRED data file
│ └── (or put in data/ folder)
├── requirements.txt # Dependencies
└── README.md # You're reading it
🚀 Run It (5 mins)
1. Install Python stuff
bash
pip install streamlit pandas plotly
2. Get the data
Download WFP Kenya food prices CSV → name it wfp_food_prices_ken.csv → put in same folder as app.py
3. Launch
bash
streamlit run app.py
Boom! Opens at
localhost
📦 Full Requirements
text
streamlit>=1.28.0
pandas>=2.0.0
plotly>=5.15.0
Save as requirements.txt or just run the pip command above.
📊 The Data
Source: World Food Programme (WFP) Food Prices Kenya
Needs these CSV columns:
text
date, market, commodity, price, pricetype
2023-01-15, Nairobi, Maize, 65.5, Retail
App auto-finds CSV in root folder or data/ subfolder.
🧭 5 Main Pages
Emoji Page Shows
🏠 Home Stats, top markets/foods, quick overview
📊 See Prices Latest price, avg, history table + CSV download
📈 Trends Line charts, monthly patterns, min/max/volatility
🔮 Predict Pick future date → get predicted price + buy/wait advice
💡 Suggestions Enter budget → "buy now" or "wait" recommendation
🎯 How Predictions Work
Super simple but smart:
Grab all historical prices for tha …