Agricultural pricing & profitability tool for Nigerian smallholder farmers. Uses 35 months of NBS commodity price data to surface optimal sell windows, profit ranges, and input cost breakdowns across 5 SW Nigeria crops.
# CropCompass
**Smarter harvest decisions for Nigerian smallholder farmers.**
CropCompass helps farmers in South-West Nigeria answer one question: *when should I sell my harvest to maximise profit?* It uses 35 months of NBS commodity price data to model sell-window profitability, accounting for yield uncertainty, price volatility, farmgate margins, and post-harvest storage — and shows results as a confidence interval range, not a single guess.
> Built as Phase 1 of the AgriProfit AI project.
---
## Live Demo
> Deployment coming soon (Vercel). Link will be added here.
---
## Features
- **Optimal sell-window analysis** — identifies the best and worst months to sell within your harvest and storage window
- **Profit confidence bands** — shows a realistic range (not a point estimate) using statistical error propagation
- **Expected yield display** — surfaces total expected yield in kg/tonnes alongside revenue and profit
- **Fertiliser advisor** — crop-specific NPK recommendations with application schedule and cost estimate
- **Optimal planting advisor** — if you haven't planted yet, recommends the planting month that targets the historically best sell window
- **URL share** — full farm configuration encoded in a shareable link; anyone opening it gets your exact inputs pre-loaded
- **Light / dark mode** — respects OS preference, toggleable in-app
- **Mobile-optimised** — responsive layout for field use on a phone
---
## Crops Supported
| Crop | Growth Window | Data Coverage |
|------|--------------|---------------|
| Cassava | 9–18 months | May 2023 – Mar 2026 |
| Maize | 3–4 months | May 2023 – Mar 2026 |
| Plantain | 9–12 months | May 2023 – Mar 2026 |
| Tomato | 3–4 months | May 2023 – Mar 2026 |
| Yam | 7–9 months | May 2023 – Mar 2026 |
Geographic coverage: **South-West Nigeria broadly** (NBS data does not disaggregate to individual state level at this tier).
---
## How the Model Works
### 1. Price Data & Quality Tiers
Each of the 175 price rows carri …