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 โฆ