Data-driven agricultural planning tool for Botswana. Analyses weather and soil data to recommend crops, planting cycles, and paddock rotations across three climate regions.
# ITNA v2.0 — Regional Crop Suitability & Rotation Planning
ITNA is a data-driven agricultural planning tool that analyses historical
weather data to recommend the best crops, planting cycles, and paddock
rotations across Botswana's three distinct climate zones.
## The Three Regions
- **Region A (Hot Semi-Arid / BSh):** The eastern arable heartland (Serowe, Gaborone, Francistown). Supports 12 crops including Sorghum, Millet, and Bambara Groundnut.
- **Region B (Hot Desert / BWh):** The Kalahari southwest (Tsabong, Hukuntsi). Extreme conditions support only 5 ultra-hardy crops.
- **Region C (Tropical Savanna / Aw):** The wetter north (Maun, Kasane). Supports 8 crops including Maize, Tiger Nuts, and Sunflower.
## Features
- **Region-Based Analysis:** Automatically fetches weather and filters crops based on the selected climate zone.
- **14-Crop Database:** Sourced from FAO Ecocrop and ICRISAT, covering Cereals, Pulses, Oilseeds, and Tubers.
- **4 Agricultural Cycles:** Groups recommendations into Summer (Nov-Feb), Autumn (Mar-May), Winter (Jun-Aug), and Spring (Sep-Oct).
- **Paddock Rotation Planning:** Generates a 3-year rotation plan to maintain soil health and prevent nutrient depletion.
- **Drought-Aware Scoring:** Applies dynamic penalties based on each crop's specific drought tolerance rating.
## Usage
### 1. Fetch Weather for a Region
Fetches 365 days of historical data from Open-Meteo for the region's representative coordinates.
python -m src.ingest.weather --region A --year 2025
### 2. Generate Crop & Rotation Report
Scores all viable crops and outputs the best options for each cycle, plus a paddock rotation plan.
python -m src.scoring.score_crops --region A
python -m src.scoring.score_crops --region B
python -m src.scoring.score_crops --region C
## Adding Custom Crops
Edit `data/crop_rules.csv`. The columns are:
`crop_name,crop_category,min_temp,optimal_min,optimal_max,max_temp,drought_tolerance,suitable_regions,source`
Then reload the database: …