# Data Sources

This project distinguishes between **real open data** used to ground
the simulation's parameters, and the **simulated sensor-level data**
generated to stand in for the IoT/drone mesh described in the proposal
(which does not yet exist in the field).

## Real, cited open sources

| Parameter | Value used | Source |
|---|---|---|
| Growing-season temperature | 21–24 °C | National Horticulture Board (NHB), India — Apple crop profile, https://nhb.gov.in/report_files/apple/APPLE.htm |
| Annual rainfall requirement | 100–125 cm, evenly distributed | NHB India, same source |
| Soil pH / type | Loamy, pH 5.5–6.5 | NHB India, same source |
| Regional yield benchmark | 11–13 t/ha (J&K, HP) vs 5–6 t/ha (Uttarakhand) | NHB India, same source |
| NPK application ratio | 70:35:70 g/tree/year of age | NHB India, same source |
| Apple-belt districts | Shopian, Anantnag, Pulwama, Baramulla, Kulgam, Ganderbal, Bandipora, Kupwara (J&K); Shimla, Kullu (HP) | SKUAST-K field reporting; Down To Earth, "Half-hour hailstorms, season-long losses" (2026); The Quint, "Climate Change: In Kashmir, Extreme Precipitation is Ruining Apple and Paddy Cultivation" |
| Spring hailstorm/cloudburst intensification | Modeled as elevated storm probability + intensity in Apr–May | Down To Earth (2026); Rising Kashmir, "How Climate Change is Reshaping Kashmir's Fruit Industry" (2025) — pre-harvest fruit drop losses of ₹1,500–3,000 crore, hailstorm damage of 30–70% in affected orchards |
| Cold-storage / CA targets | 0–2 °C, 90–95% RH | Standard postharvest-physiology literature for apple CA/cold storage |
| Postharvest ripeness indices | Firmness (kgf), Brix (%), starch-iodine index (1–10 scale) | Standard Cornell/CTIFL-style postharvest quality assessment methodology |
| Soil / causal-pathway tipping-point thresholds (θ_critical, EC > 2.5 dS/m, NO₃ < 50 ppm, soil temp > 28 °C microbial die-off, root damage > 35 °C) | As stated | Taken directly from the proposal's own Module II / IV specification (itself citing Lobell et al. 2023, Ramesh et al. 2022) |

## What is simulated, and why

The proposal's own architecture (50+ IoT nodes, drone hyperspectral
imaging, molecular biomarker panels) does not exist yet — it is the
subject of the funding request. To build something you can run and
demo *today*, this project:

1. Anchors every regional/agronomic parameter to the real sources above.
2. Uses a **physically-informed simulator** (`python/simulate_data.py`)
   — a soil water-balance model with drying/rewetting hysteresis,
   phenology-driven fruit growth, and storm/pest events tied to real
   seasonal patterns — rather than pure random noise.
3. Runs **genuine ML models** (`python/analytics.py`) on that data:
   a logistic-regression cascading-failure risk score and a
   random-forest ripeness classifier, both trained (not hard-coded)
   on the simulated ground truth.
4. Ships `python/fetch_open_weather.py`, a working Open-Meteo client
   you can point at real dates/locations once you have outbound network
   access, to progressively replace simulated weather with real weather.

## Swapping in real data going forward

- **Weather**: `fetch_open_weather.py` (Open-Meteo, free, no key)
- **Soil properties baseline**: ISRIC SoilGrids REST API (https://rest.isric.org)
- **Satellite vegetation index (NDVI proxy)**: Sentinel Hub / Copernicus Open Access Hub
- **Market prices**: Agmarknet (data.gov.in) for apple mandi prices, useful for
  linking storage/quality decisions to economic outcomes
