krishy commited on
Commit
fa08517
·
1 Parent(s): 328a8ae

Deploy ClimaIQ Kisan app, model weights, and dataset CSV

Browse files
.gitignore ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ .DS_Store
5
+ .env
6
+ .venv/
7
+ venv/
8
+ _hf_clone/
9
+
10
+ # Local-only (not synced to HF Space by sync_hf_space.sh)
11
+ *.docx
12
+ *.ipynb
13
+ word files/
14
+ pdf files/
.streamlit/config.toml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ [theme]
2
+ primaryColor = "#2E7D32"
3
+ backgroundColor = "#F9F6F0"
4
+ secondaryBackgroundColor = "#FFFFFF"
5
+ textColor = "#1f2a20"
6
+ font = "sans-serif"
7
+
8
+ [client]
9
+ showSidebarNavigation = false
Dockerfile DELETED
@@ -1,20 +0,0 @@
1
- FROM python:3.13.5-slim
2
-
3
- WORKDIR /app
4
-
5
- RUN apt-get update && apt-get install -y \
6
- build-essential \
7
- curl \
8
- git \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- COPY requirements.txt ./
12
- COPY src/ ./src/
13
-
14
- RUN pip3 install -r requirements.txt
15
-
16
- EXPOSE 8501
17
-
18
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
19
-
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,19 +1,29 @@
1
  ---
2
- title: Climaiq Kisan
3
- emoji: 🚀
4
- colorFrom: red
5
- colorTo: red
6
- sdk: docker
7
- app_port: 8501
8
- tags:
9
- - streamlit
10
  pinned: false
11
- short_description: Climate-Adjusted Credit Risk Model For Agrticulture Lending
12
  ---
13
 
14
- # Welcome to Streamlit!
15
 
16
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
17
 
18
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
19
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: ClimaIQ Kisan
3
+ emoji: 🌾
4
+ colorFrom: green
5
+ colorTo: gray
6
+ sdk: streamlit
7
+ app_file: app.py
 
 
8
  pinned: false
9
+ license: apache-2.0
10
  ---
11
 
12
+ # ClimaIQ Kisan
13
 
14
+ Climate-adjusted credit scoring for Indian agricultural lending: **Kisan view**, **loan officer** scorecard and PDF-ready report, and **portfolio stress** scenarios. Bilingual (English / Hindi) narratives via **Google Gemma (cloud)** or **local Ollama**.
15
 
16
+ ## Dataset (in this Space)
17
+
18
+ `data/climaiq_india_agricultural_credit_1000.csv` — 1,000 synthetic loans (Maharashtra / Punjab, crops, SPI, rainfall deficit, engineered features, default label, ClimaIQ score and risk band), aligned with the same generator and model as the app.
19
+
20
+ ## Optional secret
21
+
22
+ Add **`GEMMA_API_KEY`** (Google AI Studio) under Space **Settings → Secrets** for cloud Gemma. Without it, open the app and use **Local (Ollama)** only when you run Streamlit on your own machine; the hosted Space still runs the **ClimaIQ model** and charts without the key.
23
+
24
+ ## Local run
25
+
26
+ ```bash
27
+ pip install -r requirements.txt
28
+ streamlit run app.py
29
+ ```
app.py ADDED
@@ -0,0 +1,1189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import html
2
+ import io
3
+ import os
4
+ from typing import Dict, List, Optional, Tuple
5
+
6
+ import numpy as np
7
+ import pandas as pd
8
+ import plotly.express as px
9
+ import plotly.graph_objects as go
10
+ import streamlit as st
11
+
12
+ from climaiq_engine import CROP_WATER_MAP, load_model, predict_single, run_stress_test
13
+ from climaiq_gemma import (
14
+ explain_for_farmer,
15
+ explain_for_officer,
16
+ explain_portfolio_stress,
17
+ get_client,
18
+ ollama_verify_connection,
19
+ )
20
+ from climaiq_report_pdf import build_officer_assessment_pdf, split_report_sections
21
+
22
+
23
+ st.set_page_config(page_title="ClimaIQ Kisan", page_icon="🌾", layout="wide")
24
+
25
+
26
+ COLORS = {
27
+ "primary": "#2E7D32",
28
+ "accent": "#FF8F00",
29
+ "danger": "#C62828",
30
+ "safe": "#1B5E20",
31
+ "bg": "#F9F6F0",
32
+ "ink": "#1f2a20",
33
+ }
34
+
35
+ LANG_TEXT = {
36
+ "English": {
37
+ "app_subtitle": "Climate intelligence for agricultural lending",
38
+ "hero_title": "ClimaIQ Kisan",
39
+ "hero_sub": "One climate-adjusted credit model with three views: farmer, loan officer, and portfolio stress.",
40
+ "tab_kisan_hint": "Enter your details and climate signals, then get a plain-language score and guidance.",
41
+ "tab_officer_hint": "Compact borrower inputs, scorecard, risk drivers, and an AI report for credit decisions.",
42
+ "tab_portfolio_hint": "Simulate a book of loans and compare losses under four drought scenarios.",
43
+ "empty_kisan": "Fill the form on the left, then tap “Know Your Score”. Your gauge, default likelihood, and Gemma explanation appear on the right.",
44
+ "empty_officer": "Open the assessment panel, adjust fields, then run “Run ClimaIQ assessment” to see the scorecard and downloadable report.",
45
+ "empty_portfolio": "Set portfolio parameters, then run the stress test to see scenario losses and default rates.",
46
+ "your_info": "Your information",
47
+ "crop": "Crop Type",
48
+ "state": "State",
49
+ "land": "Land (acres)",
50
+ "income": "Annual Income (₹ Lakhs)",
51
+ "loan": "Loan Amount (₹ Lakhs)",
52
+ "default_hist": "Previous Default?",
53
+ "weather": "Current Climate Condition",
54
+ "rain_def": "Rainfall Deficit (%)",
55
+ "spi": "Drought Severity (SPI)",
56
+ "drought_years": "Consecutive Drought Years",
57
+ "cta": "Know Your Score",
58
+ "score_title": "Your ClimaIQ Score",
59
+ "prob": "Default Probability",
60
+ "actions": "What You Can Do",
61
+ "farmer_expl": "Plain-language summary (Gemma 4)",
62
+ "section_profile": "Profile & loan",
63
+ "section_climate": "This season’s climate",
64
+ "narrative_source_cloud": "This explanation came from Google Gemma in the cloud.",
65
+ "narrative_source_ollama": "This explanation came from Gemma on your computer (Ollama).",
66
+ "ollama_panel_title": "##### Local inference with Ollama",
67
+ "ollama_panel_intro": "Enter the address and model name that your Ollama install uses.",
68
+ "ollama_base_label": "Base URL",
69
+ "ollama_model_label": "Model name",
70
+ "ollama_model_help": "Must match a name from ollama list (e.g. gemma3:4b).",
71
+ "ollama_test_btn": "Test connection",
72
+ "ollama_setup_md": (
73
+ "**Setup**\n\n"
74
+ "1. Keep Ollama running (for example `brew services start ollama` on a Mac, or the Ollama app).\n\n"
75
+ "2. Pull a model, for example **`ollama pull gemma3:4b`**, then type the same name under **Model name**. "
76
+ "For a smaller, faster model, run **`ollama pull gemma2:2b`** and use **`gemma2:2b`**.\n\n"
77
+ "3. Run **`ollama list`** in Terminal. Your model must appear before narratives will work.\n\n"
78
+ "4. Tap **Test connection** below. You should see a green confirmation when Ollama and the model are ready.\n\n"
79
+ "**Demo:** Turn Wi‑Fi on and generate an officer report, then turn Wi‑Fi off. Responses still run on your machine."
80
+ ),
81
+ "sidebar_mode_cloud": "Cloud (Google AI Studio)",
82
+ "sidebar_mode_ollama": "Local (Ollama, offline)",
83
+ "sidebar_gemma_caption": (
84
+ "Cloud suits a Hugging Face Spaces demo well. For Ollama, run ollama serve on your machine, "
85
+ "then you can turn Wi‑Fi off and narratives still run. When Local is on, use the bordered panel under the title for URL and model."
86
+ ),
87
+ "sidebar_gemma_cloud_ok": "Gemma: cloud (Google AI Studio), API key present.",
88
+ "sidebar_gemma_cloud_missing": (
89
+ "Gemma: cloud unavailable (no GEMMA_API_KEY). Use Local (Ollama) for offline narratives, or add a Space secret."
90
+ ),
91
+ "sidebar_gemma_local_verified": "Locally verified. Gemma on Ollama: {model} at {base}.",
92
+ "sidebar_gemma_local_unverified": "Gemma on Ollama: {model} at {base}.",
93
+ "hide_sidebar_label": "Hide side panel",
94
+ "hide_sidebar_help": "Gives charts and reports more horizontal space. Uncheck to open language and Gemma settings again.",
95
+ },
96
+ "Hindi": {
97
+ "app_subtitle": "कृ��ि ऋण के लिए जलवायु आधारित समझ",
98
+ "hero_title": "ClimaIQ Kisan",
99
+ "hero_sub": "एक ही मॉडल, तीन दृष्टि: किसान, ऋण अधिकारी, और पोर्टफोलियो तनाव परीक्षण।",
100
+ "tab_kisan_hint": "अपनी जानकारी और मौसम भरें, फिर स्कोर और सरल सलाह देखें।",
101
+ "tab_officer_hint": "संक्षिप्त फॉर्म, स्कोरकार्ड, जोखिम कारक और AI रिपोर्ट।",
102
+ "tab_portfolio_hint": "ऋणों की संख्या सेट करें और चार सूखा परिदृश्यों में नुकसान की तुलना करें।",
103
+ "empty_kisan": "बाईं ओर फॉर्म भरें, फिर “अपना स्कोर जानें” दबाएँ। दाईं ओर गेज, संभावना और सरल व्याख्या दिखेगी।",
104
+ "empty_officer": "पैनल खोलें, फील्ड बदलें, फिर मूल्यांकन बटन चलाएँ; स्कोरकार्ड और रिपोर्ट नीचे दिखेगी।",
105
+ "empty_portfolio": "पोर्टफोलियो सेट करके स्ट्रेस टेस्ट चलाएँ; परिदृश्य और चार्ट नीचे दिखेंगे।",
106
+ "your_info": "आपकी जानकारी",
107
+ "crop": "फसल",
108
+ "state": "राज्य",
109
+ "land": "ज़मीन (एकड़)",
110
+ "income": "सालाना आय (₹ लाख)",
111
+ "loan": "ऋण राशि (₹ लाख)",
112
+ "default_hist": "पहले डिफ़ॉल्ट?",
113
+ "weather": "इस मौसम का हाल",
114
+ "rain_def": "बारिश की कमी (%)",
115
+ "spi": "सूखा गंभीरता (SPI)",
116
+ "drought_years": "लगातार सूखा साल",
117
+ "cta": "अपना स्कोर जानें",
118
+ "score_title": "आपका ClimaIQ स्कोर",
119
+ "prob": "डिफ़ॉल्ट संभावना",
120
+ "actions": "आप क्या कर सकते हैं",
121
+ "farmer_expl": "सरल भाषा में सारांश (Gemma 4)",
122
+ "section_profile": "प्रोफाइल और ऋण",
123
+ "section_climate": "इस मौसम की स्थिति",
124
+ "narrative_source_cloud": "यह सारांश Google Gemma (क्लाउड) से आया है।",
125
+ "narrative_source_ollama": "यह सारांश आपके कंप्यूटर पर Gemma (Ollama) से आया है।",
126
+ "ollama_panel_title": "##### स्थानीय अनुमान: Ollama कनेक्शन",
127
+ "ollama_panel_intro": "वह पता और मॉडल का नाम भरें जो आपके Ollama में सेट है।",
128
+ "ollama_base_label": "आधार URL",
129
+ "ollama_model_label": "मॉडल का नाम",
130
+ "ollama_model_help": "`ollama list` में दिखा नाम यहाँ लिखें (उदा. gemma3:4b)।",
131
+ "ollama_test_btn": "कनेक्शन जाँचें",
132
+ "ollama_setup_md": (
133
+ "**सेटअप**\n\n"
134
+ "1. Ollama चालू रखें (Mac पर उदा. `brew services start ollama`, या Ollama ऐप)।\n\n"
135
+ "2. मॉडल खींचें, उदा. **`ollama pull gemma3:4b`**, फिर वही नाम **मॉडल का नाम** में लिखें। "
136
+ "छोटा/तेज़ विकल्प: **`ollama pull gemma2:2b`** और फिर **`gemma2:2b`** इस्तेमाल करें।\n\n"
137
+ "3. टर्मिनल में **`ollama list`** चलाएँ; बयान (नैरेटिव) से पहले आपका मॉडल सूची में होना चाहिए।\n\n"
138
+ "4. नीचे **कनेक्शन जाँचें** दबाएँ। Ollama और मॉडल तैयार हों तो हरी पुष्टि दिखेगी।\n\n"
139
+ "**डेमो:** Wi‑Fi चालू कर ऋण अधिकारी रिपोर्ट बनाएँ, फिर Wi‑Fi बंद करें; जवाब फिर भी आपके कंप्यूटर पर चलेगा।"
140
+ ),
141
+ "sidebar_mode_cloud": "क्लाउड (Google AI Studio)",
142
+ "sidebar_mode_ollama": "स्थानीय (Ollama, ऑफ़लाइन)",
143
+ "sidebar_gemma_caption": (
144
+ "क्लाउड Hugging Face Spaces डेमो के लिए अच्छा है। Ollama के लिए अपने कंप्यूटर पर ollama serve चलाएँ, "
145
+ "फिर Wi‑Fi बंद करने पर भी बयान चल सकते हैं। स्थानीय मोड में URL और मॉडल शीर्षक के नीचे वाले बॉक्स में भरें।"
146
+ ),
147
+ "sidebar_gemma_cloud_ok": "Gemma: क्लाउड (Google AI Studio), API कुंजी मिली।",
148
+ "sidebar_gemma_cloud_missing": (
149
+ "Gemma: क्लाउड उपलब्ध नहीं (GEMMA_API_KEY नहीं)। ऑफ़लाइन बयान के लिए स्थानीय (Ollama) चुनें, या Space में रहस्य जोड़ें।"
150
+ ),
151
+ "sidebar_gemma_local_verified": "स्थानीय जाँच सफल। Ollama पर Gemma: {model}, पता {base}।",
152
+ "sidebar_gemma_local_unverified": "Ollama पर Gemma: {model}, पता {base}।",
153
+ "hide_sidebar_label": "साइड पैनल छुपाएँ",
154
+ "hide_sidebar_help": "चार्ट और रिपोर्ट को चौड़ाई मिलेगी। भाषा व Gemma सेटिंग वापस लाने के लिए अनचेक करें।",
155
+ },
156
+ }
157
+
158
+ SPI_LABELS = {
159
+ "English": {0: "Severe Drought", 1: "Moderate Drought", 2: "Normal"},
160
+ "Hindi": {0: "गंभीर सूखा", 1: "मध्यम सूखा", 2: "सामान्य"},
161
+ }
162
+
163
+ DROUGHT_OPTIONS = [0, 1, 2, 3]
164
+ DROUGHT_LABEL = {0: "0", 1: "1", 2: "2", 3: "3+"}
165
+
166
+ def format_gemma_inference_mode(mode: str) -> str:
167
+ """Stable format_func for sidebar mode radio (lambdas here cause extra reruns / double clicks)."""
168
+ lang = st.session_state.get("language", "English")
169
+ if mode == "cloud":
170
+ return LANG_TEXT[lang]["sidebar_mode_cloud"]
171
+ return LANG_TEXT[lang]["sidebar_mode_ollama"]
172
+
173
+
174
+ def format_drought_years(value: int) -> str:
175
+ return DROUGHT_LABEL[value]
176
+
177
+
178
+ OFFICER_UI = {
179
+ "form_title": "Borrower assessment",
180
+ "form_help": "Same ClimaIQ engine as the farmer view. Field labels stay in English for branch and audit use.",
181
+ "expander": "Assessment inputs",
182
+ "run": "Run ClimaIQ assessment",
183
+ "empty": "Adjust inputs in the panel above, then run the assessment. Results persist while you explore other tabs.",
184
+ "scorecard": "Scorecard",
185
+ "lbl_score": "Credit score",
186
+ "lbl_risk": "Risk band",
187
+ "lbl_default": "Default likelihood",
188
+ "risk_drivers": "Top risk drivers",
189
+ "risk_drivers_caption": "Relative contribution to model risk for this profile (longer bar = stronger upward pressure on default likelihood).",
190
+ "ai_report": "AI assessment report",
191
+ "report_lang": "Report language",
192
+ "download": "Download PDF report",
193
+ "download_txt_fallback": "Download narrative (.txt)",
194
+ "micro_caption": "Driver strength at a glance (normalized to the strongest driver in the top three).",
195
+ "pdf_hint": "The PDF includes the scorecard table plus this narrative, ready for credit file notes.",
196
+ "moratorium_note": "If approved, consider a moratorium clause if SPI falls below −1.5 during the loan term.",
197
+ "rec_action": "Recommended action",
198
+ }
199
+
200
+
201
+ def narr_html(body: str) -> str:
202
+ """Escape user/model text for safe insertion inside HTML blocks."""
203
+ return f"<div class='soft-note narr-body'>{html.escape(body)}</div>"
204
+
205
+
206
+ def render_officer_report_ui(report_text: str) -> None:
207
+ """Render Gemma officer narrative with clear section headings (1. … 2. …)."""
208
+ for head, body in split_report_sections(report_text):
209
+ parts = []
210
+ if head:
211
+ parts.append(f"<div class='report-head'>{html.escape(head)}</div>")
212
+ if body:
213
+ parts.append(f"<div class='report-body'>{html.escape(body)}</div>")
214
+ if parts:
215
+ st.markdown(
216
+ "<div class='report-block'>" + "".join(parts) + "</div>",
217
+ unsafe_allow_html=True,
218
+ )
219
+
220
+
221
+ def render_driver_micro_bars(result: Dict) -> None:
222
+ drivers = result.get("top_risk_drivers") or []
223
+ if not drivers:
224
+ return
225
+ dlist = drivers[:3]
226
+ mx = max(abs(float(d["contribution"])) for d in dlist) or 1e-9
227
+ st.caption(OFFICER_UI["micro_caption"])
228
+ for d in dlist:
229
+ pct = min(100, int(100 * abs(float(d["contribution"])) / mx))
230
+ name = html.escape(str(d.get("display_name", "")))
231
+ st.markdown(
232
+ f"<div class='microbar-wrap'><span class='microbar-label'>{name}</span>"
233
+ f"<div class='microbar-track'><div class='microbar-fill' style='width:{pct}%'></div></div></div>",
234
+ unsafe_allow_html=True,
235
+ )
236
+
237
+
238
+ def inject_styles(hide_sidebar: bool = False) -> None:
239
+ sidebar_hide_css = ""
240
+ if hide_sidebar:
241
+ sidebar_hide_css = """
242
+ section[data-testid="stSidebar"] {
243
+ display: none !important;
244
+ }
245
+ [data-testid="stSidebarCollapsedControl"] {
246
+ display: none !important;
247
+ }
248
+ .main .block-container {
249
+ max-width: min(1420px, 98vw) !important;
250
+ padding-left: 1.75rem !important;
251
+ padding-right: 1.75rem !important;
252
+ }
253
+ """
254
+ st.markdown(
255
+ f"""
256
+ <style>
257
+ @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');
258
+ html, body, [class*="css"] {{
259
+ font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
260
+ }}
261
+ .stApp {{
262
+ background: linear-gradient(180deg, #f9f6f0 0%, #f3efe6 100%);
263
+ color: {COLORS["ink"]};
264
+ }}
265
+ .main .block-container {{
266
+ padding-top: 1.25rem;
267
+ padding-bottom: 2.25rem;
268
+ max-width: 1180px;
269
+ }}
270
+ [data-testid="stSidebar"] {{
271
+ background: #123019;
272
+ border-right: 1px solid #204d2b;
273
+ color: #f6fff5;
274
+ }}
275
+ /* Do NOT use sidebar * {{ color }} — it breaks light widgets (white text on white inputs). */
276
+ [data-testid="stSidebar"] h1,
277
+ [data-testid="stSidebar"] h2,
278
+ [data-testid="stSidebar"] h3,
279
+ [data-testid="stSidebar"] p,
280
+ [data-testid="stSidebar"] .stMarkdown,
281
+ [data-testid="stSidebar"] [data-testid="stMarkdownContainer"] p {{
282
+ color: #f6fff5;
283
+ }}
284
+ [data-testid="stSidebar"] [data-testid="stHeading"] {{
285
+ color: #f6fff5;
286
+ }}
287
+ [data-testid="stSidebar"] [data-testid="stCaption"] {{
288
+ color: #c8e6c9 !important;
289
+ }}
290
+ [data-testid="stSidebar"] .stRadio [role="radiogroup"] {{
291
+ gap: 0.35rem;
292
+ align-items: center;
293
+ }}
294
+ [data-testid="stSidebar"] .stRadio label {{
295
+ background: rgba(255,255,255,0.06);
296
+ border-radius: 8px;
297
+ padding: 0.28rem 0.55rem;
298
+ color: #f6fff5 !important;
299
+ cursor: pointer;
300
+ user-select: none;
301
+ }}
302
+ [data-testid="stSidebar"] .stRadio input {{
303
+ cursor: pointer;
304
+ }}
305
+ .main .stRadio [role="radiogroup"] label {{
306
+ cursor: pointer;
307
+ user-select: none;
308
+ }}
309
+ [data-testid="stSidebar"] hr {{
310
+ border-color: rgba(255, 255, 255, 0.18) !important;
311
+ }}
312
+ /* Do not style sidebar text_input / expander via CSS — Streamlit Base Web uses
313
+ scoped rules that beat generic overrides. Ollama fields render in main instead. */
314
+ [data-testid="stSidebar"] code,
315
+ [data-testid="stSidebar"] pre {{
316
+ background: rgba(255, 255, 255, 0.12) !important;
317
+ color: #f4fff6 !important;
318
+ border: 1px solid rgba(255, 255, 255, 0.22);
319
+ padding: 0.12rem 0.4rem;
320
+ border-radius: 6px;
321
+ font-size: 0.88em;
322
+ }}
323
+ .header-wrap {{
324
+ background: linear-gradient(135deg, #ffffff 0%, #f5f8f3 100%);
325
+ border: 1px solid #e1eadf;
326
+ border-radius: 16px;
327
+ padding: 1rem 1.25rem;
328
+ margin-bottom: 1rem;
329
+ }}
330
+ .header-title {{
331
+ font-size: 1.45rem;
332
+ font-weight: 700;
333
+ color: #142818;
334
+ letter-spacing: -0.02em;
335
+ margin-bottom: 0.2rem;
336
+ }}
337
+ .header-sub {{
338
+ color: #4a5c50;
339
+ font-size: 0.98rem;
340
+ line-height: 1.5;
341
+ max-width: 52rem;
342
+ }}
343
+ .tab-hint {{
344
+ color: #5a6d61;
345
+ font-size: 0.9rem;
346
+ line-height: 1.45;
347
+ margin: -0.2rem 0 1rem 0;
348
+ }}
349
+ .panel-title {{
350
+ font-weight: 600;
351
+ font-size: 0.82rem;
352
+ text-transform: uppercase;
353
+ letter-spacing: 0.06em;
354
+ color: #3d5244;
355
+ margin-bottom: 0.5rem;
356
+ }}
357
+ .section-label {{
358
+ font-size: 0.8rem;
359
+ font-weight: 600;
360
+ color: {COLORS["primary"]};
361
+ margin: 0.35rem 0 0.5rem 0;
362
+ }}
363
+ .hero-metric {{
364
+ text-align: center;
365
+ padding: 0.85rem 0.6rem;
366
+ border-radius: 12px;
367
+ background: #ffffff;
368
+ border: 1px solid #e5e8df;
369
+ margin-top: 0.2rem;
370
+ margin-bottom: 0.5rem;
371
+ }}
372
+ .risk-pill {{
373
+ display: inline-block;
374
+ padding: 0.2rem 0.65rem;
375
+ border-radius: 999px;
376
+ font-weight: 700;
377
+ font-size: 0.86rem;
378
+ }}
379
+ .chip-high {{ background: #fde8e8; color: {COLORS["danger"]}; }}
380
+ .chip-medium {{ background: #fff4de; color: {COLORS["accent"]}; }}
381
+ .chip-low {{ background: #e8f5e9; color: {COLORS["safe"]}; }}
382
+ .action-chip {{
383
+ border: 1px solid #e5e8df;
384
+ border-radius: 12px;
385
+ padding: 0.7rem 0.6rem;
386
+ background: #fff;
387
+ min-height: 74px;
388
+ text-align: center;
389
+ font-weight: 600;
390
+ font-size: 0.9rem;
391
+ }}
392
+ .soft-note {{
393
+ background: #ffffff;
394
+ border: 1px solid #e5e8df;
395
+ border-left: 4px solid {COLORS["primary"]};
396
+ border-radius: 12px;
397
+ padding: 0.75rem 1rem;
398
+ margin-bottom: 0.65rem;
399
+ }}
400
+ .narr-body {{
401
+ line-height: 1.58;
402
+ font-size: 0.95rem;
403
+ color: #2a382e;
404
+ white-space: pre-line;
405
+ }}
406
+ .score-tile {{
407
+ background: #fff;
408
+ border: 1px solid #e3e7de;
409
+ border-radius: 12px;
410
+ padding: 0.65rem;
411
+ text-align: center;
412
+ }}
413
+ .score-k {{
414
+ font-size: 0.78rem;
415
+ letter-spacing: 0.04em;
416
+ color: #5e7566;
417
+ margin-bottom: 0.15rem;
418
+ }}
419
+ .score-v {{
420
+ font-size: 1.25rem;
421
+ font-weight: 700;
422
+ color: #203429;
423
+ }}
424
+ .small-muted {{
425
+ color: #6f6f6f;
426
+ font-size: 0.9rem;
427
+ }}
428
+ .stButton > button {{
429
+ border-radius: 10px;
430
+ border: 0;
431
+ font-weight: 600;
432
+ box-shadow: 0 1px 0 rgba(0,0,0,.06);
433
+ }}
434
+ [data-baseweb="tab-list"] button {{
435
+ font-weight: 600;
436
+ font-size: 0.95rem;
437
+ }}
438
+ div[data-testid="stExpander"] summary {{
439
+ font-weight: 600;
440
+ }}
441
+ .report-block {{
442
+ background: #fff;
443
+ border: 1px solid #e3e8e0;
444
+ border-radius: 12px;
445
+ padding: 0.85rem 1rem 0.95rem 1rem;
446
+ margin-bottom: 0.75rem;
447
+ border-left: 4px solid {COLORS["primary"]};
448
+ }}
449
+ .report-head {{
450
+ font-weight: 700;
451
+ font-size: 1rem;
452
+ color: {COLORS["safe"]};
453
+ margin-bottom: 0.45rem;
454
+ padding-bottom: 0.25rem;
455
+ border-bottom: 1px solid #c8e6c9;
456
+ }}
457
+ .report-body {{
458
+ line-height: 1.62;
459
+ font-size: 0.95rem;
460
+ color: #2a382e;
461
+ white-space: pre-line;
462
+ }}
463
+ .microbar-wrap {{ margin-bottom: 0.5rem; }}
464
+ .microbar-label {{
465
+ font-size: 0.8rem;
466
+ color: #3d5244;
467
+ display: block;
468
+ margin-bottom: 3px;
469
+ }}
470
+ .microbar-track {{
471
+ height: 9px;
472
+ background: #e8ebe4;
473
+ border-radius: 99px;
474
+ overflow: hidden;
475
+ }}
476
+ .microbar-fill {{
477
+ height: 100%;
478
+ border-radius: 99px;
479
+ background: linear-gradient(90deg, {COLORS["primary"]}, {COLORS["danger"]});
480
+ }}
481
+ {sidebar_hide_css}
482
+ </style>
483
+ """,
484
+ unsafe_allow_html=True,
485
+ )
486
+
487
+
488
+ def init_state():
489
+ if "model" not in st.session_state or "scaler" not in st.session_state:
490
+ model, scaler = load_model()
491
+ st.session_state.model = model
492
+ st.session_state.scaler = scaler
493
+ if "language" not in st.session_state:
494
+ st.session_state.language = "Hindi"
495
+ if "last_result" not in st.session_state:
496
+ st.session_state.last_result = None
497
+ if "last_officer_result" not in st.session_state:
498
+ st.session_state.last_officer_result = None
499
+ if "last_stress_result" not in st.session_state:
500
+ st.session_state.last_stress_result = None
501
+ if "gemma_inference_mode" not in st.session_state:
502
+ st.session_state.gemma_inference_mode = os.environ.get("GEMMA_INFERENCE_MODE", "cloud")
503
+ if "ollama_base_url" not in st.session_state:
504
+ st.session_state.ollama_base_url = os.environ.get("OLLAMA_BASE_URL", "http://127.0.0.1:11434")
505
+ if "ollama_model" not in st.session_state:
506
+ st.session_state.ollama_model = os.environ.get("OLLAMA_MODEL", "gemma3:4b")
507
+ if "ollama_last_verify_ok" not in st.session_state:
508
+ st.session_state.ollama_last_verify_ok = False
509
+ if "ollama_last_verify_msg" not in st.session_state:
510
+ st.session_state.ollama_last_verify_msg = None
511
+ if "ui_hide_sidebar" not in st.session_state:
512
+ st.session_state.ui_hide_sidebar = False
513
+
514
+
515
+ def _invalidate_gemma_outputs() -> None:
516
+ """Clear cached Gemma strings when switching cloud ↔ Ollama."""
517
+ lr = st.session_state.get("last_result")
518
+ if lr and isinstance(lr, dict) and "explanations" in lr:
519
+ lr["explanations"] = {}
520
+ lr["explanation_sources"] = {}
521
+ lo = st.session_state.get("last_officer_result")
522
+ if lo and isinstance(lo, dict) and "reports" in lo:
523
+ lo["reports"] = {}
524
+ lo["report_sources"] = {}
525
+ ls = st.session_state.get("last_stress_result")
526
+ if ls and isinstance(ls, dict) and "narratives" in ls:
527
+ ls["narratives"] = {}
528
+ ls["narrative_sources"] = {}
529
+ st.session_state.ollama_last_verify_ok = False
530
+ st.session_state.ollama_last_verify_msg = None
531
+
532
+
533
+ def narrative_source_caption(mode: str, label_lang: str) -> str:
534
+ """Short attribution for which Gemma backend produced the visible narrative."""
535
+ if mode == "ollama":
536
+ return LANG_TEXT[label_lang]["narrative_source_ollama"]
537
+ return LANG_TEXT[label_lang]["narrative_source_cloud"]
538
+
539
+
540
+ def get_inference_config() -> Tuple[str, str, str]:
541
+ mode = st.session_state.get("gemma_inference_mode", "cloud")
542
+ base = (st.session_state.get("ollama_base_url") or "http://127.0.0.1:11434").strip().rstrip("/")
543
+ model = (st.session_state.get("ollama_model") or "gemma3:4b").strip()
544
+ return mode, base, model
545
+
546
+
547
+ def render_ollama_connection_main() -> None:
548
+ """
549
+ Ollama URL + model must live in the MAIN area, not the sidebar.
550
+ Streamlit’s Base Web inputs in the dark sidebar inherit unreadable contrast
551
+ no matter how much global CSS we add; scoped widget styles win.
552
+ """
553
+ if st.session_state.get("gemma_inference_mode") != "ollama":
554
+ return
555
+ ui = LANG_TEXT[st.session_state.language]
556
+ with st.container(border=True):
557
+ st.markdown(ui["ollama_panel_title"])
558
+ st.caption(ui["ollama_panel_intro"])
559
+ st.markdown(ui["ollama_setup_md"])
560
+ c1, c2 = st.columns(2)
561
+ with c1:
562
+ st.text_input(ui["ollama_base_label"], key="ollama_base_url")
563
+ with c2:
564
+ st.text_input(
565
+ ui["ollama_model_label"],
566
+ key="ollama_model",
567
+ help=ui["ollama_model_help"],
568
+ )
569
+ btn_col, _ = st.columns([1, 3])
570
+ with btn_col:
571
+ if st.button(ui["ollama_test_btn"], type="secondary", use_container_width=True, key="ollama_test_btn"):
572
+ base = (st.session_state.get("ollama_base_url") or "").strip().rstrip("/")
573
+ model = (st.session_state.get("ollama_model") or "").strip()
574
+ ok, msg = ollama_verify_connection(
575
+ base_url=base or None,
576
+ model=model or None,
577
+ )
578
+ st.session_state.ollama_last_verify_ok = ok
579
+ st.session_state.ollama_last_verify_msg = msg
580
+ msg = st.session_state.get("ollama_last_verify_msg")
581
+ if msg:
582
+ if st.session_state.get("ollama_last_verify_ok"):
583
+ st.success(msg)
584
+ else:
585
+ st.error(msg)
586
+
587
+
588
+ def plotly_theme(fig):
589
+ fig.update_layout(
590
+ plot_bgcolor="rgba(0,0,0,0)",
591
+ paper_bgcolor="rgba(0,0,0,0)",
592
+ font=dict(family="Inter, Segoe UI, sans-serif", color="#24352a"),
593
+ margin=dict(l=12, r=12, t=20, b=20),
594
+ )
595
+ return fig
596
+
597
+
598
+ def get_gemma_client_safe():
599
+ key = os.environ.get("GEMMA_API_KEY")
600
+ if not key:
601
+ return None
602
+ try:
603
+ return get_client(key)
604
+ except Exception:
605
+ return None
606
+
607
+
608
+ def build_farmer_input(prefix: str, compact: bool = False, label_lang: Optional[str] = None) -> Dict:
609
+ lang = label_lang if label_lang is not None else st.session_state.language
610
+ text = LANG_TEXT[lang]
611
+ crops = list(CROP_WATER_MAP.keys())
612
+ states = ["Maharashtra", "Punjab"]
613
+
614
+ if compact:
615
+ c1, c2 = st.columns(2)
616
+ with c1:
617
+ crop = st.selectbox(text["crop"], crops, key=f"{prefix}_crop")
618
+ state = st.selectbox(text["state"], states, key=f"{prefix}_state")
619
+ land = st.slider(text["land"], 0.5, 20.0, 3.5, 0.5, key=f"{prefix}_land")
620
+ income = st.slider(text["income"], 1.0, 15.0, 3.0, 0.5, key=f"{prefix}_income")
621
+ with c2:
622
+ loan = st.slider(text["loan"], 0.5, 8.0, 2.0, 0.1, key=f"{prefix}_loan")
623
+ prev_default = st.radio(
624
+ text["default_hist"], ["No", "Yes"], horizontal=True, key=f"{prefix}_default"
625
+ )
626
+ rain_def = st.slider(text["rain_def"], 0, 60, 20, 1, key=f"{prefix}_rain")
627
+ spi = st.slider(text["spi"], -3.0, 2.0, -1.0, 0.1, key=f"{prefix}_spi")
628
+ drought = st.selectbox(
629
+ text["drought_years"],
630
+ DROUGHT_OPTIONS,
631
+ format_func=format_drought_years,
632
+ key=f"{prefix}_drought",
633
+ )
634
+ else:
635
+ st.markdown(f"<div class='section-label'>{html.escape(text['section_profile'])}</div>", unsafe_allow_html=True)
636
+ crop = st.selectbox(text["crop"], crops, key=f"{prefix}_crop")
637
+ state = st.selectbox(text["state"], states, key=f"{prefix}_state")
638
+ land = st.slider(text["land"], 0.5, 20.0, 3.5, 0.5, key=f"{prefix}_land")
639
+ income = st.slider(text["income"], 1.0, 15.0, 3.0, 0.5, key=f"{prefix}_income")
640
+ loan = st.slider(text["loan"], 0.5, 8.0, 2.0, 0.1, key=f"{prefix}_loan")
641
+ prev_default = st.radio(
642
+ text["default_hist"], ["No", "Yes"], horizontal=True, key=f"{prefix}_default"
643
+ )
644
+ st.markdown("---")
645
+ st.markdown(f"<div class='section-label'>{html.escape(text['section_climate'])}</div>", unsafe_allow_html=True)
646
+ rain_def = st.slider(text["rain_def"], 0, 60, 20, 1, key=f"{prefix}_rain")
647
+ spi = st.slider(text["spi"], -3.0, 2.0, -1.0, 0.1, key=f"{prefix}_spi")
648
+ spi_label_idx = 0 if spi <= -1.5 else 1 if spi <= -0.5 else 2
649
+ st.caption(SPI_LABELS[lang][spi_label_idx])
650
+ drought = st.selectbox(
651
+ text["drought_years"],
652
+ DROUGHT_OPTIONS,
653
+ format_func=format_drought_years,
654
+ key=f"{prefix}_drought",
655
+ )
656
+
657
+ return {
658
+ "age": 42,
659
+ "land_size_acres": land,
660
+ "annual_income_lakhs": income,
661
+ "loan_amount_lakhs": loan,
662
+ "previous_defaults": 1 if prev_default == "Yes" else 0,
663
+ "crop_type": crop,
664
+ "state": state,
665
+ "rainfall_deficit_pct": -float(rain_def),
666
+ "spi": float(spi),
667
+ "consecutive_drought_years": int(drought),
668
+ }
669
+
670
+
671
+ def risk_chip_class(risk_band: str) -> str:
672
+ if "High" in risk_band:
673
+ return "chip-high"
674
+ if "Medium" in risk_band:
675
+ return "chip-medium"
676
+ return "chip-low"
677
+
678
+
679
+ def risk_color_band(risk_band: str) -> str:
680
+ if "High" in risk_band:
681
+ return COLORS["danger"]
682
+ if "Medium" in risk_band:
683
+ return COLORS["accent"]
684
+ return COLORS["safe"]
685
+
686
+
687
+ def build_score_gauge(score: int, risk_band: str):
688
+ color = risk_color_band(risk_band)
689
+ fig = go.Figure(
690
+ go.Indicator(
691
+ mode="gauge+number",
692
+ value=score,
693
+ number={"font": {"size": 44, "color": color}},
694
+ title={"text": "ClimaIQ Score (300-850)", "font": {"size": 15}},
695
+ gauge={
696
+ "axis": {"range": [300, 850], "tickwidth": 1},
697
+ "bar": {"color": color, "thickness": 0.34},
698
+ "steps": [
699
+ {"range": [300, 600], "color": "#fde8e8"},
700
+ {"range": [600, 650], "color": "#fff4de"},
701
+ {"range": [650, 850], "color": "#e7f7ea"},
702
+ ],
703
+ "borderwidth": 0,
704
+ },
705
+ )
706
+ )
707
+ fig.update_layout(height=275)
708
+ return plotly_theme(fig)
709
+
710
+
711
+ def extract_action_cards(text: str, language: str) -> List[str]:
712
+ fallback = (
713
+ ["🌱 Fasal Badlein", "💧 Sinchai Sudharen", "🛡️ Bima Karwain"]
714
+ if language == "Hindi"
715
+ else ["🌱 Shift Crop Mix", "💧 Improve Irrigation", "🛡️ Take Insurance"]
716
+ )
717
+ if not text:
718
+ return fallback
719
+ lines = [ln.strip(" -•\t") for ln in text.splitlines() if ln.strip()]
720
+ picks = [
721
+ ln for ln in lines if any(k in ln.lower() for k in ["insurance", "crop", "irrig", "बीमा", "फसल", "सिंच"])
722
+ ]
723
+ return (picks[:3] if len(picks) >= 3 else fallback)[:3]
724
+
725
+
726
+ def try_farmer_explanation(client, farmer_input, result, language: str) -> str:
727
+ mode, ollama_base, ollama_model = get_inference_config()
728
+ if mode == "ollama":
729
+ try:
730
+ return explain_for_farmer(
731
+ farmer_input,
732
+ result,
733
+ language=language,
734
+ client=None,
735
+ inference_mode="ollama",
736
+ ollama_base=ollama_base,
737
+ ollama_model=ollama_model,
738
+ )
739
+ except Exception as ex:
740
+ return (
741
+ f"Ollama error: {ex}\n\n"
742
+ "Check that `ollama serve` is running and the model is pulled "
743
+ f"(e.g. `ollama pull {ollama_model}`)."
744
+ )
745
+ if client is None:
746
+ return (
747
+ "Cloud mode needs GEMMA_API_KEY (Google AI Studio), or switch sidebar to "
748
+ "Local (Ollama) for offline narratives."
749
+ if language == "English"
750
+ else "क्लाउड मोड के लिए GEMMA_API_KEY चाहिए, या साइडबार में Local (Ollama) चुनें।"
751
+ )
752
+ try:
753
+ return explain_for_farmer(
754
+ farmer_input,
755
+ result,
756
+ language=language,
757
+ client=client,
758
+ inference_mode="cloud",
759
+ )
760
+ except Exception as ex:
761
+ return f"Gemma response unavailable: {ex}"
762
+
763
+
764
+ def render_score_tiles(result):
765
+ u = OFFICER_UI
766
+ c1, c2, c3 = st.columns(3)
767
+ with c1:
768
+ st.markdown(
769
+ f"<div class='score-tile'><div class='score-k'>{html.escape(u['lbl_score'])}</div>"
770
+ f"<div class='score-v'>{result['credit_score']} <span style='font-size:0.75rem;font-weight:500;color:#5e7566'>/ 850</span></div></div>",
771
+ unsafe_allow_html=True,
772
+ )
773
+ with c2:
774
+ st.markdown(
775
+ f"<div class='score-tile'><div class='score-k'>{html.escape(u['lbl_risk'])}</div>"
776
+ f"<div class='score-v'>{html.escape(str(result['risk_band']))}</div></div>",
777
+ unsafe_allow_html=True,
778
+ )
779
+ with c3:
780
+ st.markdown(
781
+ f"<div class='score-tile'><div class='score-k'>{html.escape(u['lbl_default'])}</div>"
782
+ f"<div class='score-v'>{result['default_probability']}%</div></div>",
783
+ unsafe_allow_html=True,
784
+ )
785
+
786
+
787
+ def tab_kisan(client):
788
+ lang = st.session_state.language
789
+ text = LANG_TEXT[lang]
790
+ st.markdown(f"<div class='tab-hint'>{html.escape(text['tab_kisan_hint'])}</div>", unsafe_allow_html=True)
791
+ left, right = st.columns([1.05, 1], gap="large")
792
+
793
+ with left:
794
+ st.markdown(f"<div class='panel-title'>{html.escape(text['your_info'])}</div>", unsafe_allow_html=True)
795
+ with st.container(border=True):
796
+ farmer_input = build_farmer_input("kisan", compact=False)
797
+ run = st.button(text["cta"], type="primary", use_container_width=True)
798
+ if run:
799
+ with st.spinner("Computing your ClimaIQ score…"):
800
+ result = predict_single(farmer_input, st.session_state.model, st.session_state.scaler)
801
+ explanation = try_farmer_explanation(client, farmer_input, result, lang)
802
+ mode_run, _, _ = get_inference_config()
803
+ st.session_state.last_result = {
804
+ "input": farmer_input,
805
+ "result": result,
806
+ "explanations": {lang: explanation},
807
+ "explanation_sources": {lang: mode_run},
808
+ }
809
+ st.success("Done. Your results are on the right.")
810
+
811
+ with right:
812
+ st.markdown(f"<div class='panel-title'>{html.escape(text['score_title'])}</div>", unsafe_allow_html=True)
813
+ if not st.session_state.last_result:
814
+ st.markdown(narr_html(text["empty_kisan"]), unsafe_allow_html=True)
815
+ return
816
+ stored = st.session_state.last_result
817
+ result = stored["result"]
818
+ if lang not in stored["explanations"]:
819
+ with st.spinner("Updating explanation for the selected language…"):
820
+ stored["explanations"][lang] = try_farmer_explanation(client, stored["input"], result, lang)
821
+ stored.setdefault("explanation_sources", {})[lang] = get_inference_config()[0]
822
+ explanation = stored["explanations"][lang]
823
+ expl_mode = stored.get("explanation_sources", {}).get(lang, get_inference_config()[0])
824
+ cards = extract_action_cards(explanation, lang)
825
+
826
+ st.plotly_chart(build_score_gauge(result["credit_score"], result["risk_band"]), use_container_width=True)
827
+ st.markdown(
828
+ f"<div class='hero-metric'><span class='risk-pill {risk_chip_class(result['risk_band'])}'>"
829
+ f"{html.escape(str(result['risk_band']))}</span><br>"
830
+ f"<b>{html.escape(text['prob'])}: {result['default_probability']}%</b></div>",
831
+ unsafe_allow_html=True,
832
+ )
833
+ st.markdown(f"**{text['farmer_expl']}**")
834
+ st.caption(narrative_source_caption(expl_mode, lang))
835
+ st.markdown(narr_html(explanation), unsafe_allow_html=True)
836
+ st.markdown(f"**{text['actions']}**")
837
+ a1, a2, a3 = st.columns(3)
838
+ for col, item in zip([a1, a2, a3], cards):
839
+ with col:
840
+ st.markdown(
841
+ f"<div class='action-chip'>{html.escape(item)}</div>",
842
+ unsafe_allow_html=True,
843
+ )
844
+
845
+
846
+ def tab_officer(client):
847
+ u = OFFICER_UI
848
+ st.markdown(f"<div class='panel-title'>{html.escape(u['form_title'])}</div>", unsafe_allow_html=True)
849
+ st.markdown(f"<div class='tab-hint'>{html.escape(u['form_help'])}</div>", unsafe_allow_html=True)
850
+ with st.expander(u["expander"], expanded=True):
851
+ borrower_input = build_farmer_input("officer", compact=True, label_lang="English")
852
+ run = st.button(u["run"], type="primary", use_container_width=True)
853
+ if run:
854
+ with st.spinner("Running ClimaIQ assessment…"):
855
+ result = predict_single(borrower_input, st.session_state.model, st.session_state.scaler)
856
+ st.session_state.last_officer_result = {
857
+ "input": borrower_input,
858
+ "result": result,
859
+ "reports": {},
860
+ "report_sources": {},
861
+ }
862
+ st.success("Assessment complete. Scorecard is below.")
863
+
864
+ if not st.session_state.last_officer_result:
865
+ st.markdown(narr_html(u["empty"]), unsafe_allow_html=True)
866
+ return
867
+
868
+ stored = st.session_state.last_officer_result
869
+ result = stored["result"]
870
+ st.markdown(f"<div class='panel-title'>{html.escape(u['scorecard'])}</div>", unsafe_allow_html=True)
871
+ render_score_tiles(result)
872
+
873
+ rec = html.escape(str(result["recommended_action"]))
874
+ note = html.escape(u["moratorium_note"])
875
+ st.markdown(
876
+ f"<div class='soft-note narr-body'><b>{html.escape(u['rec_action'])}:</b> {rec}<br><br>{note}</div>",
877
+ unsafe_allow_html=True,
878
+ )
879
+
880
+ st.markdown(f"<div class='panel-title'>{html.escape(u['risk_drivers'])}</div>", unsafe_allow_html=True)
881
+ st.caption(u["risk_drivers_caption"])
882
+ df = pd.DataFrame(result["top_risk_drivers"])
883
+ df["impact"] = df["contribution"].abs()
884
+ df = df.sort_values("impact", ascending=True)
885
+ bar = px.bar(
886
+ df,
887
+ x="impact",
888
+ y="display_name",
889
+ orientation="h",
890
+ color="impact",
891
+ color_continuous_scale=["#2E7D32", "#FF8F00", "#C62828"],
892
+ )
893
+ bar.update_layout(height=295, coloraxis_showscale=False, xaxis_title="Relative impact", yaxis_title="")
894
+ st.plotly_chart(plotly_theme(bar), use_container_width=True)
895
+
896
+ st.markdown(f"<div class='panel-title'>{html.escape(u['ai_report'])}</div>", unsafe_allow_html=True)
897
+ rep_lang = st.radio(u["report_lang"], ["English", "Hindi"], horizontal=True, key="officer_rep_lang")
898
+ if rep_lang not in stored["reports"]:
899
+ mode, ollama_base, ollama_model = get_inference_config()
900
+ if mode == "ollama":
901
+ try:
902
+ with st.spinner("Generating assessment report (Ollama)…"):
903
+ stored["reports"][rep_lang] = explain_for_officer(
904
+ stored["input"],
905
+ result,
906
+ language=rep_lang,
907
+ client=None,
908
+ inference_mode="ollama",
909
+ ollama_base=ollama_base,
910
+ ollama_model=ollama_model,
911
+ )
912
+ except Exception as ex:
913
+ stored["reports"][rep_lang] = (
914
+ f"Ollama error: {ex}\n\nEnsure `ollama serve` is running and "
915
+ f"`ollama pull {ollama_model}` has been run on this machine."
916
+ )
917
+ elif client is None:
918
+ stored["reports"][rep_lang] = (
919
+ "Cloud mode needs a `GEMMA_API_KEY` secret on this Space, or switch the sidebar to "
920
+ "Local (Ollama) for offline AI reports. Scorecard and charts above still work."
921
+ )
922
+ else:
923
+ try:
924
+ with st.spinner("Generating assessment report…"):
925
+ stored["reports"][rep_lang] = explain_for_officer(
926
+ stored["input"],
927
+ result,
928
+ language=rep_lang,
929
+ client=client,
930
+ inference_mode="cloud",
931
+ )
932
+ except Exception as ex:
933
+ stored["reports"][rep_lang] = f"Gemma response unavailable: {ex}"
934
+ stored.setdefault("report_sources", {})[rep_lang] = get_inference_config()[0]
935
+ report_text = stored["reports"][rep_lang]
936
+ rep_mode = stored.get("report_sources", {}).get(rep_lang, get_inference_config()[0])
937
+ st.caption(narrative_source_caption(rep_mode, rep_lang))
938
+ render_driver_micro_bars(result)
939
+ render_officer_report_ui(report_text)
940
+
941
+ st.caption(u["pdf_hint"])
942
+ try:
943
+ pdf_bytes = build_officer_assessment_pdf(report_text, stored["input"], result, rep_lang)
944
+ st.download_button(
945
+ u["download"],
946
+ data=pdf_bytes,
947
+ file_name=f"climaiq_officer_report_{rep_lang.lower()}.pdf",
948
+ mime="application/pdf",
949
+ use_container_width=True,
950
+ )
951
+ except Exception as ex:
952
+ st.warning(
953
+ f"PDF build failed ({ex}). First run may need network access to cache fonts; try again, or use the text fallback."
954
+ )
955
+ st.download_button(
956
+ u["download_txt_fallback"],
957
+ data=io.BytesIO(report_text.encode("utf-8")),
958
+ file_name=f"climaiq_officer_report_{rep_lang.lower()}.txt",
959
+ mime="text/plain",
960
+ use_container_width=True,
961
+ )
962
+
963
+
964
+ def build_portfolio(n_loans: int, avg_loan: float, dominant_crop: str):
965
+ crops = list(CROP_WATER_MAP.keys())
966
+ probs_map = {
967
+ "Cotton": [0.5 if c == "Cotton" else 0.5 / (len(crops) - 1) for c in crops],
968
+ "Rice": [0.5 if c == "Rice" else 0.5 / (len(crops) - 1) for c in crops],
969
+ "Wheat": [0.5 if c == "Wheat" else 0.5 / (len(crops) - 1) for c in crops],
970
+ "Mixed": [1 / len(crops)] * len(crops),
971
+ }
972
+ crop_probs = probs_map[dominant_crop]
973
+ portfolio = []
974
+ for _ in range(n_loans):
975
+ crop = np.random.choice(crops, p=crop_probs)
976
+ portfolio.append(
977
+ {
978
+ "age": int(np.random.randint(28, 62)),
979
+ "land_size_acres": round(np.random.uniform(1, 10), 2),
980
+ "annual_income_lakhs": round(np.random.uniform(1.5, 10), 2),
981
+ "loan_amount_lakhs": round(max(0.5, np.random.normal(avg_loan, 0.6)), 2),
982
+ "previous_defaults": int(np.random.choice([0, 1], p=[0.82, 0.18])),
983
+ "crop_type": crop,
984
+ "state": str(np.random.choice(["Maharashtra", "Punjab"], p=[0.6, 0.4])),
985
+ "rainfall_deficit_pct": 0.0,
986
+ "spi": 0.0,
987
+ "consecutive_drought_years": 0,
988
+ }
989
+ )
990
+ return portfolio
991
+
992
+
993
+ def tab_portfolio(client):
994
+ lang = st.session_state.language
995
+ text = LANG_TEXT[lang]
996
+ st.markdown(f"<div class='tab-hint'>{html.escape(text['tab_portfolio_hint'])}</div>", unsafe_allow_html=True)
997
+ st.markdown("<div class='panel-title'>Portfolio configuration</div>", unsafe_allow_html=True)
998
+ with st.container(border=True):
999
+ c1, c2, c3 = st.columns(3)
1000
+ with c1:
1001
+ n_loans = st.number_input("Number of loans to simulate", min_value=20, max_value=2000, value=100)
1002
+ with c2:
1003
+ avg_loan = st.number_input("Average loan size (₹ lakhs)", min_value=0.5, max_value=8.0, value=3.0, step=0.1)
1004
+ with c3:
1005
+ recovery_rate = st.slider("Recovery rate (%)", 0, 80, 30, 1)
1006
+ dominant_crop = st.radio(
1007
+ "Dominant crop in portfolio",
1008
+ ["Cotton", "Rice", "Wheat", "Mixed"],
1009
+ horizontal=True,
1010
+ key="portfolio_dominant_crop",
1011
+ )
1012
+ run = st.button("Run stress test", type="primary", use_container_width=True)
1013
+
1014
+ if run:
1015
+ with st.spinner("Simulating portfolio across climate scenarios…"):
1016
+ portfolio = build_portfolio(int(n_loans), float(avg_loan), dominant_crop)
1017
+ stress = run_stress_test(st.session_state.model, st.session_state.scaler, portfolio)
1018
+ rr = recovery_rate / 100
1019
+ for row in stress:
1020
+ row["total_loss_lakhs"] = round(row["avg_default_pct"] / 100 * avg_loan * (1 - rr) * n_loans, 2)
1021
+ st.session_state.last_stress_result = {"stress": stress, "narratives": {}, "narrative_sources": {}}
1022
+ st.success("Stress test complete. Charts are below.")
1023
+
1024
+ if not st.session_state.last_stress_result:
1025
+ st.markdown(narr_html(text["empty_portfolio"]), unsafe_allow_html=True)
1026
+ return
1027
+
1028
+ stress = st.session_state.last_stress_result["stress"]
1029
+ df = pd.DataFrame(stress)
1030
+ order = ["Normal Monsoon", "Moderate Drought", "Severe Drought", "Back-to-Back Drought"]
1031
+ df["scenario"] = pd.Categorical(df["scenario"], order, ordered=True)
1032
+ df = df.sort_values("scenario")
1033
+
1034
+ st.markdown("<div class='panel-title'>Estimated loss by scenario (₹ lakhs)</div>", unsafe_allow_html=True)
1035
+ st.caption(
1036
+ "Illustrative portfolio simulation: loss scales with count of loans, average ticket, recovery rate, and modelled default rates."
1037
+ )
1038
+ bar = px.bar(
1039
+ df,
1040
+ x="total_loss_lakhs",
1041
+ y="scenario",
1042
+ orientation="h",
1043
+ text="total_loss_lakhs",
1044
+ color="scenario",
1045
+ color_discrete_map={
1046
+ "Normal Monsoon": "#2E7D32",
1047
+ "Moderate Drought": "#FFB300",
1048
+ "Severe Drought": "#E53935",
1049
+ "Back-to-Back Drought": "#7F0000",
1050
+ },
1051
+ )
1052
+ bar.update_layout(showlegend=False, yaxis_title="", xaxis_title="Estimated loss (₹ lakhs)", height=330)
1053
+ st.plotly_chart(plotly_theme(bar), use_container_width=True)
1054
+
1055
+ st.markdown("<div class='panel-title'>Average default rate by scenario</div>", unsafe_allow_html=True)
1056
+ st.caption("The step up from “normal” to stressed monsoons shows how climate shocks can move the book non-linearly.")
1057
+ line = px.line(df, x="scenario", y="avg_default_pct", markers=True, color_discrete_sequence=[COLORS["danger"]])
1058
+ line.update_layout(yaxis_title="Portfolio average default (%)", xaxis_title="", height=300)
1059
+ st.plotly_chart(plotly_theme(line), use_container_width=True)
1060
+
1061
+ st.markdown("<div class='panel-title'>Portfolio risk narrative</div>", unsafe_allow_html=True)
1062
+ rep_lang = st.radio("Narrative language", ["English", "Hindi"], horizontal=True, key="port_lang")
1063
+ narratives = st.session_state.last_stress_result["narratives"]
1064
+ if rep_lang not in narratives:
1065
+ mode, ollama_base, ollama_model = get_inference_config()
1066
+ if mode == "ollama":
1067
+ try:
1068
+ with st.spinner("Drafting portfolio narrative (Ollama)…"):
1069
+ narratives[rep_lang] = explain_portfolio_stress(
1070
+ stress,
1071
+ language=rep_lang,
1072
+ client=None,
1073
+ inference_mode="ollama",
1074
+ ollama_base=ollama_base,
1075
+ ollama_model=ollama_model,
1076
+ )
1077
+ except Exception as ex:
1078
+ narratives[rep_lang] = f"Ollama error: {ex}"
1079
+ elif client is None:
1080
+ narratives[rep_lang] = (
1081
+ "Set `GEMMA_API_KEY` for cloud narratives, or use Local (Ollama) in the sidebar. "
1082
+ "Figures above are already computed from your ClimaIQ engine."
1083
+ )
1084
+ else:
1085
+ try:
1086
+ with st.spinner("Drafting portfolio narrative…"):
1087
+ narratives[rep_lang] = explain_portfolio_stress(
1088
+ stress, language=rep_lang, client=client, inference_mode="cloud"
1089
+ )
1090
+ except Exception as ex:
1091
+ narratives[rep_lang] = f"Gemma response unavailable: {ex}"
1092
+ st.session_state.last_stress_result.setdefault("narrative_sources", {})[rep_lang] = get_inference_config()[0]
1093
+ narr_mode = st.session_state.last_stress_result.get("narrative_sources", {}).get(
1094
+ rep_lang, get_inference_config()[0]
1095
+ )
1096
+ st.caption(narrative_source_caption(narr_mode, rep_lang))
1097
+ st.markdown(narr_html(narratives[rep_lang]), unsafe_allow_html=True)
1098
+
1099
+ normal_loss = float(df[df["scenario"] == "Normal Monsoon"]["total_loss_lakhs"].iloc[0])
1100
+ worst_loss = float(df["total_loss_lakhs"].max())
1101
+ gap = round(worst_loss - normal_loss, 2)
1102
+ buf = int(gap // 100 * 100)
1103
+ cap_lines = (
1104
+ f"<b>Capital buffer indicator</b><br><br>"
1105
+ f"Baseline (normal monsoon) loss estimate: ₹{normal_loss} lakhs<br>"
1106
+ f"Incremental stress to worst scenario shown: ₹{gap} lakhs<br>"
1107
+ f"Rule-of-thumb buffer to discuss with risk: ₹{buf} lakhs+"
1108
+ )
1109
+ st.markdown(f"<div class='soft-note narr-body'>{cap_lines}</div>", unsafe_allow_html=True)
1110
+
1111
+
1112
+ def main():
1113
+ init_state()
1114
+ inject_styles(hide_sidebar=bool(st.session_state.get("ui_hide_sidebar", False)))
1115
+ client = get_gemma_client_safe()
1116
+ text = LANG_TEXT[st.session_state.language]
1117
+ _, layout_toggle = st.columns([5.5, 1.5])
1118
+ with layout_toggle:
1119
+ st.checkbox(
1120
+ text["hide_sidebar_label"],
1121
+ key="ui_hide_sidebar",
1122
+ help=text["hide_sidebar_help"],
1123
+ )
1124
+
1125
+ with st.sidebar:
1126
+ st.markdown("## ClimaIQ Kisan")
1127
+ st.markdown(
1128
+ f"<div class='small-muted' style='color:#c8e6c9;line-height:1.45'>{html.escape(text['app_subtitle'])}</div>",
1129
+ unsafe_allow_html=True,
1130
+ )
1131
+ st.divider()
1132
+ st.markdown("### Language / भाषा")
1133
+ st.radio(
1134
+ "Display language",
1135
+ ["English", "Hindi"],
1136
+ horizontal=True,
1137
+ label_visibility="collapsed",
1138
+ key="language",
1139
+ )
1140
+ text = LANG_TEXT[st.session_state.language]
1141
+ st.caption("Applies to farmer-facing labels and Gemma prompts tied to that view.")
1142
+ st.divider()
1143
+ st.markdown("### Gemma inference")
1144
+ st.radio(
1145
+ "Mode",
1146
+ ["cloud", "ollama"],
1147
+ format_func=format_gemma_inference_mode,
1148
+ key="gemma_inference_mode",
1149
+ on_change=_invalidate_gemma_outputs,
1150
+ )
1151
+ st.caption(text["sidebar_gemma_caption"])
1152
+ st.divider()
1153
+ mode_now = st.session_state.get("gemma_inference_mode", "cloud")
1154
+ if mode_now == "ollama":
1155
+ ok_local = st.session_state.get("ollama_last_verify_ok")
1156
+ model = st.session_state.get("ollama_model", "")
1157
+ base = st.session_state.get("ollama_base_url", "")
1158
+ if ok_local:
1159
+ st.caption(text["sidebar_gemma_local_verified"].format(model=model, base=base))
1160
+ else:
1161
+ st.caption(text["sidebar_gemma_local_unverified"].format(model=model, base=base))
1162
+ elif client is not None:
1163
+ st.caption(text["sidebar_gemma_cloud_ok"])
1164
+ else:
1165
+ st.caption(text["sidebar_gemma_cloud_missing"])
1166
+ st.divider()
1167
+ st.markdown("### About")
1168
+ st.caption("ClimaIQ engine + Gemma 4 explanations.")
1169
+ st.caption("Model AUC (hold-out): 0.804")
1170
+
1171
+ text = LANG_TEXT[st.session_state.language]
1172
+ st.markdown(
1173
+ f"<div class='header-wrap'><div class='header-title'>{html.escape(text['hero_title'])}</div>"
1174
+ f"<div class='header-sub'>{html.escape(text['hero_sub'])}</div></div>",
1175
+ unsafe_allow_html=True,
1176
+ )
1177
+ render_ollama_connection_main()
1178
+ tab1, tab2, tab3 = st.tabs(["Kisan view", "Loan officer view", "Portfolio stress test"])
1179
+
1180
+ with tab1:
1181
+ tab_kisan(client)
1182
+ with tab2:
1183
+ tab_officer(client)
1184
+ with tab3:
1185
+ tab_portfolio(client)
1186
+
1187
+
1188
+ if __name__ == "__main__":
1189
+ main()
climaiq_engine.py ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ClimaIQ Engine — Climate-Adjusted Credit Risk Model
3
+ Core prediction module for ClimaIQ Kisan
4
+ Author: Krishna Dahale
5
+ """
6
+
7
+ import numpy as np
8
+ import pandas as pd
9
+ from sklearn.model_selection import train_test_split
10
+ from sklearn.preprocessing import StandardScaler
11
+ from sklearn.linear_model import LogisticRegression
12
+ import joblib
13
+ import os
14
+ import warnings
15
+ warnings.filterwarnings("ignore")
16
+
17
+ # ─── Feature Definitions ───────────────────────────────────────────────────────
18
+
19
+ TRADITIONAL_FEATURES = [
20
+ "Age", "Land_Size_Acres", "Annual_Income_Lakhs",
21
+ "Loan_Amount_Lakhs", "Debt_to_Income_Ratio",
22
+ "Previous_Defaults", "Land_Productivity"
23
+ ]
24
+
25
+ CLIMATE_FEATURES = [
26
+ "Rainfall_Deficit_Pct", "SPI", "Consecutive_Drought_Years"
27
+ ]
28
+
29
+ ENHANCED_FEATURES = [
30
+ "State_Maharashtra", "Crop_Water_Intensive", "Crop_Drought_Interaction"
31
+ ]
32
+
33
+ ALL_FEATURES = TRADITIONAL_FEATURES + CLIMATE_FEATURES + ENHANCED_FEATURES
34
+
35
+ CROP_WATER_MAP = {
36
+ "Rice": 1.0,
37
+ "Sugarcane": 1.0,
38
+ "Cotton": 0.5,
39
+ "Wheat": 0.2,
40
+ "Millets": 0.0
41
+ }
42
+
43
+ FEATURE_DISPLAY_NAMES = {
44
+ "Crop_Drought_Interaction": "Crop × Drought Severity",
45
+ "Rainfall_Deficit_Pct": "Rainfall Deficit",
46
+ "SPI": "Drought Severity (SPI)",
47
+ "Consecutive_Drought_Years": "Consecutive Drought Years",
48
+ "Previous_Defaults": "Previous Default History",
49
+ "Debt_to_Income_Ratio": "Debt-to-Income Ratio",
50
+ "State_Maharashtra": "Geographic Risk (Maharashtra)",
51
+ "Crop_Water_Intensive": "Crop Water Dependency",
52
+ "Annual_Income_Lakhs": "Annual Income",
53
+ "Loan_Amount_Lakhs": "Loan Amount",
54
+ "Land_Size_Acres": "Land Size",
55
+ "Age": "Borrower Age",
56
+ "Land_Productivity": "Land Productivity"
57
+ }
58
+
59
+ # ─── Data Generation ───────────────────────────────────────────────────────────
60
+
61
+ def generate_training_data(n_loans=5000, seed=42):
62
+ """Generate synthetic agricultural loan dataset."""
63
+ np.random.seed(seed)
64
+
65
+ df = pd.DataFrame({
66
+ "Loan_ID": range(1, n_loans + 1),
67
+ "State": np.random.choice(["Maharashtra", "Punjab"], n_loans, p=[0.6, 0.4]),
68
+ "Age": np.random.normal(45, 12, n_loans).clip(25, 70),
69
+ "Land_Size_Acres": np.random.exponential(3, n_loans).clip(0.5, 20),
70
+ "Annual_Income_Lakhs": np.random.lognormal(2.5, 0.8, n_loans).clip(1, 15),
71
+ "Loan_Amount_Lakhs": np.random.uniform(0.5, 8, n_loans),
72
+ "Previous_Defaults": np.random.choice([0, 1], n_loans, p=[0.85, 0.15]),
73
+ "Crop_Type": np.random.choice(
74
+ ["Rice", "Cotton", "Wheat", "Sugarcane", "Millets"],
75
+ n_loans,
76
+ p=[0.25, 0.20, 0.25, 0.15, 0.15],
77
+ ),
78
+ })
79
+
80
+ df["Rainfall_Deficit_Pct"] = np.random.normal(-12, 15, n_loans).clip(-60, 20)
81
+ df["SPI"] = np.random.normal(-0.3, 1.0, n_loans).clip(-3, 2)
82
+ df["Consecutive_Drought_Years"] = np.random.choice([0, 1, 2, 3], n_loans, p=[0.5, 0.3, 0.15, 0.05])
83
+ df["Debt_to_Income_Ratio"] = df["Loan_Amount_Lakhs"] / df["Annual_Income_Lakhs"]
84
+ df["Land_Productivity"] = df["Annual_Income_Lakhs"] / df["Land_Size_Acres"]
85
+
86
+ def generate_default(row):
87
+ p = 0.08
88
+ if row["Previous_Defaults"] == 1: p *= 4
89
+ if row["Debt_to_Income_Ratio"] > 0.5: p *= 2
90
+ elif row["Debt_to_Income_Ratio"] > 0.3: p *= 1.5
91
+ if row["Rainfall_Deficit_Pct"] < -25: p *= 2.5
92
+ elif row["Rainfall_Deficit_Pct"] < -10: p *= 1.4
93
+ if row["SPI"] < -1.5: p *= 2
94
+ elif row["SPI"] < -1.0: p *= 1.3
95
+ if row["Consecutive_Drought_Years"] >= 2: p *= 2.5
96
+ if row["Crop_Type"] in ["Rice", "Sugarcane"] and row["Rainfall_Deficit_Pct"] < -15: p *= 1.6
97
+ if row["Age"] < 30 or row["Age"] > 60: p *= 1.2
98
+ if row["State"] == "Maharashtra": p *= 1.3
99
+ return 1 if np.random.rand() < min(p, 0.95) else 0
100
+
101
+ df["Default"] = df.apply(generate_default, axis=1)
102
+
103
+ # Feature engineering
104
+ df["State_Maharashtra"] = (df["State"] == "Maharashtra").astype(int)
105
+ df["Crop_Water_Intensive"] = df["Crop_Type"].map(CROP_WATER_MAP)
106
+ df["Crop_Drought_Interaction"] = (
107
+ df["Crop_Water_Intensive"] * df["Rainfall_Deficit_Pct"].clip(upper=0).abs()
108
+ )
109
+
110
+ return df
111
+
112
+
113
+ # ─── Model Training ────────────────────────────────────────────────────────────
114
+
115
+ def train_model():
116
+ """Train the climate-adjusted credit risk model. Returns model and scaler."""
117
+ df = generate_training_data()
118
+
119
+ X = df[ALL_FEATURES]
120
+ y = df["Default"]
121
+
122
+ X_train, _, y_train, _ = train_test_split(
123
+ X, y, test_size=0.3, stratify=y, random_state=42
124
+ )
125
+
126
+ scaler = StandardScaler()
127
+ X_train_scaled = scaler.fit_transform(X_train)
128
+
129
+ model = LogisticRegression(max_iter=1000, class_weight="balanced")
130
+ model.fit(X_train_scaled, y_train)
131
+
132
+ return model, scaler
133
+
134
+
135
+ # ─── Save / Load ───────────────────────────────────────────────────────────────
136
+
137
+ def save_model(model, scaler, model_path="climaiq_model.pkl", scaler_path="climaiq_scaler.pkl"):
138
+ joblib.dump(model, model_path)
139
+ joblib.dump(scaler, scaler_path)
140
+
141
+
142
+ def load_model(model_path="climaiq_model.pkl", scaler_path="climaiq_scaler.pkl"):
143
+ """Load saved model and scaler. Trains fresh if files not found."""
144
+ if os.path.exists(model_path) and os.path.exists(scaler_path):
145
+ model = joblib.load(model_path)
146
+ scaler = joblib.load(scaler_path)
147
+ else:
148
+ model, scaler = train_model()
149
+ save_model(model, scaler, model_path, scaler_path)
150
+ return model, scaler
151
+
152
+
153
+ # ─── Feature Engineering for Single Input ─────────────────────────────────────
154
+
155
+ def engineer_single_input(data: dict) -> pd.DataFrame:
156
+ """
157
+ Convert raw farmer input dict into model-ready feature DataFrame.
158
+
159
+ Expected keys:
160
+ age, land_size_acres, annual_income_lakhs, loan_amount_lakhs,
161
+ previous_defaults, crop_type, state,
162
+ rainfall_deficit_pct, spi, consecutive_drought_years
163
+ """
164
+ debt_to_income = data["loan_amount_lakhs"] / data["annual_income_lakhs"]
165
+ land_productivity = data["annual_income_lakhs"] / data["land_size_acres"]
166
+ state_mh = 1 if data["state"] == "Maharashtra" else 0
167
+ crop_water = CROP_WATER_MAP.get(data["crop_type"], 0.5)
168
+ crop_drought = crop_water * abs(min(data["rainfall_deficit_pct"], 0))
169
+
170
+ features = {
171
+ "Age": data["age"],
172
+ "Land_Size_Acres": data["land_size_acres"],
173
+ "Annual_Income_Lakhs": data["annual_income_lakhs"],
174
+ "Loan_Amount_Lakhs": data["loan_amount_lakhs"],
175
+ "Debt_to_Income_Ratio": debt_to_income,
176
+ "Previous_Defaults": data["previous_defaults"],
177
+ "Land_Productivity": land_productivity,
178
+ "Rainfall_Deficit_Pct": data["rainfall_deficit_pct"],
179
+ "SPI": data["spi"],
180
+ "Consecutive_Drought_Years": data["consecutive_drought_years"],
181
+ "State_Maharashtra": state_mh,
182
+ "Crop_Water_Intensive": crop_water,
183
+ "Crop_Drought_Interaction": crop_drought,
184
+ }
185
+
186
+ return pd.DataFrame([features])[ALL_FEATURES]
187
+
188
+
189
+ # ─── Credit Score Calculation ──────────────────────────────────────────────────
190
+
191
+ def compute_credit_score(model, scaler, feature_row: pd.DataFrame,
192
+ base_score=650, pdo=50) -> int:
193
+ """Convert default probability into 300–850 credit score."""
194
+ coef = model.coef_[0]
195
+ factor = pdo / np.log(2)
196
+ offset = base_score - factor * np.log(20)
197
+
198
+ z = scaler.transform(feature_row)[0]
199
+ score = offset + np.sum(z * (-factor * coef))
200
+ return int(np.clip(score, 300, 850))
201
+
202
+
203
+ def get_risk_band(score: int) -> str:
204
+ if score >= 700:
205
+ return "Very Low Risk"
206
+ elif score >= 650:
207
+ return "Low Risk"
208
+ elif score >= 600:
209
+ return "Medium Risk"
210
+ else:
211
+ return "High Risk"
212
+
213
+
214
+ # ─── Risk Driver Extraction ────────────────────────────────────────────────────
215
+
216
+ def get_top_risk_drivers(model, scaler, feature_row: pd.DataFrame, top_n=3) -> list:
217
+ """
218
+ Return the top N features driving default risk for this borrower.
219
+ Each driver is a dict: {feature, display_name, contribution, direction}
220
+ """
221
+ z = scaler.transform(feature_row)[0]
222
+ coef = model.coef_[0]
223
+
224
+ # Contribution = standardized value × coefficient
225
+ # Positive contribution = increases default probability = increases risk
226
+ contributions = z * coef
227
+
228
+ driver_df = pd.DataFrame({
229
+ "feature": ALL_FEATURES,
230
+ "contribution": contributions
231
+ }).sort_values("contribution", ascending=False)
232
+
233
+ # Top risk-increasing drivers only
234
+ top_drivers = driver_df.head(top_n)
235
+
236
+ result = []
237
+ for _, row in top_drivers.iterrows():
238
+ result.append({
239
+ "feature": row["feature"],
240
+ "display_name": FEATURE_DISPLAY_NAMES.get(row["feature"], row["feature"]),
241
+ "contribution": round(row["contribution"], 4),
242
+ "direction": "increases risk" if row["contribution"] > 0 else "reduces risk"
243
+ })
244
+
245
+ return result
246
+
247
+
248
+ # ─── Main Prediction Function ──────────────────────────────────────────────────
249
+
250
+ def predict_single(data: dict, model, scaler) -> dict:
251
+ """
252
+ Full prediction pipeline for a single farmer/borrower.
253
+
254
+ Returns:
255
+ default_probability : float (0–100)
256
+ credit_score : int (300–850)
257
+ risk_band : str
258
+ top_risk_drivers : list of dicts
259
+ recommended_action : str
260
+ """
261
+ feature_row = engineer_single_input(data)
262
+
263
+ scaled = scaler.transform(feature_row)
264
+ default_prob = model.predict_proba(scaled)[0][1] * 100
265
+
266
+ credit_score = compute_credit_score(model, scaler, feature_row)
267
+ risk_band = get_risk_band(credit_score)
268
+ top_drivers = get_top_risk_drivers(model, scaler, feature_row)
269
+
270
+ # Recommended action based on risk band
271
+ action_map = {
272
+ "Very Low Risk": "Auto-Approve",
273
+ "Low Risk": "Approve",
274
+ "Medium Risk": "Manual Review",
275
+ "High Risk": "Decline or Offer Climate-Linked Premium Rate"
276
+ }
277
+
278
+ return {
279
+ "default_probability": round(default_prob, 2),
280
+ "credit_score": credit_score,
281
+ "risk_band": risk_band,
282
+ "top_risk_drivers": top_drivers,
283
+ "recommended_action": action_map[risk_band]
284
+ }
285
+
286
+
287
+ # ─── Stress Test ───────────────────────────────────────────────────────────────
288
+
289
+ def run_stress_test(model, scaler, base_portfolio: list) -> list:
290
+ """
291
+ Run 4 climate scenarios across a list of farmer input dicts.
292
+ Returns list of scenario result dicts.
293
+ """
294
+ scenarios = {
295
+ "Normal Monsoon": {"rainfall_deficit_pct": 0, "spi": 0, "consecutive_drought_years": 0},
296
+ "Moderate Drought": {"rainfall_deficit_pct": -20, "spi": -1.2, "consecutive_drought_years": 1},
297
+ "Severe Drought": {"rainfall_deficit_pct": -35, "spi": -1.8, "consecutive_drought_years": 1},
298
+ "Back-to-Back Drought": {"rainfall_deficit_pct": -25, "spi": -1.5, "consecutive_drought_years": 2},
299
+ }
300
+
301
+ avg_loan = 3.0
302
+ recovery = 0.30
303
+ results = []
304
+
305
+ for scenario_name, overrides in scenarios.items():
306
+ probs = []
307
+ for farmer in base_portfolio:
308
+ stressed = {**farmer, **overrides}
309
+ result = predict_single(stressed, model, scaler)
310
+ probs.append(result["default_probability"] / 100)
311
+
312
+ avg_default_pct = np.mean(probs) * 100
313
+ total_loss = np.mean(probs) * avg_loan * (1 - recovery) * len(base_portfolio)
314
+
315
+ results.append({
316
+ "scenario": scenario_name,
317
+ "avg_default_pct": round(avg_default_pct, 2),
318
+ "total_loss_lakhs": round(total_loss, 2),
319
+ "portfolio_size": len(base_portfolio)
320
+ })
321
+
322
+ return results
323
+
324
+
325
+ # ─── Kaggle / research export ─────────────────────────────────────────────────
326
+
327
+ KAGGLE_DATASET_COLUMNS = [
328
+ "loan_id",
329
+ "state",
330
+ "age",
331
+ "land_size_acres",
332
+ "annual_income_lakhs",
333
+ "loan_amount_lakhs",
334
+ "crop_type",
335
+ "previous_defaults",
336
+ "rainfall_deficit_pct",
337
+ "spi",
338
+ "consecutive_drought_years",
339
+ "debt_to_income_ratio",
340
+ "land_productivity",
341
+ "crop_water_intensity",
342
+ "crop_drought_interaction",
343
+ "state_maharashtra",
344
+ "default",
345
+ "climaiq_score",
346
+ "risk_band",
347
+ ]
348
+
349
+
350
+ def _simplify_risk_band(label: str) -> str:
351
+ """Kaggle-friendly labels: High / Medium / Low / Very Low."""
352
+ return label.replace(" Risk", "").strip()
353
+
354
+
355
+ def _training_row_to_farmer_dict(row: pd.Series) -> dict:
356
+ """Map a generate_training_data row to the dict expected by predict_single."""
357
+ return {
358
+ "age": int(round(float(row["Age"]))),
359
+ "land_size_acres": float(row["Land_Size_Acres"]),
360
+ "annual_income_lakhs": float(row["Annual_Income_Lakhs"]),
361
+ "loan_amount_lakhs": float(row["Loan_Amount_Lakhs"]),
362
+ "previous_defaults": int(row["Previous_Defaults"]),
363
+ "crop_type": str(row["Crop_Type"]),
364
+ "state": str(row["State"]),
365
+ "rainfall_deficit_pct": float(row["Rainfall_Deficit_Pct"]),
366
+ "spi": float(row["SPI"]),
367
+ "consecutive_drought_years": int(row["Consecutive_Drought_Years"]),
368
+ }
369
+
370
+
371
+ def build_kaggle_export_dataframe(
372
+ n_rows: int = 1000,
373
+ seed: int = 42,
374
+ model=None,
375
+ scaler=None,
376
+ ) -> pd.DataFrame:
377
+ """
378
+ Build a tabular dataset aligned with the ClimaIQ engine: raw inputs, engineered
379
+ features, synthetic default target (causal logic in generate_training_data), and
380
+ ClimaIQ credit score / risk band from the trained logistic model.
381
+
382
+ Intended for Kaggle / research (e.g. *ClimaIQ — Climate-Adjusted Agricultural
383
+ Credit Risk Dataset (India)*).
384
+ """
385
+ if model is None or scaler is None:
386
+ model, scaler = load_model()
387
+
388
+ src = generate_training_data(n_rows, seed=seed)
389
+ records = []
390
+
391
+ for _, row in src.iterrows():
392
+ farmer = _training_row_to_farmer_dict(row)
393
+ pred = predict_single(farmer, model, scaler)
394
+ records.append(
395
+ {
396
+ "loan_id": int(row["Loan_ID"]),
397
+ "state": str(row["State"]),
398
+ "age": farmer["age"],
399
+ "land_size_acres": round(farmer["land_size_acres"], 3),
400
+ "annual_income_lakhs": round(farmer["annual_income_lakhs"], 3),
401
+ "loan_amount_lakhs": round(farmer["loan_amount_lakhs"], 3),
402
+ "crop_type": farmer["crop_type"],
403
+ "previous_defaults": farmer["previous_defaults"],
404
+ "rainfall_deficit_pct": round(farmer["rainfall_deficit_pct"], 3),
405
+ "spi": round(farmer["spi"], 3),
406
+ "consecutive_drought_years": farmer["consecutive_drought_years"],
407
+ "debt_to_income_ratio": round(float(row["Debt_to_Income_Ratio"]), 4),
408
+ "land_productivity": round(float(row["Land_Productivity"]), 4),
409
+ "crop_water_intensity": round(float(row["Crop_Water_Intensive"]), 4),
410
+ "crop_drought_interaction": round(float(row["Crop_Drought_Interaction"]), 4),
411
+ "state_maharashtra": int(row["State_Maharashtra"]),
412
+ "default": int(row["Default"]),
413
+ "climaiq_score": int(pred["credit_score"]),
414
+ "risk_band": _simplify_risk_band(str(pred["risk_band"])),
415
+ }
416
+ )
417
+
418
+ out = pd.DataFrame(records)
419
+ return out[KAGGLE_DATASET_COLUMNS]
420
+
421
+
422
+ # ─── Quick Test ────────────────────────────────────────────────────────────────
423
+
424
+ if __name__ == "__main__":
425
+ print("Training ClimaIQ model...")
426
+ model, scaler = load_model()
427
+ print("Model ready.\n")
428
+
429
+ sample_farmer = {
430
+ "age": 42,
431
+ "land_size_acres": 3.5,
432
+ "annual_income_lakhs": 3.0,
433
+ "loan_amount_lakhs": 2.0,
434
+ "previous_defaults": 0,
435
+ "crop_type": "Cotton",
436
+ "state": "Maharashtra",
437
+ "rainfall_deficit_pct": -35.0,
438
+ "spi": -1.8,
439
+ "consecutive_drought_years": 1
440
+ }
441
+
442
+ result = predict_single(sample_farmer, model, scaler)
443
+
444
+ print(f"Credit Score : {result['credit_score']}")
445
+ print(f"Risk Band : {result['risk_band']}")
446
+ print(f"Default Prob : {result['default_probability']}%")
447
+ print(f"Recommended : {result['recommended_action']}")
448
+ print(f"\nTop Risk Drivers:")
449
+ for d in result["top_risk_drivers"]:
450
+ print(f" - {d['display_name']} ({d['direction']})")
climaiq_gemma.py ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ClimaIQ Gemma Layer — Bilingual Explanation Engine
3
+ Converts ClimaIQ model output into plain language for farmers and loan officers.
4
+
5
+ Inference modes:
6
+ - cloud: Google AI Studio / GenAI API (GEMMA_API_KEY, model GEMMA_MODEL_CLOUD)
7
+ - ollama: local Ollama HTTP API at OLLAMA_BASE_URL (default http://127.0.0.1:11434)
8
+ Author: Krishna Dahale
9
+ """
10
+
11
+ import json
12
+ import os
13
+ import urllib.error
14
+ import urllib.request
15
+ from typing import Optional, Tuple
16
+
17
+ from google import genai
18
+
19
+ # ─── Client Setup ──────────────────────────────────────────────────────────────
20
+
21
+ def get_client(api_key: str = None):
22
+ key = api_key or os.environ.get("GEMMA_API_KEY")
23
+ if not key:
24
+ raise ValueError("API key not found. Set GEMMA_API_KEY environment variable.")
25
+ return genai.Client(api_key=key)
26
+
27
+
28
+ GEMMA_MODEL_CLOUD = "gemma-4-26b-a4b-it"
29
+ # Backwards compatibility
30
+ GEMMA_MODEL = GEMMA_MODEL_CLOUD
31
+
32
+ DEFAULT_OLLAMA_BASE = os.environ.get("OLLAMA_BASE_URL", "http://127.0.0.1:11434").rstrip("/")
33
+ DEFAULT_OLLAMA_MODEL = os.environ.get("OLLAMA_MODEL", "gemma3:4b")
34
+
35
+
36
+ def _ollama_installed_name_matches(installed: str, requested: str) -> bool:
37
+ """True if Ollama tags name matches user model (e.g. gemma3:4b vs gemma3:4b:latest)."""
38
+ installed = (installed or "").strip()
39
+ requested = (requested or "").strip()
40
+ if not requested:
41
+ return True
42
+ if installed == requested:
43
+ return True
44
+ if installed.startswith(requested + ":"):
45
+ return True
46
+ return False
47
+
48
+
49
+ def ollama_verify_connection(
50
+ base_url: Optional[str] = None,
51
+ model: Optional[str] = None,
52
+ timeout: int = 12,
53
+ ) -> Tuple[bool, str]:
54
+ """
55
+ GET /api/tags — confirms Ollama is reachable and the chosen model is installed.
56
+ Returns (success, human-readable message). No LLM inference run.
57
+ """
58
+ base = (base_url or DEFAULT_OLLAMA_BASE).rstrip("/")
59
+ want = (model or DEFAULT_OLLAMA_MODEL).strip()
60
+ url = f"{base}/api/tags"
61
+ try:
62
+ with urllib.request.urlopen(url, timeout=timeout) as resp:
63
+ data = json.loads(resp.read().decode("utf-8"))
64
+ except urllib.error.HTTPError as e:
65
+ body = e.read().decode("utf-8", errors="replace")[:300] if e.fp else ""
66
+ return False, f"Ollama returned HTTP {e.code} at {url}. {body}"
67
+ except Exception as e:
68
+ return False, f"Cannot reach Ollama at {base}. Start the server (e.g. ollama serve), then try again. ({e})"
69
+
70
+ models = data.get("models") or []
71
+ names = [m.get("name", "") for m in models if m.get("name")]
72
+ if not names:
73
+ hint = f"Run: ollama pull {want}" if want else "Run: ollama pull <model>"
74
+ return False, f"Ollama responded but no models are installed yet. {hint}"
75
+
76
+ if want:
77
+ hits = [n for n in names if _ollama_installed_name_matches(n, want)]
78
+ if not hits:
79
+ preview = ", ".join(names[:10])
80
+ suffix = " …" if len(names) > 10 else ""
81
+ return (
82
+ False,
83
+ f"Ollama is running, but model '{want}' is not installed. "
84
+ f"You have: {preview}{suffix}. Run: ollama pull {want}",
85
+ )
86
+ return True, f"Connected locally at {base}. Model '{hits[0]}' is ready, so you can use offline narratives."
87
+
88
+ return True, f"Connected at {base}. {len(names)} model(s) installed."
89
+
90
+
91
+ def ollama_generate(
92
+ prompt: str,
93
+ base_url: Optional[str] = None,
94
+ model: Optional[str] = None,
95
+ timeout: int = 300,
96
+ ) -> str:
97
+ """
98
+ Call Ollama's /api/chat (non-streaming). Works offline once Ollama is running.
99
+ """
100
+ base = (base_url or DEFAULT_OLLAMA_BASE).rstrip("/")
101
+ m = model or DEFAULT_OLLAMA_MODEL
102
+ url = f"{base}/api/chat"
103
+ payload = json.dumps(
104
+ {
105
+ "model": m,
106
+ "messages": [{"role": "user", "content": prompt}],
107
+ "stream": False,
108
+ }
109
+ ).encode("utf-8")
110
+ req = urllib.request.Request(
111
+ url,
112
+ data=payload,
113
+ headers={"Content-Type": "application/json"},
114
+ method="POST",
115
+ )
116
+ try:
117
+ with urllib.request.urlopen(req, timeout=timeout) as resp:
118
+ data = json.loads(resp.read().decode("utf-8"))
119
+ except urllib.error.HTTPError as e:
120
+ body = e.read().decode("utf-8", errors="replace") if e.fp else ""
121
+ raise RuntimeError(f"Ollama HTTP {e.code}: {body[:500]}") from e
122
+ except urllib.error.URLError as e:
123
+ raise RuntimeError(
124
+ f"Cannot reach Ollama at {base}. Is `ollama serve` running? ({e.reason})"
125
+ ) from e
126
+ msg = data.get("message") or {}
127
+ text = (msg.get("content") or "").strip()
128
+ if not text and data.get("error"):
129
+ raise RuntimeError(str(data["error"]))
130
+ return text
131
+
132
+
133
+ def generate_explanation_text(
134
+ prompt: str,
135
+ *,
136
+ inference_mode: str = "cloud",
137
+ cloud_client=None,
138
+ ollama_base: Optional[str] = None,
139
+ ollama_model: Optional[str] = None,
140
+ ) -> str:
141
+ """Single entry: cloud (Google GenAI) or local (Ollama)."""
142
+ if inference_mode == "ollama":
143
+ return ollama_generate(prompt, base_url=ollama_base, model=ollama_model)
144
+ if cloud_client is None:
145
+ raise ValueError("Cloud mode requires a Google GenAI client and GEMMA_API_KEY.")
146
+ response = cloud_client.models.generate_content(
147
+ model=GEMMA_MODEL_CLOUD,
148
+ contents=prompt,
149
+ )
150
+ return response.text
151
+
152
+ # ─── Prompt Templates ──────────────────────────────────────────────────────────
153
+
154
+ def _build_farmer_prompt(farmer_data: dict, result: dict, language: str) -> str:
155
+ drivers = "\n".join([f"- {d['display_name']}" for d in result["top_risk_drivers"]])
156
+
157
+ if language == "Hindi":
158
+ return f"""
159
+ आप एक सहानुभूतिपूर्ण कृषि ऋण सलाहकार हैं जो किसानों को सरल हिंदी में समझाते हैं।
160
+
161
+ किसान की जानकारी:
162
+ - फसल: {farmer_data['crop_type']}
163
+ - राज्य: {farmer_data['state']}
164
+ - वार्षिक आय: ₹{farmer_data['annual_income_lakhs']} लाख
165
+ - मांगा गया ऋण: ₹{farmer_data['loan_amount_lakhs']} लाख
166
+ - इस मौसम में बारिश की कमी: {abs(farmer_data['rainfall_deficit_pct'])}%
167
+ - सूखे की गंभीरता (SPI): {farmer_data['spi']}
168
+ - लगातार सूखे के वर्ष: {farmer_data['consecutive_drought_years']}
169
+
170
+ ClimaIQ परिणाम:
171
+ - क्रेडिट स्कोर: {result['credit_score']} (300–850 में से)
172
+ - जोखिम श्रेणी: {result['risk_band']}
173
+ - डिफ़ॉल्ट संभावना: {result['default_probability']}%
174
+ - मुख्य जोखिम कारण:
175
+ {drivers}
176
+
177
+ निम्नलिखित प्रारूप में 4-5 वाक्यों में उत्तर दें:
178
+ 1. किसान को सरल भाषा में बताएं कि उनका स्कोर क्यों कम/अधिक है
179
+ 2. मौसम और फसल का जोखिम पर क्या असर हुआ, यह समझाएं
180
+ 3. किसान 3 व्यावहारिक कदम क्या उठा सकते हैं (बीमा, वैकल्पिक फसल, सिंचाई आदि)
181
+ केवल हिंदी में उत्तर दें। जटिल शब्दों से बचें।
182
+ """
183
+ else:
184
+ return f"""
185
+ You are a helpful agricultural credit advisor explaining a loan assessment to a farmer in simple English.
186
+
187
+ Farmer Profile:
188
+ - Crop: {farmer_data['crop_type']}
189
+ - State: {farmer_data['state']}
190
+ - Annual Income: ₹{farmer_data['annual_income_lakhs']} lakhs
191
+ - Loan Requested: ₹{farmer_data['loan_amount_lakhs']} lakhs
192
+ - Rainfall Deficit this season: {abs(farmer_data['rainfall_deficit_pct'])}%
193
+ - Drought Severity (SPI): {farmer_data['spi']}
194
+ - Consecutive Drought Years: {farmer_data['consecutive_drought_years']}
195
+
196
+ ClimaIQ Result:
197
+ - Credit Score: {result['credit_score']} out of 850
198
+ - Risk Band: {result['risk_band']}
199
+ - Default Probability: {result['default_probability']}%
200
+ - Key Risk Drivers:
201
+ {drivers}
202
+
203
+ In 4-5 simple sentences:
204
+ 1. Explain why their score is what it is
205
+ 2. Explain how the weather and crop type has affected their risk
206
+ 3. Give 3 practical steps they can take (insurance, alternate crops, irrigation, etc.)
207
+ Use simple, non-technical language. Be empathetic and constructive.
208
+ """
209
+
210
+
211
+ def _build_officer_prompt(farmer_data: dict, result: dict, language: str) -> str:
212
+ drivers = "\n".join([f"- {d['display_name']}: {d['direction']}" for d in result["top_risk_drivers"]])
213
+
214
+ if language == "Hindi":
215
+ return f"""
216
+ आप एक वरिष्ठ कृषि ऋण अधिकारी हैं। नीचे दी गई जानकारी के आधार पर एक संक्षिप्त ऋण मूल्यांकन रिपोर्ट हिंदी में तैयार करें।
217
+
218
+ किसान प्रोफाइल:
219
+ - फसल: {farmer_data['crop_type']} | राज्य: {farmer_data['state']}
220
+ - आयु: {farmer_data['age']} वर्ष | भूमि: {farmer_data['land_size_acres']} एकड़
221
+ - वार्षिक आय: ₹{farmer_data['annual_income_lakhs']} लाख
222
+ - ऋण राशि: ₹{farmer_data['loan_amount_lakhs']} लाख
223
+ - पिछले डिफ़ॉल्ट: {'हाँ' if farmer_data['previous_defaults'] else 'नहीं'}
224
+ - बारिश की कमी: {abs(farmer_data['rainfall_deficit_pct'])}%
225
+ - SPI: {farmer_data['spi']} | लगातार सूखा: {farmer_data['consecutive_drought_years']} वर्ष
226
+
227
+ ClimaIQ स्कोर: {result['credit_score']} | जोखिम: {result['risk_band']} | डिफ़ॉल्ट संभावना: {result['default_probability']}%
228
+ सुझाई गई कार्रवाई: {result['recommended_action']}
229
+
230
+ मुख्य जोखिम कारण:
231
+ {drivers}
232
+
233
+ निम्नलिखित शीर्षक ठीक इसी रूप में अलग पंक्ति पर लिखें, फिर एक खाली पंक्ति, फिर अनुच्छेद:
234
+ 1. ऋण मूल्यांकन सारांश
235
+ 2. जलवायु जोखिम विश्लेषण
236
+ 3. सुझाई गई कार्रवाई और शर्तें
237
+ 4. निगरानी बिंदु
238
+ शीर्षकों पर मार्कडाउन बोल्ड न लगाएँ। प्रत्येक खंड में लगभग 2 वाक्य रखें।
239
+ """
240
+ else:
241
+ return f"""
242
+ You are a senior agricultural loan officer. Prepare a concise loan assessment report based on the ClimaIQ analysis below.
243
+
244
+ Farmer Profile:
245
+ - Crop: {farmer_data['crop_type']} | State: {farmer_data['state']}
246
+ - Age: {farmer_data['age']} | Land: {farmer_data['land_size_acres']} acres
247
+ - Annual Income: ₹{farmer_data['annual_income_lakhs']} lakhs
248
+ - Loan Requested: ₹{farmer_data['loan_amount_lakhs']} lakhs
249
+ - Previous Defaults: {'Yes' if farmer_data['previous_defaults'] else 'No'}
250
+ - Rainfall Deficit: {abs(farmer_data['rainfall_deficit_pct'])}%
251
+ - SPI: {farmer_data['spi']} | Consecutive Drought Years: {farmer_data['consecutive_drought_years']}
252
+
253
+ ClimaIQ Score: {result['credit_score']} | Risk Band: {result['risk_band']} | Default Probability: {result['default_probability']}%
254
+ Recommended Action: {result['recommended_action']}
255
+
256
+ Top Risk Drivers:
257
+ {drivers}
258
+
259
+ Structure your report using these exact numbered headings, each on its own line, followed by a blank line, then the paragraph(s):
260
+ 1. Assessment Summary
261
+ 2. Climate Risk Analysis
262
+ 3. Recommended Action with conditions
263
+ 4. Monitoring flags if loan is approved
264
+ Do not use markdown bold for the numbers. Keep each heading text exactly as shown (you may add detail after the blank line only).
265
+ Be professional and specific. Reference the ClimaIQ score in your reasoning.
266
+ """
267
+
268
+
269
+ def _build_portfolio_prompt(stress_results: list, language: str) -> str:
270
+ scenario_text = "\n".join([
271
+ f"- {r['scenario']}: {r['avg_default_pct']}% avg default, ₹{r['total_loss_lakhs']}L estimated loss"
272
+ for r in stress_results
273
+ ])
274
+
275
+ if language == "Hindi":
276
+ return f"""
277
+ आप एक पोर्टफोलियो जोखिम प्रबंधक हैं। निम्नलिखित जलवायु तनाव परीक्षण परिणामों के आधार पर हिंदी में एक संक्षिप्त जोखिम रिपोर्ट तैयार करें।
278
+
279
+ तनाव परीक्षण परिणाम ({stress_results[0]['portfolio_size']} ऋणों का पोर्टफोलियो):
280
+ {scenario_text}
281
+
282
+ निम्नलिखित पर रिपोर्ट दें:
283
+ 1. सामान्य बनाम सूखे की स्थिति में जोखिम वृद्धि
284
+ 2. सबसे गंभीर परिदृश्य का प्रभाव
285
+ 3. पूंजी बफर और प्रावधान की सिफारिश
286
+ 3-4 वाक्यों में, स्पष्ट और व्यावसायिक भाषा में।
287
+ """
288
+ else:
289
+ return f"""
290
+ You are a portfolio risk manager at an agricultural lending institution.
291
+ Based on the ClimaIQ stress test results below, write a concise risk narrative for senior management.
292
+
293
+ Stress Test Results (Portfolio of {stress_results[0]['portfolio_size']} loans):
294
+ {scenario_text}
295
+
296
+ Cover:
297
+ 1. Risk escalation from normal to stressed conditions
298
+ 2. The non-linear jump — why losses multiply rather than add
299
+ 3. Capital buffer and provisioning recommendation
300
+ 4. Which drought scenario should trigger portfolio rebalancing
301
+ Write in 4-5 sentences. Be specific about the numbers. Professional tone.
302
+ """
303
+
304
+
305
+ # ─── Main Explanation Functions ────────────────────────────────────────────────
306
+
307
+ def explain_for_farmer(
308
+ farmer_data: dict,
309
+ result: dict,
310
+ language: str = "Hindi",
311
+ client=None,
312
+ inference_mode: str = "cloud",
313
+ ollama_base: Optional[str] = None,
314
+ ollama_model: Optional[str] = None,
315
+ ) -> str:
316
+ """Generate farmer-facing explanation in Hindi or English."""
317
+ prompt = _build_farmer_prompt(farmer_data, result, language)
318
+ return generate_explanation_text(
319
+ prompt,
320
+ inference_mode=inference_mode,
321
+ cloud_client=client,
322
+ ollama_base=ollama_base,
323
+ ollama_model=ollama_model,
324
+ )
325
+
326
+
327
+ def explain_for_officer(
328
+ farmer_data: dict,
329
+ result: dict,
330
+ language: str = "English",
331
+ client=None,
332
+ inference_mode: str = "cloud",
333
+ ollama_base: Optional[str] = None,
334
+ ollama_model: Optional[str] = None,
335
+ ) -> str:
336
+ """Generate loan officer assessment report in Hindi or English."""
337
+ prompt = _build_officer_prompt(farmer_data, result, language)
338
+ return generate_explanation_text(
339
+ prompt,
340
+ inference_mode=inference_mode,
341
+ cloud_client=client,
342
+ ollama_base=ollama_base,
343
+ ollama_model=ollama_model,
344
+ )
345
+
346
+
347
+ def explain_portfolio_stress(
348
+ stress_results: list,
349
+ language: str = "English",
350
+ client=None,
351
+ inference_mode: str = "cloud",
352
+ ollama_base: Optional[str] = None,
353
+ ollama_model: Optional[str] = None,
354
+ ) -> str:
355
+ """Generate portfolio-level stress test narrative."""
356
+ prompt = _build_portfolio_prompt(stress_results, language)
357
+ return generate_explanation_text(
358
+ prompt,
359
+ inference_mode=inference_mode,
360
+ cloud_client=client,
361
+ ollama_base=ollama_base,
362
+ ollama_model=ollama_model,
363
+ )
364
+
365
+
366
+ # ─── Quick Test ────────────────────────────────────────────────────────────────
367
+
368
+ if __name__ == "__main__":
369
+ import os
370
+ from climaiq_engine import load_model, predict_single, run_stress_test
371
+
372
+ API_KEY = input("Enter your Gemma API key: ").strip()
373
+ client = get_client(API_KEY)
374
+
375
+ model, scaler = load_model()
376
+
377
+ sample_farmer = {
378
+ "age": 42,
379
+ "land_size_acres": 3.5,
380
+ "annual_income_lakhs": 3.0,
381
+ "loan_amount_lakhs": 2.0,
382
+ "previous_defaults": 0,
383
+ "crop_type": "Cotton",
384
+ "state": "Maharashtra",
385
+ "rainfall_deficit_pct": -35.0,
386
+ "spi": -1.8,
387
+ "consecutive_drought_years": 1
388
+ }
389
+
390
+ result = predict_single(sample_farmer, model, scaler)
391
+
392
+ print("\n" + "="*60)
393
+ print("FARMER EXPLANATION (Hindi)")
394
+ print("="*60)
395
+ print(explain_for_farmer(sample_farmer, result, language="Hindi", client=client))
396
+
397
+ print("\n" + "="*60)
398
+ print("OFFICER REPORT (English)")
399
+ print("="*60)
400
+ print(explain_for_officer(sample_farmer, result, language="English", client=client))
401
+
402
+ print("\n" + "="*60)
403
+ print("PORTFOLIO STRESS TEST NARRATIVE")
404
+ print("="*60)
405
+ portfolio = [sample_farmer] * 50
406
+ stress = run_stress_test(model, scaler, portfolio)
407
+ print(explain_portfolio_stress(stress, language="English", client=client))
climaiq_model.pkl ADDED
Binary file (991 Bytes). View file
 
climaiq_report_pdf.py ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ClimaIQ — Loan officer assessment PDF (A4, branded header, Unicode via Noto fonts).
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ import io
8
+ import os
9
+ import re
10
+ import tempfile
11
+ import urllib.request
12
+ from datetime import datetime, timezone
13
+ from typing import Dict, List, Optional, Tuple
14
+
15
+ from fpdf import FPDF
16
+
17
+ PRIMARY = (46, 125, 50)
18
+ PRIMARY_DARK = (27, 94, 32)
19
+ INK = (31, 42, 32)
20
+ MUTED = (90, 109, 102)
21
+
22
+ NOTO_SANS_URL = (
23
+ "https://raw.githubusercontent.com/googlefonts/noto-fonts/main/hinted/ttf/"
24
+ "NotoSans/NotoSans-Regular.ttf"
25
+ )
26
+ NOTO_DEVA_URL = (
27
+ "https://raw.githubusercontent.com/googlefonts/noto-fonts/main/hinted/ttf/"
28
+ "NotoSansDevanagari/NotoSansDevanagari-Regular.ttf"
29
+ )
30
+
31
+
32
+ def _font_cache_dir() -> str:
33
+ d = os.path.join(tempfile.gettempdir(), "climaiq_fonts")
34
+ os.makedirs(d, exist_ok=True)
35
+ return d
36
+
37
+
38
+ def _ensure_font(url: str, filename: str) -> Optional[str]:
39
+ path = os.path.join(_font_cache_dir(), filename)
40
+ if os.path.isfile(path) and os.path.getsize(path) > 10000:
41
+ return path
42
+ try:
43
+ req = urllib.request.Request(url, headers={"User-Agent": "ClimaIQ-Kisan/1.0"})
44
+ with urllib.request.urlopen(req, timeout=45) as resp:
45
+ data = resp.read()
46
+ with open(path, "wb") as f:
47
+ f.write(data)
48
+ return path if os.path.isfile(path) and os.path.getsize(path) > 10000 else None
49
+ except Exception:
50
+ return None
51
+
52
+
53
+ def _font_path_for_language(language: str) -> Optional[str]:
54
+ if language == "Hindi":
55
+ return _ensure_font(NOTO_DEVA_URL, "NotoSansDevanagari-Regular.ttf")
56
+ return _ensure_font(NOTO_SANS_URL, "NotoSans-Regular.ttf")
57
+
58
+
59
+ def split_report_sections(text: str) -> List[Tuple[Optional[str], str]]:
60
+ """
61
+ Split officer report into (numbered heading or None, body) tuples.
62
+ Headings are lines like '1. Assessment Summary' at the start of a block.
63
+ """
64
+ text = (text or "").strip()
65
+ if not text:
66
+ return []
67
+ matches = list(re.finditer(r"(?m)^\d+\.\s+[^\n]+", text))
68
+ if not matches:
69
+ return [(None, text)]
70
+ out: List[Tuple[Optional[str], str]] = []
71
+ if matches[0].start() > 0:
72
+ pre = text[: matches[0].start()].strip()
73
+ if pre:
74
+ out.append((None, pre))
75
+ for i, m in enumerate(matches):
76
+ start = m.start()
77
+ end = matches[i + 1].start() if i + 1 < len(matches) else len(text)
78
+ chunk = text[start:end].strip()
79
+ first_nl = chunk.find("\n")
80
+ if first_nl == -1:
81
+ out.append((chunk.strip(), ""))
82
+ else:
83
+ title = chunk[:first_nl].strip()
84
+ body = chunk[first_nl + 1 :].strip()
85
+ out.append((title, body))
86
+ return out
87
+
88
+
89
+ def _ascii_fallback(s: str) -> str:
90
+ return "".join(c if ord(c) < 128 else "?" for c in str(s))
91
+
92
+
93
+ def build_officer_assessment_pdf(
94
+ report_text: str,
95
+ farmer_data: Dict,
96
+ result: Dict,
97
+ language: str,
98
+ ) -> bytes:
99
+ font_path = _font_path_for_language(language)
100
+ use_core = font_path is None
101
+
102
+ pdf = FPDF(orientation="P", unit="mm", format="A4")
103
+ pdf.set_auto_page_break(auto=True, margin=18)
104
+ pdf.set_margins(18, 18, 18)
105
+ pdf.add_page()
106
+
107
+ if font_path and not use_core:
108
+ try:
109
+ pdf.add_font("ClimaIQ", "", font_path)
110
+ pdf.set_font("ClimaIQ", "", 11)
111
+ except Exception:
112
+ use_core = True
113
+ if use_core:
114
+ pdf.set_font("Helvetica", "", 10)
115
+
116
+ def set_size(sz: float) -> None:
117
+ if use_core:
118
+ pdf.set_font("Helvetica", "", sz)
119
+ else:
120
+ pdf.set_font("ClimaIQ", "", sz)
121
+
122
+ def cell_txt(w: float, h: float, txt: str, **kwargs) -> None:
123
+ t = _ascii_fallback(txt) if use_core else str(txt)
124
+ pdf.cell(w, h, t[:500], **kwargs)
125
+
126
+ def multi_txt(w: float, h: float, txt: str) -> None:
127
+ t = _ascii_fallback(txt) if use_core else str(txt)
128
+ pdf.multi_cell(w, h, t)
129
+
130
+ # Banner
131
+ pdf.set_fill_color(*PRIMARY)
132
+ pdf.rect(0, 0, 210, 16, "F")
133
+ pdf.set_text_color(255, 255, 255)
134
+ set_size(13)
135
+ pdf.set_xy(18, 5)
136
+ title = "Loan assessment report" if language != "Hindi" else "ऋण मूल्यांकन रिपोर्ट"
137
+ cell_txt(0, 8, title, ln=True)
138
+ pdf.set_text_color(*INK)
139
+
140
+ # Meta
141
+ pdf.set_xy(18, 22)
142
+ set_size(9)
143
+ pdf.set_text_color(*MUTED)
144
+ ts = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
145
+ lang_lbl = "Language" if language != "Hindi" else "भाषा"
146
+ pdf.cell(95, 5, f"{lang_lbl}: {language}" if use_core else f"{lang_lbl}: {language}")
147
+ pdf.cell(0, 5, ts, ln=True)
148
+ pdf.set_text_color(*INK)
149
+ pdf.ln(3)
150
+
151
+ # Scorecard title
152
+ set_size(10)
153
+ pdf.set_text_color(*PRIMARY_DARK)
154
+ sc_title = "ClimaIQ scorecard" if language != "Hindi" else "ClimaIQ स्कोरकार्ड"
155
+ cell_txt(0, 6, sc_title, ln=True)
156
+ pdf.set_text_color(*INK)
157
+ pdf.ln(1)
158
+
159
+ col_w = (210 - 36) / 2
160
+ pdf.set_fill_color(245, 248, 243)
161
+ set_size(9)
162
+
163
+ if language == "Hindi":
164
+ rows = [
165
+ ("क्रेडिट स्कोर", f"{result['credit_score']} / 850"),
166
+ ("जोखिम श्रेणी", str(result["risk_band"])),
167
+ ("डिफ़ॉल्ट संभावना", f"{result['default_probability']}%"),
168
+ ("सुझाई कार्रवाई", str(result["recommended_action"])[:110]),
169
+ ("फसल", str(farmer_data.get("crop_type", ""))),
170
+ ("राज्य", str(farmer_data.get("state", ""))),
171
+ ("ऋण (लाख ₹)", str(farmer_data.get("loan_amount_lakhs", ""))),
172
+ ("बारिश कमी %", str(abs(float(farmer_data.get("rainfall_deficit_pct", 0))))),
173
+ ("SPI", str(farmer_data.get("spi", ""))),
174
+ ]
175
+ else:
176
+ rows = [
177
+ ("Credit score", f"{result['credit_score']} / 850"),
178
+ ("Risk band", str(result["risk_band"])),
179
+ ("Default probability", f"{result['default_probability']}%"),
180
+ ("Recommended action", str(result["recommended_action"])[:110]),
181
+ ("Crop", str(farmer_data.get("crop_type", ""))),
182
+ ("State", str(farmer_data.get("state", ""))),
183
+ ("Loan (Rs lakhs)", str(farmer_data.get("loan_amount_lakhs", ""))),
184
+ ("Rain deficit %", str(abs(float(farmer_data.get("rainfall_deficit_pct", 0))))),
185
+ ("SPI", str(farmer_data.get("spi", ""))),
186
+ ]
187
+
188
+ for a, b in rows:
189
+ pdf.set_x(18)
190
+ cell_txt(col_w - 2, 7, a, border="B", fill=True)
191
+ cell_txt(col_w + 2, 7, b, border="B", ln=True, fill=True)
192
+ pdf.ln(4)
193
+
194
+ # Narrative
195
+ set_size(10)
196
+ pdf.set_text_color(*PRIMARY)
197
+ narr_h = "AI narrative" if language != "Hindi" else "AI विवरण"
198
+ cell_txt(0, 6, narr_h, ln=True)
199
+ pdf.set_text_color(*INK)
200
+ pdf.ln(2)
201
+
202
+ usable_w = 210 - 36
203
+ for head, body in split_report_sections(report_text):
204
+ if head:
205
+ set_size(10.5)
206
+ pdf.set_x(18)
207
+ multi_txt(usable_w, 5.5, head)
208
+ pdf.ln(1)
209
+ if body:
210
+ set_size(10)
211
+ pdf.set_x(18)
212
+ multi_txt(usable_w, 5.2, body)
213
+ pdf.ln(3)
214
+
215
+ # Footer
216
+ pdf.set_y(-24)
217
+ pdf.set_draw_color(200, 210, 200)
218
+ yf = pdf.get_y()
219
+ pdf.line(18, yf, 192, yf)
220
+ pdf.ln(2)
221
+ set_size(8)
222
+ pdf.set_text_color(*MUTED)
223
+ foot = (
224
+ "ClimaIQ Kisan — climate-adjusted agricultural credit intelligence. "
225
+ "For decision support only; not a substitute for policy and compliance review."
226
+ )
227
+ if language == "Hindi":
228
+ foot = (
229
+ "ClimaIQ Kisan — कृषि ऋण हेतु जलवायु-समायोजित विश्लेषण। "
230
+ "केवल निर्णय सहायता; नीति व अनुपालन का स्थान नहीं लेता।"
231
+ )
232
+ pdf.set_x(18)
233
+ multi_txt(usable_w, 4, foot)
234
+
235
+ out = pdf.output(dest="S")
236
+ if isinstance(out, str):
237
+ return out.encode("latin-1", errors="replace")
238
+ return bytes(out)
239
+
240
+
241
+ def pdf_to_bytesio(report_text: str, farmer_data: Dict, result: Dict, language: str) -> io.BytesIO:
242
+ return io.BytesIO(build_officer_assessment_pdf(report_text, farmer_data, result, language))
climaiq_scaler.pkl ADDED
Binary file (1.42 kB). View file
 
data/climaiq_india_agricultural_credit_1000.csv ADDED
@@ -0,0 +1,1001 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ loan_id,state,age,land_size_acres,annual_income_lakhs,loan_amount_lakhs,crop_type,previous_defaults,rainfall_deficit_pct,spi,consecutive_drought_years,debt_to_income_ratio,land_productivity,crop_water_intensity,crop_drought_interaction,state_maharashtra,default,climaiq_score,risk_band
2
+ 1,Maharashtra,47,10.677,15.0,0.604,Wheat,0,-22.749,-1.765,3,0.0403,1.4049,0.2,4.5497,1,1,375,High
3
+ 2,Punjab,29,1.207,8.45,5.37,Wheat,0,0.144,-0.968,0,0.6355,6.998,0.2,0.0,0,0,512,High
4
+ 3,Punjab,50,1.974,11.772,5.517,Rice,0,-4.037,-1.298,0,0.4686,5.9649,1.0,4.0366,0,0,497,High
5
+ 4,Maharashtra,52,0.655,12.761,6.49,Cotton,0,0.872,-2.054,0,0.5086,19.4879,0.5,0.0,1,1,468,High
6
+ 5,Maharashtra,52,2.831,15.0,7.496,Cotton,0,-13.847,-0.205,0,0.4997,5.2988,0.5,6.9235,1,1,460,High
7
+ 6,Maharashtra,58,0.988,2.019,0.651,Wheat,0,-2.961,1.506,3,0.3225,2.0425,0.2,0.5923,1,0,398,High
8
+ 7,Maharashtra,55,0.696,7.498,1.653,Wheat,1,-18.685,2.0,1,0.2205,10.7766,0.2,3.737,1,0,300,High
9
+ 8,Punjab,51,2.181,14.426,7.146,Rice,0,18.807,-0.203,1,0.4954,6.6157,1.0,0.0,0,0,530,High
10
+ 9,Punjab,44,0.5,15.0,3.939,Sugarcane,0,-24.188,0.817,1,0.2626,30.0,1.0,24.1882,0,0,463,High
11
+ 10,Punjab,25,0.5,8.219,4.734,Sugarcane,0,19.579,-0.068,0,0.576,16.4385,1.0,0.0,0,0,580,High
12
+ 11,Maharashtra,50,0.742,2.715,5.473,Cotton,0,-11.477,0.199,0,2.0158,3.6599,0.5,5.7383,1,0,422,High
13
+ 12,Punjab,47,0.5,15.0,5.593,Rice,0,-32.633,-0.642,1,0.3729,30.0,1.0,32.6327,0,1,384,High
14
+ 13,Punjab,48,0.5,7.328,7.488,Sugarcane,0,8.521,-0.105,1,1.0218,14.6561,1.0,0.0,0,0,469,High
15
+ 14,Maharashtra,30,1.241,4.703,7.977,Millets,0,-10.111,0.237,0,1.6961,3.7888,0.0,0.0,1,0,433,High
16
+ 15,Maharashtra,32,4.867,7.393,5.901,Rice,0,0.767,-0.878,1,0.7982,1.5189,1.0,0.0,1,0,434,High
17
+ 16,Maharashtra,58,2.546,10.511,2.654,Cotton,1,6.358,-0.377,0,0.2525,4.1279,0.5,0.0,1,0,357,High
18
+ 17,Maharashtra,45,2.156,7.51,7.098,Rice,0,-6.931,-0.358,0,0.9452,3.4825,1.0,6.9307,1,0,436,High
19
+ 18,Maharashtra,53,1.042,2.087,0.869,Wheat,0,-20.884,0.526,0,0.4165,2.002,0.2,4.1767,1,0,457,High
20
+ 19,Maharashtra,45,8.054,15.0,2.233,Rice,1,2.636,-1.366,0,0.1489,1.8625,1.0,0.0,1,1,371,High
21
+ 20,Maharashtra,45,1.518,15.0,7.23,Cotton,0,-11.989,-0.352,2,0.482,9.8841,0.5,5.9943,1,1,388,High
22
+ 21,Punjab,56,0.5,15.0,2.421,Wheat,0,-1.712,1.612,2,0.1614,30.0,0.2,0.3424,0,0,535,High
23
+ 22,Maharashtra,39,2.88,4.903,2.155,Wheat,0,-44.306,0.864,0,0.4395,1.7026,0.2,8.8612,1,1,417,High
24
+ 23,Maharashtra,46,0.5,10.369,1.536,Cotton,0,-5.295,1.049,1,0.1481,20.7377,0.5,2.6476,1,0,510,High
25
+ 24,Maharashtra,39,1.27,12.119,6.943,Cotton,1,-21.579,-0.276,1,0.5729,9.5397,0.5,10.7894,1,1,300,High
26
+ 25,Maharashtra,40,2.124,15.0,4.25,Wheat,1,12.8,0.021,0,0.2834,7.0613,0.2,0.0,1,0,396,High
27
+ 26,Punjab,41,6.22,15.0,5.562,Rice,0,-2.654,0.702,0,0.3708,2.4117,1.0,2.6537,0,0,566,High
28
+ 27,Maharashtra,48,2.041,6.771,2.293,Rice,0,-8.402,1.26,3,0.3386,3.3176,1.0,8.4021,1,1,384,High
29
+ 28,Maharashtra,39,3.635,13.008,6.185,Millets,0,-4.705,-2.252,1,0.4755,3.5791,0.0,0.0,1,0,421,High
30
+ 29,Maharashtra,60,14.808,15.0,6.2,Rice,0,-26.977,-1.615,3,0.4133,1.013,1.0,26.9766,1,1,300,High
31
+ 30,Maharashtra,34,0.5,15.0,2.844,Sugarcane,0,12.349,1.009,0,0.1896,30.0,1.0,0.0,1,0,613,Medium
32
+ 31,Punjab,43,0.964,15.0,3.58,Millets,0,17.871,-0.577,1,0.2387,15.566,0.0,0.0,0,0,568,High
33
+ 32,Maharashtra,40,1.505,15.0,2.073,Cotton,1,-6.106,-0.972,0,0.1382,9.9636,0.5,3.0531,1,1,354,High
34
+ 33,Maharashtra,62,1.644,13.027,7.824,Cotton,1,11.856,-1.554,0,0.6006,7.9259,0.5,0.0,1,1,304,High
35
+ 34,Punjab,47,1.588,15.0,5.342,Wheat,0,-20.537,-0.855,1,0.3561,9.4453,0.2,4.1074,0,0,452,High
36
+ 35,Punjab,57,7.145,15.0,7.509,Millets,0,-23.957,-1.702,0,0.5006,2.0993,0.0,0.0,0,1,452,High
37
+ 36,Punjab,27,3.756,6.117,2.775,Millets,0,-11.386,1.791,0,0.4537,1.6288,0.0,0.0,0,0,557,High
38
+ 37,Maharashtra,48,2.809,15.0,6.364,Sugarcane,0,-5.476,-0.322,0,0.4243,5.3404,1.0,5.4759,1,0,492,High
39
+ 38,Maharashtra,56,1.11,15.0,6.244,Rice,0,-17.91,-0.358,0,0.4163,13.5079,1.0,17.9098,1,1,441,High
40
+ 39,Punjab,46,5.208,8.547,5.687,Wheat,0,-3.933,0.288,1,0.6654,1.641,0.2,0.7867,0,1,477,High
41
+ 40,Maharashtra,58,9.307,8.301,7.742,Cotton,0,-7.404,0.662,0,0.9327,0.8919,0.5,3.7021,1,0,458,High
42
+ 41,Maharashtra,39,5.164,15.0,3.452,Wheat,0,-26.975,0.646,0,0.2301,2.9045,0.2,5.3949,1,0,502,High
43
+ 42,Maharashtra,62,0.5,15.0,1.48,Rice,0,-4.218,0.774,0,0.0987,30.0,1.0,4.2181,1,0,566,High
44
+ 43,Maharashtra,70,3.035,14.265,5.538,Rice,1,0.953,-0.931,0,0.3882,4.7001,1.0,0.0,1,0,320,High
45
+ 44,Punjab,41,0.5,15.0,5.97,Sugarcane,0,-9.428,-0.598,1,0.398,30.0,1.0,9.428,0,0,472,High
46
+ 45,Maharashtra,40,0.894,15.0,4.813,Wheat,0,5.29,0.469,0,0.3209,16.7855,0.2,0.0,1,0,561,High
47
+ 46,Punjab,62,0.5,15.0,2.051,Cotton,0,-30.261,-0.827,1,0.1367,30.0,0.5,15.1305,0,0,444,High
48
+ 47,Maharashtra,64,2.777,14.19,4.283,Cotton,0,-4.981,-0.305,0,0.3019,5.1088,0.5,2.4904,1,0,507,High
49
+ 48,Maharashtra,39,3.481,15.0,2.841,Millets,1,-29.554,0.099,0,0.1894,4.3094,0.0,0.0,1,1,323,High
50
+ 49,Maharashtra,40,0.5,5.333,3.706,Sugarcane,0,-28.711,0.485,2,0.6949,10.6667,1.0,28.7112,1,1,314,High
51
+ 50,Maharashtra,42,1.453,15.0,5.339,Cotton,0,-21.464,-2.078,1,0.3559,10.3253,0.5,10.732,1,0,389,High
52
+ 51,Punjab,29,1.828,15.0,6.089,Rice,0,-26.131,0.415,0,0.4059,8.2069,1.0,26.1309,0,1,469,High
53
+ 52,Punjab,34,1.382,10.232,2.242,Cotton,0,-20.22,-0.534,2,0.2191,7.4062,0.5,10.11,0,0,419,High
54
+ 53,Punjab,33,0.5,6.184,3.54,Millets,0,-15.212,0.407,0,0.5725,12.3671,0.0,0.0,0,0,511,High
55
+ 54,Punjab,36,1.629,7.231,2.519,Wheat,0,0.557,0.477,2,0.3483,4.4394,0.2,0.0,0,0,479,High
56
+ 55,Maharashtra,45,4.173,5.095,1.99,Wheat,0,-16.817,1.308,1,0.3905,1.221,0.2,3.3635,1,0,454,High
57
+ 56,Punjab,48,0.5,6.503,6.375,Wheat,0,-35.784,1.053,1,0.9805,13.005,0.2,7.1569,0,0,391,High
58
+ 57,Maharashtra,64,0.5,9.058,7.319,Cotton,0,5.101,1.047,3,0.8081,18.115,0.5,0.0,1,0,378,High
59
+ 58,Maharashtra,33,1.314,3.957,3.277,Sugarcane,0,-24.556,1.144,0,0.828,3.0106,1.0,24.5564,1,1,422,High
60
+ 59,Maharashtra,57,8.528,12.336,6.135,Wheat,0,-12.881,-0.009,1,0.4973,1.4465,0.2,2.5762,1,0,435,High
61
+ 60,Maharashtra,42,3.313,15.0,7.227,Rice,0,-5.302,-0.268,0,0.4818,4.5276,1.0,5.302,1,0,488,High
62
+ 61,Maharashtra,44,3.406,5.893,6.846,Rice,1,-9.006,0.573,0,1.1617,1.7303,1.0,9.0058,1,1,300,High
63
+ 62,Maharashtra,53,1.348,15.0,1.871,Wheat,1,4.413,0.432,0,0.1247,11.1286,0.2,0.0,1,1,405,High
64
+ 63,Punjab,32,2.702,15.0,7.672,Millets,0,-4.815,-0.609,0,0.5115,5.5521,0.0,0.0,0,0,521,High
65
+ 64,Maharashtra,50,0.5,15.0,3.325,Cotton,0,-24.92,0.105,1,0.2217,30.0,0.5,12.4598,1,0,442,High
66
+ 65,Maharashtra,47,3.033,7.197,3.044,Millets,0,20.0,-0.335,1,0.423,2.3734,0.0,0.0,1,0,506,High
67
+ 66,Maharashtra,51,7.335,15.0,0.968,Sugarcane,0,-9.085,-1.154,1,0.0645,2.0449,1.0,9.085,1,0,480,High
68
+ 67,Maharashtra,48,2.845,5.086,4.146,Rice,0,-14.21,0.99,0,0.8153,1.7878,1.0,14.2101,1,0,450,High
69
+ 68,Punjab,70,6.207,15.0,1.318,Rice,0,2.459,-0.245,0,0.0878,2.4165,1.0,0.0,0,0,593,High
70
+ 69,Maharashtra,37,3.862,13.978,2.364,Rice,0,-8.258,1.749,2,0.1691,3.6195,1.0,8.2582,1,1,481,High
71
+ 70,Punjab,39,0.5,15.0,2.877,Sugarcane,0,-6.012,-1.925,0,0.1918,30.0,1.0,6.0116,0,0,534,High
72
+ 71,Punjab,38,6.982,4.757,6.566,Rice,1,20.0,-0.857,1,1.3805,0.6812,1.0,0.0,0,1,305,High
73
+ 72,Maharashtra,38,0.5,5.953,7.066,Cotton,0,-16.127,-0.267,1,1.1869,11.9066,0.5,8.0634,1,0,371,High
74
+ 73,Maharashtra,37,2.29,15.0,2.768,Wheat,0,-16.766,0.837,1,0.1846,6.5488,0.2,3.3533,1,0,496,High
75
+ 74,Punjab,59,0.5,5.705,6.94,Sugarcane,0,-10.251,0.099,1,1.2165,11.4098,1.0,10.2513,0,0,405,High
76
+ 75,Punjab,62,0.5,15.0,6.929,Rice,0,4.073,0.01,2,0.4619,30.0,1.0,0.0,0,0,467,High
77
+ 76,Punjab,38,1.645,4.081,6.235,Cotton,1,-34.598,-1.427,0,1.5279,2.4811,0.5,17.299,0,1,300,High
78
+ 77,Punjab,35,1.049,15.0,1.6,Wheat,0,-41.483,-1.457,2,0.1067,14.3014,0.2,8.2967,0,1,394,High
79
+ 78,Maharashtra,51,1.997,4.545,5.677,Wheat,0,-20.807,0.023,0,1.2492,2.2763,0.2,4.1613,1,0,412,High
80
+ 79,Maharashtra,38,2.583,15.0,7.588,Sugarcane,0,-36.509,-1.664,0,0.5058,5.8082,1.0,36.5088,1,1,340,High
81
+ 80,Maharashtra,53,0.5,15.0,5.619,Rice,0,-18.372,-0.832,0,0.3746,30.0,1.0,18.3725,1,0,443,High
82
+ 81,Punjab,47,0.5,6.977,2.987,Sugarcane,0,-4.463,0.201,1,0.4282,13.9535,1.0,4.4625,0,0,485,High
83
+ 82,Punjab,27,2.454,15.0,4.254,Wheat,0,-25.361,-1.282,0,0.2836,6.1132,0.2,5.0722,0,1,494,High
84
+ 83,Maharashtra,64,1.261,15.0,5.343,Wheat,0,-33.402,1.305,0,0.3562,11.8955,0.2,6.6805,1,0,464,High
85
+ 84,Maharashtra,67,3.919,7.916,4.329,Wheat,0,-10.96,0.924,0,0.5469,2.0201,0.2,2.192,1,1,482,High
86
+ 85,Maharashtra,38,3.169,5.437,1.4,Cotton,0,0.938,-1.871,2,0.2574,1.7155,0.5,0.0,1,0,407,High
87
+ 86,Maharashtra,40,5.605,2.534,2.84,Rice,0,-37.425,-1.232,2,1.1208,0.4522,1.0,37.4246,1,1,300,High
88
+ 87,Punjab,48,3.538,15.0,6.518,Wheat,0,0.303,-2.586,1,0.4345,4.24,0.2,0.0,0,0,458,High
89
+ 88,Punjab,49,1.686,3.484,6.961,Wheat,0,0.26,-1.083,1,1.9979,2.0664,0.2,0.0,0,0,411,High
90
+ 89,Punjab,53,3.353,13.148,1.53,Wheat,0,2.311,0.466,0,0.1163,3.9212,0.2,0.0,0,0,600,Medium
91
+ 90,Maharashtra,69,0.966,9.867,7.643,Cotton,0,6.277,-0.714,0,0.7746,10.2113,0.5,0.0,1,0,465,High
92
+ 91,Maharashtra,43,1.097,15.0,2.966,Millets,0,20.0,0.161,2,0.1977,13.6711,0.0,0.0,1,0,522,High
93
+ 92,Punjab,35,4.667,9.567,5.467,Wheat,0,-17.341,-1.822,0,0.5715,2.0498,0.2,3.4683,0,0,458,High
94
+ 93,Punjab,28,1.774,9.36,6.139,Rice,0,-10.356,0.498,0,0.6558,5.2761,1.0,10.3564,0,1,498,High
95
+ 94,Maharashtra,36,4.804,15.0,6.59,Cotton,0,-18.247,-0.855,0,0.4393,3.1223,0.5,9.1233,1,1,454,High
96
+ 95,Punjab,45,5.185,15.0,7.593,Sugarcane,0,-11.97,-0.288,0,0.5062,2.8929,1.0,11.9703,0,0,488,High
97
+ 96,Maharashtra,67,5.847,15.0,2.847,Sugarcane,0,10.993,-0.393,0,0.1898,2.5656,1.0,0.0,1,1,564,High
98
+ 97,Maharashtra,39,7.454,15.0,6.939,Wheat,0,-32.175,-1.572,1,0.4626,2.0125,0.2,6.435,1,0,372,High
99
+ 98,Maharashtra,48,1.692,3.566,1.488,Millets,0,-24.916,-1.453,0,0.4171,2.1083,0.0,0.0,1,0,423,High
100
+ 99,Maharashtra,45,1.152,15.0,5.788,Cotton,0,8.658,0.668,1,0.3859,13.0209,0.5,0.0,1,0,518,High
101
+ 100,Maharashtra,59,2.618,15.0,6.065,Cotton,0,3.301,0.099,0,0.4043,5.729,0.5,0.0,1,0,525,High
102
+ 101,Maharashtra,70,1.392,5.401,5.583,Millets,0,-17.447,0.75,0,1.0336,3.8811,0.0,0.0,1,0,437,High
103
+ 102,Punjab,39,2.757,10.022,2.392,Millets,0,0.816,0.025,0,0.2387,3.635,0.0,0.0,0,0,569,High
104
+ 103,Maharashtra,39,3.668,11.805,7.048,Wheat,0,-6.882,-0.157,1,0.597,3.2182,0.2,1.3764,1,0,439,High
105
+ 104,Maharashtra,58,3.498,10.94,1.766,Millets,0,10.504,-2.026,0,0.1615,3.1273,0.0,0.0,1,0,523,High
106
+ 105,Punjab,53,1.408,15.0,0.902,Rice,0,-10.882,-0.57,1,0.0602,10.6544,1.0,10.8824,0,0,509,High
107
+ 106,Maharashtra,67,0.548,15.0,5.881,Millets,0,3.384,-0.327,1,0.3921,27.3892,0.0,0.0,1,1,479,High
108
+ 107,Maharashtra,52,1.689,15.0,4.066,Cotton,0,20.0,1.653,1,0.2711,8.8802,0.5,0.0,1,0,574,High
109
+ 108,Punjab,41,0.5,4.264,6.868,Rice,0,-3.029,0.387,0,1.6107,8.5281,1.0,3.0285,0,0,478,High
110
+ 109,Maharashtra,52,6.624,15.0,3.375,Rice,0,-11.26,1.236,0,0.225,2.2643,1.0,11.2601,1,0,532,High
111
+ 110,Maharashtra,58,1.273,15.0,1.762,Cotton,0,-1.163,0.298,0,0.1175,11.7797,0.5,0.5816,1,0,564,High
112
+ 111,Maharashtra,55,0.503,15.0,6.773,Cotton,0,-17.479,-1.011,1,0.4516,29.801,0.5,8.7396,1,0,404,High
113
+ 112,Maharashtra,51,0.5,15.0,4.617,Cotton,1,20.0,-0.183,0,0.3078,30.0,0.5,0.0,1,0,403,High
114
+ 113,Punjab,58,3.114,15.0,1.919,Rice,1,-9.299,-0.064,2,0.1279,4.8172,1.0,9.2989,0,1,300,High
115
+ 114,Punjab,59,3.039,15.0,5.903,Cotton,0,-16.094,-1.239,2,0.3935,4.9354,0.5,8.047,0,0,395,High
116
+ 115,Punjab,62,1.249,14.872,4.333,Wheat,0,-24.535,-0.684,0,0.2914,11.9039,0.2,4.9071,0,0,488,High
117
+ 116,Punjab,53,0.5,15.0,5.032,Cotton,0,4.458,-0.506,0,0.3355,30.0,0.5,0.0,0,0,564,High
118
+ 117,Punjab,43,1.581,13.68,3.957,Cotton,0,1.008,1.306,1,0.2892,8.6525,0.5,0.0,0,0,555,High
119
+ 118,Maharashtra,47,1.118,12.418,6.715,Sugarcane,0,-19.46,-2.381,0,0.5408,11.1022,1.0,19.4603,1,1,381,High
120
+ 119,Punjab,59,3.391,9.197,6.722,Millets,0,-3.353,0.906,0,0.7309,2.7118,0.0,0.0,0,0,517,High
121
+ 120,Maharashtra,35,2.793,15.0,5.82,Sugarcane,0,-34.628,-1.237,2,0.388,5.3715,1.0,34.6283,1,1,300,High
122
+ 121,Punjab,49,1.36,6.33,1.291,Cotton,0,-9.225,-1.672,0,0.2039,4.6526,0.5,4.6127,0,1,491,High
123
+ 122,Punjab,40,0.737,15.0,6.791,Sugarcane,0,-5.209,0.88,2,0.4528,20.3448,1.0,5.2087,0,1,465,High
124
+ 123,Maharashtra,45,13.278,15.0,5.533,Rice,0,13.61,0.432,1,0.3688,1.1297,1.0,0.0,1,0,536,High
125
+ 124,Maharashtra,60,1.815,3.977,5.728,Rice,0,-23.562,0.955,1,1.4402,2.1907,1.0,23.5623,1,1,342,High
126
+ 125,Maharashtra,47,3.497,15.0,3.222,Cotton,1,-31.175,0.501,0,0.2148,4.2895,0.5,15.5876,1,1,300,High
127
+ 126,Maharashtra,46,0.5,2.27,7.095,Sugarcane,0,-25.431,1.76,0,3.1248,4.5409,1.0,25.4314,1,0,369,High
128
+ 127,Punjab,29,1.994,15.0,5.94,Rice,0,-32.049,0.259,1,0.396,7.5218,1.0,32.0485,0,1,404,High
129
+ 128,Punjab,54,0.5,15.0,1.344,Rice,0,8.05,-0.456,0,0.0896,30.0,1.0,0.0,0,0,610,Medium
130
+ 129,Maharashtra,53,2.112,7.585,3.558,Rice,1,11.23,0.043,0,0.4692,3.5906,1.0,0.0,1,1,351,High
131
+ 130,Maharashtra,70,9.974,13.448,7.148,Millets,0,-7.197,0.943,0,0.5315,1.3483,0.0,0.0,1,0,501,High
132
+ 131,Maharashtra,41,1.455,15.0,0.854,Wheat,0,6.319,-1.079,0,0.0569,10.3126,0.2,0.0,1,0,573,High
133
+ 132,Maharashtra,48,0.5,8.129,7.711,Cotton,0,-9.991,-0.952,0,0.9486,16.2574,0.5,4.9953,1,0,419,High
134
+ 133,Maharashtra,48,0.5,5.222,5.594,Wheat,0,-13.427,-0.609,1,1.0712,10.4439,0.2,2.6853,1,0,385,High
135
+ 134,Maharashtra,64,1.473,15.0,5.235,Wheat,0,-16.996,-2.405,0,0.349,10.1833,0.2,3.3991,1,1,435,High
136
+ 135,Punjab,44,0.523,15.0,2.529,Wheat,0,-16.656,-0.162,0,0.1686,28.6725,0.2,3.3312,0,1,551,High
137
+ 136,Maharashtra,48,0.5,12.219,2.366,Rice,0,-35.217,-2.186,1,0.1936,24.4371,1.0,35.217,1,1,331,High
138
+ 137,Maharashtra,52,4.234,15.0,7.565,Millets,1,-8.036,-0.247,3,0.5044,3.5424,0.0,0.0,1,1,300,High
139
+ 138,Punjab,47,1.84,15.0,2.737,Cotton,0,-12.605,0.565,0,0.1825,8.1506,0.5,6.3025,0,0,560,High
140
+ 139,Maharashtra,40,1.024,6.726,6.316,Wheat,0,-0.82,-0.777,0,0.9391,6.5668,0.2,0.1639,1,0,459,High
141
+ 140,Punjab,47,6.91,8.263,3.448,Rice,0,-10.597,1.377,1,0.4173,1.1957,1.0,10.5971,0,1,490,High
142
+ 141,Punjab,58,0.5,15.0,1.544,Cotton,0,-14.441,-1.761,2,0.103,30.0,0.5,7.2203,0,0,440,High
143
+ 142,Maharashtra,33,9.365,15.0,0.58,Cotton,1,-25.068,0.891,1,0.0387,1.6017,0.5,12.5339,1,1,318,High
144
+ 143,Maharashtra,47,1.13,15.0,4.582,Wheat,0,-10.918,0.375,1,0.3055,13.2686,0.2,2.1835,1,0,478,High
145
+ 144,Maharashtra,37,6.579,6.026,7.818,Rice,0,-0.926,-2.016,0,1.2974,0.9161,1.0,0.9264,1,0,419,High
146
+ 145,Maharashtra,59,2.771,15.0,3.269,Sugarcane,0,-29.15,2.0,1,0.2179,5.4132,1.0,29.1501,1,0,432,High
147
+ 146,Maharashtra,27,5.258,7.966,3.179,Rice,0,-10.688,-0.364,0,0.399,1.515,1.0,10.6879,1,0,477,High
148
+ 147,Punjab,38,12.408,9.317,3.081,Wheat,0,-8.504,-1.177,1,0.3306,0.7509,0.2,1.7009,0,1,481,High
149
+ 148,Maharashtra,50,1.021,15.0,4.404,Sugarcane,0,-22.771,-1.707,1,0.2936,14.6952,1.0,22.771,1,1,379,High
150
+ 149,Maharashtra,64,9.743,15.0,3.805,Wheat,0,-20.818,-0.52,3,0.2537,1.5396,0.2,4.1636,1,0,361,High
151
+ 150,Maharashtra,44,1.48,15.0,7.099,Sugarcane,0,-8.541,-0.427,0,0.4733,10.1328,1.0,8.5408,1,0,472,High
152
+ 151,Punjab,38,1.461,15.0,4.291,Wheat,0,-29.001,-0.197,0,0.2861,10.2677,0.2,5.8003,0,0,500,High
153
+ 152,Maharashtra,68,1.248,15.0,4.308,Cotton,0,-6.751,-0.598,1,0.2872,12.0163,0.5,3.3756,1,0,458,High
154
+ 153,Maharashtra,28,2.339,12.614,1.538,Sugarcane,1,-25.43,0.333,1,0.1219,5.3934,1.0,25.4303,1,1,300,High
155
+ 154,Maharashtra,25,0.502,15.0,7.871,Cotton,0,3.943,-0.688,1,0.5247,29.8673,0.5,0.0,1,0,475,High
156
+ 155,Punjab,50,2.42,1.61,2.375,Wheat,0,20.0,-2.235,0,1.4749,0.6653,0.2,0.0,0,1,510,High
157
+ 156,Maharashtra,39,2.341,9.609,1.05,Sugarcane,0,-24.911,-0.449,0,0.1093,4.1052,1.0,24.9114,1,0,444,High
158
+ 157,Punjab,33,4.305,14.777,5.474,Cotton,0,-3.987,-2.667,1,0.3704,3.4323,0.5,1.9934,0,0,462,High
159
+ 158,Punjab,54,5.381,4.851,4.965,Cotton,0,-22.901,0.054,0,1.0235,0.9015,0.5,11.4506,0,0,437,High
160
+ 159,Maharashtra,48,1.742,15.0,3.614,Wheat,1,3.614,-1.279,2,0.2409,8.6117,0.2,0.0,1,1,300,High
161
+ 160,Punjab,38,1.08,10.344,3.666,Sugarcane,0,-30.979,-0.137,0,0.3544,9.5776,1.0,30.9789,0,0,434,High
162
+ 161,Maharashtra,30,0.901,15.0,6.388,Millets,1,-4.791,1.014,1,0.4259,16.6552,0.0,0.0,1,1,322,High
163
+ 162,Punjab,55,0.649,15.0,1.968,Wheat,0,-25.095,-1.249,1,0.1312,23.1005,0.2,5.019,0,0,467,High
164
+ 163,Punjab,53,0.5,8.393,6.652,Wheat,0,-15.105,0.761,1,0.7926,16.7853,0.2,3.021,0,0,443,High
165
+ 164,Maharashtra,44,1.258,10.798,5.366,Millets,1,-27.465,-0.733,0,0.4969,8.5853,0.0,0.0,1,1,300,High
166
+ 165,Maharashtra,67,0.945,11.483,3.642,Rice,0,0.335,1.453,2,0.3172,12.1491,1.0,0.0,1,1,465,High
167
+ 166,Punjab,32,10.181,8.488,3.935,Rice,1,-24.555,-0.665,0,0.4636,0.8337,1.0,24.5547,0,1,300,High
168
+ 167,Maharashtra,27,2.447,14.24,2.425,Sugarcane,0,-3.721,-1.14,1,0.1703,5.8183,1.0,3.7205,1,0,489,High
169
+ 168,Maharashtra,37,1.28,6.642,6.141,Sugarcane,1,-17.161,0.387,0,0.9246,5.1896,1.0,17.1615,1,1,300,High
170
+ 169,Maharashtra,44,2.606,4.931,4.347,Millets,0,-13.717,-0.736,0,0.8815,1.8922,0.0,0.0,1,1,441,High
171
+ 170,Maharashtra,48,0.5,15.0,2.906,Cotton,0,-9.784,-1.141,0,0.1938,30.0,0.5,4.8918,1,0,509,High
172
+ 171,Punjab,42,1.761,15.0,4.97,Rice,0,-23.427,-0.778,0,0.3314,8.5169,1.0,23.4274,0,1,461,High
173
+ 172,Maharashtra,49,2.952,6.402,7.968,Cotton,0,-8.844,-0.345,3,1.2447,2.1683,0.5,4.4222,1,0,300,High
174
+ 173,Maharashtra,30,2.014,15.0,3.764,Rice,0,10.955,1.042,0,0.251,7.4495,1.0,0.0,1,0,598,High
175
+ 174,Maharashtra,62,1.541,7.35,7.405,Cotton,0,-23.671,-2.234,1,1.0075,4.7686,0.5,11.8357,1,1,303,High
176
+ 175,Punjab,44,15.273,14.917,3.088,Sugarcane,0,5.577,-0.277,3,0.207,0.9767,1.0,0.0,0,0,481,High
177
+ 176,Maharashtra,58,6.369,15.0,0.91,Rice,0,10.471,0.325,0,0.0607,2.3553,1.0,0.0,1,0,602,Medium
178
+ 177,Punjab,49,2.93,11.859,2.032,Sugarcane,0,-24.242,-0.107,1,0.1713,4.0479,1.0,24.2423,0,0,440,High
179
+ 178,Maharashtra,50,2.528,15.0,3.64,Cotton,0,-33.826,1.01,0,0.2427,5.9346,0.5,16.9129,1,0,465,High
180
+ 179,Punjab,52,2.908,8.06,2.147,Wheat,0,-7.471,-0.374,0,0.2664,2.7715,0.2,1.4941,0,0,526,High
181
+ 180,Maharashtra,50,0.674,10.411,0.502,Rice,0,-20.211,-0.485,0,0.0482,15.4379,1.0,20.2111,1,0,468,High
182
+ 181,Maharashtra,53,1.508,10.333,7.363,Cotton,0,16.029,0.292,2,0.7125,6.8507,0.5,0.0,1,1,437,High
183
+ 182,Maharashtra,61,0.5,6.704,6.829,Rice,0,-11.478,-0.201,0,1.0186,13.4084,1.0,11.4779,1,0,413,High
184
+ 183,Punjab,47,1.936,10.576,6.067,Millets,0,-24.033,-0.69,1,0.5737,5.4622,0.0,0.0,0,1,421,High
185
+ 184,Punjab,54,2.349,3.529,1.759,Sugarcane,1,-29.207,0.216,1,0.4983,1.5022,1.0,29.2074,0,1,300,High
186
+ 185,Maharashtra,44,0.775,8.224,1.403,Wheat,0,4.349,-0.953,2,0.1706,10.6072,0.2,0.0,1,0,444,High
187
+ 186,Punjab,62,9.975,9.7,1.007,Rice,0,-20.568,-0.911,0,0.1038,0.9724,1.0,20.5678,0,0,478,High
188
+ 187,Punjab,37,7.206,9.925,5.93,Millets,0,-11.343,-0.828,1,0.5975,1.3774,0.0,0.0,0,0,453,High
189
+ 188,Maharashtra,67,3.842,10.042,7.466,Cotton,0,2.337,1.053,1,0.7435,2.6138,0.5,0.0,1,0,455,High
190
+ 189,Maharashtra,45,2.287,11.595,3.729,Rice,0,-19.264,-3.0,1,0.3216,5.0706,1.0,19.2639,1,1,357,High
191
+ 190,Maharashtra,28,6.12,15.0,1.394,Wheat,0,-12.689,0.096,2,0.0929,2.451,0.2,2.5378,1,0,473,High
192
+ 191,Maharashtra,47,0.5,15.0,4.343,Millets,0,-12.249,-0.266,2,0.2895,30.0,0.0,0.0,1,0,433,High
193
+ 192,Punjab,37,4.689,7.244,3.116,Rice,0,-1.75,-1.981,0,0.4302,1.5448,1.0,1.7501,0,0,501,High
194
+ 193,Punjab,55,0.5,4.653,3.311,Rice,0,-3.139,0.01,0,0.7117,9.3053,1.0,3.1388,0,0,505,High
195
+ 194,Punjab,37,4.743,5.293,5.16,Millets,0,-15.302,0.176,0,0.9749,1.116,0.0,0.0,0,1,483,High
196
+ 195,Maharashtra,40,0.968,8.25,5.89,Rice,1,-11.045,0.29,0,0.714,8.5236,1.0,11.0453,1,1,300,High
197
+ 196,Maharashtra,25,6.289,9.193,1.33,Rice,0,-17.577,-2.952,0,0.1446,1.4618,1.0,17.5767,1,1,430,High
198
+ 197,Punjab,40,8.649,6.58,0.767,Wheat,0,-34.164,1.066,0,0.1166,0.7607,0.2,6.8328,0,1,505,High
199
+ 198,Punjab,25,0.5,4.319,7.957,Millets,1,-8.136,-1.038,0,1.8423,8.6387,0.0,0.0,0,1,300,High
200
+ 199,Punjab,26,1.863,8.458,2.245,Wheat,0,16.383,0.387,3,0.2655,4.5388,0.2,0.0,0,0,485,High
201
+ 200,Punjab,54,11.888,14.085,0.904,Millets,0,-25.256,0.441,0,0.0642,1.1848,0.0,0.0,0,1,561,High
202
+ 201,Punjab,54,1.982,15.0,1.924,Wheat,0,-23.595,-1.177,2,0.1283,7.57,0.2,4.7191,0,1,429,High
203
+ 202,Maharashtra,50,5.975,7.8,0.792,Rice,1,-25.061,0.36,0,0.1016,1.3053,1.0,25.0609,1,1,300,High
204
+ 203,Maharashtra,33,2.666,8.755,3.439,Millets,1,-1.131,-0.685,1,0.3928,3.2845,0.0,0.0,1,1,300,High
205
+ 204,Punjab,44,1.412,5.805,6.518,Cotton,0,-5.273,-2.371,2,1.1229,4.112,0.5,2.6364,0,1,352,High
206
+ 205,Punjab,45,1.01,11.88,3.059,Cotton,0,-14.378,0.868,0,0.2575,11.7657,0.5,7.189,0,0,541,High
207
+ 206,Maharashtra,31,0.682,6.18,3.831,Wheat,0,-25.77,-1.075,0,0.62,9.0671,0.2,5.1541,1,0,419,High
208
+ 207,Maharashtra,63,4.304,15.0,5.567,Cotton,0,-10.614,-1.154,0,0.3711,3.4852,0.5,5.3072,1,1,467,High
209
+ 208,Punjab,56,1.466,2.919,4.317,Rice,0,-35.469,-0.703,0,1.4787,1.9914,1.0,35.4693,0,1,345,High
210
+ 209,Maharashtra,42,2.148,9.137,6.961,Rice,1,-9.849,-0.028,2,0.7619,4.2538,1.0,9.8486,1,0,300,High
211
+ 210,Maharashtra,45,2.034,15.0,6.995,Cotton,0,1.073,-0.357,2,0.4664,7.3756,0.5,0.0,1,1,428,High
212
+ 211,Maharashtra,48,2.583,14.113,0.574,Sugarcane,0,-30.768,0.248,0,0.0407,5.4634,1.0,30.768,1,0,461,High
213
+ 212,Punjab,25,6.02,15.0,6.335,Wheat,0,-34.988,-1.639,0,0.4224,2.4916,0.2,6.9976,0,1,446,High
214
+ 213,Punjab,42,11.849,15.0,3.956,Millets,0,11.692,-1.042,0,0.2637,1.2659,0.0,0.0,0,0,591,High
215
+ 214,Maharashtra,37,1.571,5.456,7.916,Cotton,0,-21.176,-0.416,0,1.4509,3.4739,0.5,10.5882,1,0,381,High
216
+ 215,Punjab,33,5.272,11.287,4.124,Cotton,0,5.039,1.598,1,0.3654,2.1407,0.5,0.0,0,0,561,High
217
+ 216,Maharashtra,42,4.338,2.942,7.902,Rice,1,-14.31,-0.414,0,2.6861,0.6781,1.0,14.31,1,1,300,High
218
+ 217,Maharashtra,67,2.557,11.422,6.159,Rice,1,-14.429,0.785,1,0.5393,4.4675,1.0,14.4293,1,1,300,High
219
+ 218,Punjab,53,9.374,6.256,2.365,Cotton,0,-5.424,-0.261,0,0.378,0.6674,0.5,2.7119,0,0,524,High
220
+ 219,Punjab,38,0.671,15.0,4.538,Sugarcane,1,-25.26,-0.784,0,0.3025,22.3477,1.0,25.26,0,1,300,High
221
+ 220,Punjab,52,0.5,7.849,7.941,Millets,0,-10.013,-0.547,1,1.0117,15.6977,0.0,0.0,0,0,418,High
222
+ 221,Punjab,62,5.772,11.096,6.931,Millets,0,-17.722,-0.468,0,0.6247,1.9225,0.0,0.0,0,1,469,High
223
+ 222,Maharashtra,56,1.735,7.327,1.23,Rice,0,-31.807,0.304,3,0.1679,4.2232,1.0,31.8074,1,1,300,High
224
+ 223,Maharashtra,46,5.631,15.0,5.798,Millets,0,-6.938,1.075,2,0.3865,2.6637,0.0,0.0,1,0,453,High
225
+ 224,Maharashtra,37,6.707,9.422,3.092,Cotton,1,-15.95,0.06,0,0.3282,1.4047,0.5,7.9748,1,1,308,High
226
+ 225,Maharashtra,53,0.5,15.0,0.552,Rice,0,-14.355,0.887,0,0.0368,30.0,1.0,14.3554,1,0,544,High
227
+ 226,Maharashtra,50,6.449,15.0,3.526,Millets,0,-30.152,-1.265,2,0.2351,2.3261,0.0,0.0,1,1,381,High
228
+ 227,Punjab,56,1.784,15.0,2.261,Wheat,0,11.871,-0.715,2,0.1507,8.4064,0.2,0.0,0,0,517,High
229
+ 228,Maharashtra,53,2.143,15.0,6.642,Rice,0,1.151,-1.024,2,0.4428,7.0005,1.0,0.0,1,1,415,High
230
+ 229,Punjab,58,2.955,15.0,3.03,Cotton,0,2.462,0.014,0,0.202,5.0757,0.5,0.0,0,0,583,High
231
+ 230,Punjab,39,7.827,2.606,6.706,Cotton,0,-16.582,-0.659,3,2.5733,0.333,0.5,8.2908,0,1,300,High
232
+ 231,Punjab,61,0.5,9.746,0.504,Sugarcane,0,-37.938,0.43,0,0.0518,19.4927,1.0,37.9377,0,1,439,High
233
+ 232,Maharashtra,47,1.944,15.0,2.809,Wheat,0,17.294,-1.231,1,0.1872,7.7175,0.2,0.0,1,1,529,High
234
+ 233,Maharashtra,70,3.492,11.715,2.309,Millets,0,-12.916,-0.257,2,0.1971,3.3553,0.0,0.0,1,0,418,High
235
+ 234,Maharashtra,37,3.848,3.958,2.252,Rice,0,-23.232,0.387,0,0.5689,1.0287,1.0,23.232,1,1,424,High
236
+ 235,Maharashtra,66,3.538,11.682,1.011,Cotton,0,-5.748,-2.365,2,0.0866,3.3018,0.5,2.874,1,0,404,High
237
+ 236,Punjab,47,0.5,15.0,1.903,Wheat,0,5.507,1.822,0,0.1269,30.0,0.2,0.0,0,1,647,Medium
238
+ 237,Maharashtra,37,1.067,15.0,4.667,Wheat,0,-12.346,-0.583,3,0.3111,14.0524,0.2,2.4692,1,1,379,High
239
+ 238,Maharashtra,39,1.333,11.593,2.685,Cotton,0,7.179,-2.325,0,0.2316,8.6979,0.5,0.0,1,0,513,High
240
+ 239,Punjab,41,4.896,15.0,3.63,Sugarcane,0,4.245,-0.142,3,0.242,3.064,1.0,0.0,0,0,466,High
241
+ 240,Maharashtra,50,0.98,9.087,3.327,Millets,1,-28.146,-0.267,0,0.3661,9.2687,0.0,0.0,1,0,300,High
242
+ 241,Punjab,51,0.71,3.117,7.069,Millets,0,-22.107,-0.382,1,2.2679,4.3912,0.0,0.0,0,0,372,High
243
+ 242,Punjab,38,9.471,5.815,7.29,Sugarcane,0,2.363,0.691,1,1.2536,0.614,1.0,0.0,0,0,475,High
244
+ 243,Punjab,45,0.5,15.0,4.197,Millets,1,-52.689,0.447,0,0.2798,30.0,0.0,0.0,0,1,300,High
245
+ 244,Maharashtra,70,18.386,9.785,2.976,Wheat,0,-14.242,-0.002,0,0.3042,0.5322,0.2,2.8484,1,0,495,High
246
+ 245,Maharashtra,66,3.389,10.027,1.301,Sugarcane,0,-33.462,0.15,1,0.1297,2.959,1.0,33.4625,1,1,369,High
247
+ 246,Punjab,50,5.289,9.584,7.651,Cotton,0,-19.148,-0.404,0,0.7982,1.8121,0.5,9.5742,0,0,441,High
248
+ 247,Maharashtra,45,1.047,15.0,0.952,Cotton,1,-16.482,1.475,1,0.0634,14.3259,0.5,8.2412,1,0,339,High
249
+ 248,Punjab,46,0.5,15.0,2.732,Cotton,1,-17.374,-1.779,0,0.1822,30.0,0.5,8.6868,0,1,330,High
250
+ 249,Punjab,52,4.017,15.0,2.735,Wheat,0,-20.284,-0.16,3,0.1824,3.7344,0.2,4.0568,0,1,410,High
251
+ 250,Punjab,33,5.39,10.727,2.903,Cotton,0,-28.457,-0.235,0,0.2706,1.9902,0.5,14.2286,0,1,481,High
252
+ 251,Maharashtra,42,4.047,15.0,1.732,Millets,0,20.0,0.513,0,0.1155,3.7067,0.0,0.0,1,0,624,Medium
253
+ 252,Maharashtra,25,0.5,3.621,6.374,Cotton,1,16.012,-1.144,0,1.7603,7.2415,0.5,0.0,1,1,300,High
254
+ 253,Punjab,50,4.2,15.0,1.419,Rice,1,-29.431,-2.044,0,0.0946,3.5712,1.0,29.431,0,1,300,High
255
+ 254,Maharashtra,53,4.395,4.786,5.262,Wheat,0,11.732,-0.143,0,1.0993,1.0891,0.2,0.0,1,1,493,High
256
+ 255,Maharashtra,39,3.224,14.489,1.429,Rice,0,-17.992,-0.019,0,0.0986,4.4948,1.0,17.992,1,0,503,High
257
+ 256,Maharashtra,64,4.359,5.064,1.029,Rice,0,-10.062,1.19,2,0.2032,1.1618,1.0,10.0622,1,1,415,High
258
+ 257,Punjab,30,5.611,7.606,7.321,Rice,0,-12.949,-1.57,1,0.9625,1.3555,1.0,12.9491,0,0,387,High
259
+ 258,Punjab,27,2.853,6.235,1.926,Wheat,0,-21.896,0.855,1,0.3089,2.1857,0.2,4.3792,0,1,477,High
260
+ 259,Maharashtra,48,0.5,7.491,6.659,Cotton,0,2.758,2.0,0,0.889,14.982,0.5,0.0,1,0,518,High
261
+ 260,Maharashtra,58,2.006,7.915,4.585,Sugarcane,0,-10.112,-0.678,1,0.5793,3.9452,1.0,10.1117,1,0,399,High
262
+ 261,Punjab,65,0.5,7.857,1.084,Sugarcane,0,-19.148,-1.591,0,0.138,15.7137,1.0,19.1483,0,1,452,High
263
+ 262,Punjab,39,1.57,15.0,7.666,Cotton,1,-31.569,-0.707,1,0.5111,9.5515,0.5,15.7844,0,1,300,High
264
+ 263,Maharashtra,58,1.568,5.033,2.352,Cotton,0,-25.404,-0.286,0,0.4673,3.2097,0.5,12.702,1,1,417,High
265
+ 264,Maharashtra,45,0.5,14.533,6.947,Cotton,0,-36.621,0.264,0,0.478,29.0663,0.5,18.3104,1,1,413,High
266
+ 265,Punjab,43,1.287,15.0,1.766,Sugarcane,0,-11.817,-0.891,0,0.1177,11.6558,1.0,11.8166,0,0,536,High
267
+ 266,Punjab,56,0.5,8.08,6.905,Rice,1,-29.95,1.255,2,0.8545,16.1608,1.0,29.95,0,1,300,High
268
+ 267,Punjab,53,4.954,6.86,0.599,Rice,0,-15.983,-1.415,0,0.0874,1.3846,1.0,15.9834,0,0,474,High
269
+ 268,Punjab,26,8.852,10.131,4.338,Sugarcane,0,8.552,-2.039,1,0.4282,1.1445,1.0,0.0,0,1,497,High
270
+ 269,Maharashtra,63,0.5,15.0,6.271,Wheat,0,5.989,0.807,0,0.4181,30.0,0.2,0.0,1,0,546,High
271
+ 270,Maharashtra,62,9.311,14.229,7.511,Rice,0,-12.484,-2.575,1,0.5279,1.5282,1.0,12.4842,1,0,364,High
272
+ 271,Punjab,37,2.218,7.965,7.319,Rice,0,-13.306,-0.504,2,0.9189,3.5909,1.0,13.3063,0,1,361,High
273
+ 272,Punjab,50,1.068,15.0,6.647,Millets,0,16.198,2.0,0,0.4431,14.0428,0.0,0.0,0,0,618,Medium
274
+ 273,Punjab,51,0.5,5.044,7.161,Millets,1,-4.189,-0.312,0,1.4198,10.0877,0.0,0.0,0,0,300,High
275
+ 274,Punjab,48,2.083,15.0,1.994,Sugarcane,0,-16.917,-1.421,2,0.1329,7.2005,1.0,16.9171,0,1,420,High
276
+ 275,Maharashtra,38,4.747,15.0,2.631,Wheat,0,-33.39,-0.357,1,0.1754,3.1598,0.2,6.6781,1,1,435,High
277
+ 276,Maharashtra,37,3.684,9.523,2.667,Wheat,0,-6.092,-0.351,0,0.2801,2.5853,0.2,1.2184,1,0,511,High
278
+ 277,Punjab,45,0.5,6.228,3.328,Millets,0,0.44,-0.139,1,0.5343,12.4569,0.0,0.0,0,0,490,High
279
+ 278,Punjab,59,0.5,5.993,3.45,Millets,0,-21.475,0.362,1,0.5756,11.9868,0.0,0.0,0,1,443,High
280
+ 279,Punjab,52,1.547,15.0,4.584,Rice,0,-7.632,-1.339,0,0.3056,9.697,1.0,7.632,0,0,510,High
281
+ 280,Punjab,41,1.05,15.0,1.699,Sugarcane,0,-17.454,1.388,2,0.1133,14.287,1.0,17.4536,0,0,479,High
282
+ 281,Punjab,54,0.793,7.317,5.684,Rice,0,-14.76,-0.055,0,0.7769,9.2219,1.0,14.7605,0,0,450,High
283
+ 282,Maharashtra,25,0.99,15.0,1.757,Rice,0,-49.317,0.427,0,0.1171,15.1561,1.0,49.3173,1,1,400,High
284
+ 283,Maharashtra,59,4.881,2.294,2.827,Wheat,0,-15.327,-0.928,1,1.2324,0.47,0.2,3.0653,1,1,382,High
285
+ 284,Maharashtra,25,7.945,7.632,4.275,Cotton,0,2.541,0.986,0,0.5602,0.9606,0.5,0.0,1,0,540,High
286
+ 285,Maharashtra,41,1.558,11.884,6.473,Millets,1,-21.471,-0.557,0,0.5447,7.6269,0.0,0.0,1,1,300,High
287
+ 286,Maharashtra,32,7.097,5.884,6.046,Rice,0,-11.212,-0.022,1,1.0275,0.8291,1.0,11.2121,1,0,398,High
288
+ 287,Maharashtra,29,1.164,5.759,5.342,Wheat,0,-23.339,-1.233,2,0.9275,4.9495,0.2,4.6679,1,1,323,High
289
+ 288,Maharashtra,59,1.941,7.14,1.668,Millets,0,-6.593,-1.297,2,0.2336,3.6782,0.0,0.0,1,0,397,High
290
+ 289,Maharashtra,39,0.769,15.0,4.603,Millets,0,-15.248,0.388,3,0.3069,19.5144,0.0,0.0,1,0,397,High
291
+ 290,Maharashtra,49,3.069,10.487,1.156,Rice,0,-26.089,-0.744,2,0.1102,3.4172,1.0,26.0886,1,1,352,High
292
+ 291,Maharashtra,44,11.587,2.033,3.33,Cotton,1,7.988,-1.154,0,1.6382,0.1754,0.5,0.0,1,1,304,High
293
+ 292,Maharashtra,51,2.775,2.233,3.601,Wheat,0,1.934,-0.943,0,1.6126,0.8047,0.2,0.0,1,0,457,High
294
+ 293,Punjab,46,1.329,7.497,0.799,Rice,0,-21.074,0.399,2,0.1065,5.6427,1.0,21.0736,0,1,410,High
295
+ 294,Maharashtra,30,3.131,15.0,2.555,Millets,0,-4.533,-0.929,0,0.1703,4.7911,0.0,0.0,1,0,541,High
296
+ 295,Maharashtra,57,0.5,1.353,7.667,Millets,0,-3.939,-0.418,1,5.6688,2.7051,0.0,0.0,1,0,352,High
297
+ 296,Maharashtra,39,6.585,8.168,7.652,Rice,0,-2.365,-0.285,1,0.9369,1.2403,1.0,2.3655,1,0,419,High
298
+ 297,Punjab,26,2.098,7.996,3.142,Rice,0,-37.414,-2.217,0,0.393,3.8115,1.0,37.4138,0,1,368,High
299
+ 298,Maharashtra,40,1.79,15.0,0.823,Rice,0,3.099,-1.771,2,0.0549,8.38,1.0,0.0,1,1,471,High
300
+ 299,Punjab,63,2.645,8.953,1.843,Millets,1,-20.545,0.036,1,0.2059,3.3853,0.0,0.0,0,0,300,High
301
+ 300,Maharashtra,55,2.941,15.0,3.442,Rice,0,-17.367,-1.037,0,0.2294,5.1007,1.0,17.3674,1,0,460,High
302
+ 301,Maharashtra,41,0.5,13.64,7.608,Cotton,0,20.0,0.757,3,0.5578,27.28,0.5,0.0,1,0,441,High
303
+ 302,Maharashtra,41,3.443,2.216,1.559,Cotton,0,-7.472,0.667,0,0.7036,0.6435,0.5,3.7359,1,0,491,High
304
+ 303,Maharashtra,41,0.831,15.0,6.226,Wheat,0,-17.795,0.419,0,0.4151,18.0517,0.2,3.559,1,0,490,High
305
+ 304,Punjab,70,3.755,14.473,1.315,Rice,0,-45.079,1.52,1,0.0909,3.8547,1.0,45.0794,0,0,404,High
306
+ 305,Punjab,50,5.187,15.0,7.859,Rice,0,8.846,-0.383,2,0.524,2.8919,1.0,0.0,0,1,464,High
307
+ 306,Punjab,50,4.888,15.0,3.362,Millets,1,-32.178,0.349,1,0.2241,3.0686,0.0,0.0,0,1,301,High
308
+ 307,Maharashtra,57,2.412,2.3,6.314,Millets,1,-27.052,-0.884,1,2.7459,0.9533,0.0,0.0,1,1,300,High
309
+ 308,Maharashtra,48,2.203,15.0,3.069,Sugarcane,1,-16.97,2.0,1,0.2046,6.809,1.0,16.9703,1,1,309,High
310
+ 309,Punjab,42,0.5,9.68,5.208,Rice,0,9.246,1.684,0,0.538,19.3596,1.0,0.0,0,0,587,High
311
+ 310,Maharashtra,43,4.48,15.0,1.94,Cotton,0,-0.401,-0.288,2,0.1293,3.3485,0.5,0.2007,1,0,481,High
312
+ 311,Maharashtra,44,0.95,11.747,1.595,Wheat,0,-14.368,0.087,2,0.1358,12.3661,0.2,2.8735,1,1,438,High
313
+ 312,Maharashtra,45,2.06,8.676,7.535,Cotton,0,-7.376,1.059,0,0.8685,4.2125,0.5,3.6878,1,0,470,High
314
+ 313,Maharashtra,54,1.003,7.722,7.382,Millets,0,-21.006,-0.447,0,0.956,7.6965,0.0,0.0,1,1,410,High
315
+ 314,Punjab,46,0.5,15.0,7.156,Wheat,0,-9.905,-0.957,3,0.4771,30.0,0.2,1.981,0,0,381,High
316
+ 315,Punjab,54,2.979,3.619,5.191,Rice,0,-10.9,0.574,2,1.4342,1.2148,1.0,10.8999,0,0,379,High
317
+ 316,Punjab,44,0.5,15.0,6.562,Millets,0,2.532,-0.222,2,0.4375,30.0,0.0,0.0,0,0,473,High
318
+ 317,Maharashtra,46,4.143,8.732,1.018,Millets,0,2.508,-0.117,2,0.1166,2.1079,0.0,0.0,1,1,464,High
319
+ 318,Maharashtra,25,1.146,4.933,3.011,Rice,0,-4.59,-1.134,1,0.6104,4.3032,1.0,4.5903,1,1,427,High
320
+ 319,Maharashtra,56,0.5,8.499,2.853,Wheat,0,-17.435,-2.018,1,0.3356,16.9987,0.2,3.487,1,0,394,High
321
+ 320,Maharashtra,49,2.147,15.0,5.267,Cotton,0,-0.873,-0.064,1,0.3512,6.9866,0.5,0.4363,1,0,485,High
322
+ 321,Maharashtra,57,0.5,7.939,3.17,Cotton,0,-13.38,0.605,0,0.3993,15.8771,0.5,6.6898,1,0,481,High
323
+ 322,Punjab,25,0.97,15.0,1.614,Rice,0,-28.229,-0.526,1,0.1076,15.4704,1.0,28.2287,0,1,452,High
324
+ 323,Punjab,70,3.683,6.789,4.974,Wheat,0,-18.049,1.136,1,0.7326,1.8435,0.2,3.6099,0,0,442,High
325
+ 324,Maharashtra,43,0.5,15.0,6.608,Millets,0,-10.732,-1.004,1,0.4405,30.0,0.0,0.0,1,0,442,High
326
+ 325,Punjab,58,5.485,15.0,3.366,Wheat,0,1.653,-1.355,1,0.2244,2.7345,0.2,0.0,0,0,514,High
327
+ 326,Punjab,33,0.5,15.0,1.492,Rice,0,-14.753,-0.367,0,0.0995,30.0,1.0,14.7529,0,0,548,High
328
+ 327,Maharashtra,52,0.85,10.586,1.975,Wheat,0,-30.138,-0.383,0,0.1866,12.4489,0.2,6.0276,1,1,457,High
329
+ 328,Punjab,32,4.052,15.0,2.281,Cotton,0,-11.149,0.47,0,0.1521,3.7022,0.5,5.5744,0,0,576,High
330
+ 329,Maharashtra,38,1.141,13.177,2.749,Millets,0,-10.298,-1.075,0,0.2086,11.5527,0.0,0.0,1,0,509,High
331
+ 330,Maharashtra,68,0.5,15.0,5.321,Cotton,0,-9.212,1.068,0,0.3547,30.0,0.5,4.6062,1,0,518,High
332
+ 331,Maharashtra,43,1.34,6.855,5.007,Rice,1,1.798,1.667,3,0.7305,5.1156,1.0,0.0,1,1,300,High
333
+ 332,Punjab,48,0.946,15.0,5.721,Rice,0,3.284,-0.339,0,0.3814,15.8604,1.0,0.0,0,0,556,High
334
+ 333,Maharashtra,55,5.549,10.425,3.219,Sugarcane,0,-20.913,0.95,0,0.3087,1.8788,1.0,20.9132,1,1,463,High
335
+ 334,Maharashtra,51,1.128,11.573,6.68,Cotton,0,-21.242,-1.356,1,0.5772,10.2615,0.5,10.6211,1,0,365,High
336
+ 335,Maharashtra,47,4.667,13.11,2.031,Sugarcane,0,-27.603,0.775,1,0.1549,2.8093,1.0,27.603,1,0,424,High
337
+ 336,Maharashtra,49,6.673,14.906,4.018,Rice,0,-1.518,0.747,0,0.2695,2.2337,1.0,1.5178,1,0,554,High
338
+ 337,Punjab,70,1.707,11.101,6.507,Cotton,0,9.732,0.563,1,0.5862,6.5049,0.5,0.0,0,1,504,High
339
+ 338,Punjab,44,7.222,14.466,1.851,Wheat,1,-16.726,-0.316,1,0.128,2.003,0.2,3.3452,0,1,334,High
340
+ 339,Maharashtra,47,1.421,15.0,1.324,Millets,0,-15.621,-3.0,0,0.0883,10.5548,0.0,0.0,1,1,482,High
341
+ 340,Maharashtra,58,9.979,15.0,7.128,Millets,0,10.002,-0.942,0,0.4752,1.5031,0.0,0.0,1,1,517,High
342
+ 341,Maharashtra,58,0.5,15.0,3.072,Rice,0,-4.417,-0.926,2,0.2048,30.0,1.0,4.4166,1,0,437,High
343
+ 342,Maharashtra,59,3.485,8.462,5.629,Cotton,1,-5.456,-1.278,2,0.6652,2.4282,0.5,2.7282,1,1,300,High
344
+ 343,Maharashtra,53,2.043,5.981,0.69,Rice,0,-29.864,-0.178,1,0.1154,2.9283,1.0,29.8637,1,0,366,High
345
+ 344,Maharashtra,31,1.471,15.0,5.675,Wheat,0,-1.819,-0.719,0,0.3784,10.1947,0.2,0.3638,1,0,517,High
346
+ 345,Maharashtra,65,3.005,15.0,2.871,Wheat,0,-25.937,-1.125,0,0.1914,4.992,0.2,5.1874,1,0,461,High
347
+ 346,Punjab,31,3.651,15.0,0.918,Millets,0,-29.01,-1.359,1,0.0612,4.1088,0.0,0.0,0,0,486,High
348
+ 347,Punjab,49,0.5,7.514,5.074,Millets,0,-17.202,-1.016,0,0.6752,15.0287,0.0,0.0,0,0,464,High
349
+ 348,Maharashtra,36,0.548,10.139,2.306,Cotton,0,-20.787,0.821,0,0.2274,18.5014,0.5,10.3934,1,0,496,High
350
+ 349,Maharashtra,44,3.745,3.282,3.401,Wheat,0,-15.324,-0.961,1,1.0363,0.8763,0.2,3.0648,1,0,388,High
351
+ 350,Punjab,49,3.293,8.9,1.104,Millets,0,-33.615,-0.815,0,0.1241,2.7024,0.0,0.0,0,0,482,High
352
+ 351,Maharashtra,49,10.148,15.0,1.604,Sugarcane,1,2.382,-0.757,1,0.1069,1.4781,1.0,0.0,1,0,348,High
353
+ 352,Punjab,50,4.294,8.388,2.735,Rice,0,4.915,0.039,2,0.326,1.9533,1.0,0.0,0,0,478,High
354
+ 353,Punjab,64,9.034,15.0,1.173,Cotton,1,-41.21,0.156,0,0.0782,1.6604,0.5,20.6051,0,1,304,High
355
+ 354,Maharashtra,50,3.637,10.46,7.331,Cotton,0,2.677,-3.0,2,0.7009,2.8758,0.5,0.0,1,1,350,High
356
+ 355,Maharashtra,42,1.062,15.0,0.545,Rice,0,-24.158,0.722,0,0.0364,14.1284,1.0,24.1579,1,1,505,High
357
+ 356,Punjab,57,0.5,4.864,4.129,Rice,0,0.855,1.136,2,0.8489,9.7279,1.0,0.0,0,0,450,High
358
+ 357,Maharashtra,59,4.567,13.042,1.424,Rice,0,-13.027,-1.35,0,0.1092,2.8555,1.0,13.0267,1,0,479,High
359
+ 358,Maharashtra,30,3.1,1.113,2.808,Wheat,0,-11.568,-1.272,0,2.5225,0.3591,0.2,2.3137,1,0,429,High
360
+ 359,Punjab,52,0.5,10.491,7.445,Cotton,0,-14.776,-0.75,1,0.7097,20.9813,0.5,7.3882,0,0,413,High
361
+ 360,Maharashtra,53,1.339,3.306,1.713,Rice,0,6.182,-1.056,0,0.5181,2.4685,1.0,0.0,1,0,490,High
362
+ 361,Maharashtra,41,9.426,15.0,7.744,Rice,0,-30.594,-0.076,2,0.5162,1.5914,1.0,30.5938,1,1,315,High
363
+ 362,Punjab,62,2.082,15.0,2.043,Sugarcane,0,-2.882,-2.247,0,0.1362,7.2051,1.0,2.8824,0,0,532,High
364
+ 363,Maharashtra,43,1.701,15.0,6.062,Millets,0,4.52,-1.418,0,0.4041,8.8196,0.0,0.0,1,0,508,High
365
+ 364,Maharashtra,47,1.836,15.0,4.6,Wheat,0,-1.255,1.239,1,0.3067,8.1708,0.2,0.251,1,0,518,High
366
+ 365,Punjab,43,0.703,5.702,7.134,Cotton,0,20.0,-1.228,0,1.251,8.1122,0.5,0.0,0,0,507,High
367
+ 366,Maharashtra,45,1.38,15.0,4.655,Millets,1,-19.934,0.943,0,0.3103,10.8699,0.0,0.0,1,1,338,High
368
+ 367,Punjab,32,1.385,15.0,4.509,Rice,0,2.36,0.055,1,0.3006,10.8286,1.0,0.0,0,0,541,High
369
+ 368,Punjab,28,0.5,10.082,1.966,Rice,0,-13.591,-2.109,1,0.195,20.1641,1.0,13.5914,0,0,446,High
370
+ 369,Maharashtra,64,4.377,15.0,1.747,Cotton,0,6.501,0.335,2,0.1164,3.4266,0.5,0.0,1,1,499,High
371
+ 370,Maharashtra,35,1.616,5.028,7.374,Rice,0,-12.115,-0.418,3,1.4666,3.1109,1.0,12.1153,1,1,300,High
372
+ 371,Maharashtra,33,5.181,6.299,2.959,Cotton,1,-17.818,-0.755,0,0.4697,1.2158,0.5,8.9091,1,1,300,High
373
+ 372,Maharashtra,25,5.698,7.487,3.291,Millets,0,7.591,-0.055,1,0.4395,1.3138,0.0,0.0,1,0,498,High
374
+ 373,Maharashtra,37,0.715,7.979,6.199,Wheat,0,-19.373,0.175,0,0.7769,11.1634,0.2,3.8747,1,0,442,High
375
+ 374,Punjab,29,3.213,5.232,3.041,Cotton,0,-33.191,0.408,1,0.5813,1.6282,0.5,16.5954,0,1,406,High
376
+ 375,Maharashtra,65,1.918,15.0,7.64,Millets,0,-19.753,0.878,0,0.5094,7.8224,0.0,0.0,1,1,472,High
377
+ 376,Maharashtra,57,6.365,9.904,6.034,Rice,1,-2.715,0.108,3,0.6093,1.556,1.0,2.7145,1,1,300,High
378
+ 377,Punjab,37,0.729,15.0,4.981,Rice,0,8.881,-1.676,1,0.332,20.5748,1.0,0.0,0,1,516,High
379
+ 378,Maharashtra,70,3.398,7.719,7.107,Wheat,0,-10.333,-0.774,3,0.9206,2.2718,0.2,2.0666,1,1,300,High
380
+ 379,Punjab,57,2.808,2.839,0.872,Wheat,0,7.773,2.0,2,0.3071,1.0113,0.2,0.0,0,1,506,High
381
+ 380,Maharashtra,41,1.05,15.0,2.428,Rice,0,-32.373,0.424,2,0.1619,14.2863,1.0,32.3726,1,1,367,High
382
+ 381,Maharashtra,25,0.5,2.638,3.988,Cotton,0,-18.649,2.0,2,1.5114,5.2769,0.5,9.3245,1,0,383,High
383
+ 382,Punjab,70,3.164,11.532,2.202,Wheat,0,-16.329,1.095,0,0.191,3.6451,0.2,3.2657,0,1,542,High
384
+ 383,Punjab,28,4.025,4.077,6.079,Wheat,0,-13.718,-0.058,0,1.4911,1.0129,0.2,2.7437,0,0,464,High
385
+ 384,Punjab,25,1.138,15.0,7.394,Wheat,1,-10.739,0.001,0,0.4929,13.1838,0.2,2.1477,0,1,347,High
386
+ 385,Punjab,57,3.105,15.0,3.678,Cotton,0,-1.636,-0.337,0,0.2452,4.8301,0.5,0.8182,0,0,561,High
387
+ 386,Punjab,70,1.508,13.258,3.066,Rice,0,-18.672,-2.038,1,0.2313,8.7905,1.0,18.6721,0,0,410,High
388
+ 387,Maharashtra,62,3.747,15.0,7.712,Cotton,0,-9.915,-0.282,1,0.5141,4.0032,0.5,4.9573,1,1,423,High
389
+ 388,Maharashtra,52,0.666,6.19,3.836,Rice,1,-12.677,0.911,1,0.6198,9.2876,1.0,12.6768,1,1,300,High
390
+ 389,Punjab,52,6.628,15.0,4.168,Millets,0,-25.888,-0.9,3,0.2779,2.2632,0.0,0.0,0,0,378,High
391
+ 390,Punjab,55,1.017,14.294,3.137,Wheat,0,-13.705,0.112,2,0.2195,14.0615,0.2,2.741,0,0,462,High
392
+ 391,Punjab,54,1.376,15.0,7.322,Cotton,0,-14.155,0.552,0,0.4881,10.9045,0.5,7.0774,0,0,504,High
393
+ 392,Maharashtra,48,0.5,15.0,4.767,Sugarcane,0,-14.476,-1.21,0,0.3178,30.0,1.0,14.4762,1,1,462,High
394
+ 393,Maharashtra,46,0.5,15.0,6.216,Wheat,0,-11.524,-0.751,0,0.4144,30.0,0.2,2.3047,1,1,484,High
395
+ 394,Punjab,44,2.176,15.0,6.589,Cotton,0,-10.865,-1.318,0,0.4392,6.8929,0.5,5.4324,0,0,490,High
396
+ 395,Maharashtra,36,0.934,3.242,3.064,Sugarcane,0,-18.484,-1.122,1,0.9451,3.4698,1.0,18.4844,1,1,357,High
397
+ 396,Punjab,42,5.414,5.652,3.753,Millets,0,7.091,-1.588,1,0.664,1.0439,0.0,0.0,0,0,472,High
398
+ 397,Punjab,25,0.5,11.043,6.864,Wheat,0,-29.542,-1.2,1,0.6215,22.0868,0.2,5.9084,0,1,399,High
399
+ 398,Maharashtra,44,1.43,13.127,3.224,Rice,1,-22.815,1.119,2,0.2456,9.1817,1.0,22.8146,1,1,300,High
400
+ 399,Punjab,33,1.235,4.932,6.455,Wheat,1,20.0,-1.215,2,1.3086,3.9955,0.2,0.0,0,0,300,High
401
+ 400,Punjab,32,0.5,15.0,7.557,Sugarcane,0,-27.57,-0.174,0,0.5038,30.0,1.0,27.5699,0,1,440,High
402
+ 401,Maharashtra,47,0.5,15.0,5.174,Rice,0,-32.306,-0.803,1,0.3449,30.0,1.0,32.3063,1,0,357,High
403
+ 402,Punjab,62,1.601,15.0,6.062,Rice,0,-0.983,0.879,0,0.4041,9.3663,1.0,0.9828,0,0,557,High
404
+ 403,Maharashtra,56,2.037,12.905,6.538,Millets,0,-43.157,1.011,0,0.5066,6.3356,0.0,0.0,1,0,429,High
405
+ 404,Punjab,26,1.554,10.28,6.838,Rice,0,-15.529,0.564,0,0.6651,6.6154,1.0,15.5291,0,0,478,High
406
+ 405,Maharashtra,33,2.271,5.689,3.463,Sugarcane,0,20.0,0.006,0,0.6087,2.5048,1.0,0.0,1,0,546,High
407
+ 406,Punjab,56,2.713,12.962,0.884,Wheat,0,-35.174,-0.531,0,0.0682,4.7783,0.2,7.0348,0,0,493,High
408
+ 407,Maharashtra,33,0.5,14.972,3.514,Cotton,0,-41.729,-1.492,0,0.2347,29.9446,0.5,20.8647,1,0,408,High
409
+ 408,Maharashtra,42,1.871,4.511,5.553,Rice,0,-34.488,1.644,1,1.2309,2.4107,1.0,34.4877,1,1,328,High
410
+ 409,Punjab,52,9.931,15.0,3.878,Sugarcane,0,1.475,-1.06,1,0.2585,1.5104,1.0,0.0,0,0,521,High
411
+ 410,Maharashtra,33,2.196,10.76,6.117,Cotton,0,4.872,0.364,0,0.5685,4.8999,0.5,0.0,1,0,522,High
412
+ 411,Maharashtra,46,3.395,2.648,3.177,Wheat,0,-19.689,0.76,0,1.2,0.7799,0.2,3.9378,1,1,448,High
413
+ 412,Punjab,29,1.121,6.121,5.261,Wheat,0,-1.752,-0.855,2,0.8595,5.4586,0.2,0.3504,0,1,416,High
414
+ 413,Punjab,38,4.462,8.751,1.898,Sugarcane,0,8.854,0.738,0,0.2169,1.9613,1.0,0.0,0,0,599,High
415
+ 414,Maharashtra,49,4.447,15.0,6.12,Millets,0,14.81,0.464,2,0.408,3.3728,0.0,0.0,1,0,482,High
416
+ 415,Punjab,26,2.21,15.0,4.593,Wheat,0,-15.695,1.428,1,0.3062,6.7873,0.2,3.139,0,0,526,High
417
+ 416,Maharashtra,50,11.191,4.185,2.03,Cotton,1,-46.522,-0.769,0,0.4851,0.374,0.5,23.261,1,1,300,High
418
+ 417,Maharashtra,45,0.5,15.0,2.689,Millets,0,-24.313,-1.586,0,0.1793,30.0,0.0,0.0,1,0,482,High
419
+ 418,Maharashtra,52,0.5,3.533,6.115,Wheat,0,-18.402,-0.805,0,1.7307,7.0661,0.2,3.6804,1,0,390,High
420
+ 419,Punjab,48,4.411,15.0,4.12,Cotton,0,-15.884,-0.091,0,0.2746,3.4005,0.5,7.942,0,0,524,High
421
+ 420,Punjab,61,4.938,8.357,2.12,Rice,1,-14.818,-0.242,0,0.2537,1.6925,1.0,14.8179,0,0,312,High
422
+ 421,Punjab,47,0.5,11.303,7.755,Sugarcane,1,4.783,-0.693,1,0.686,22.6065,1.0,0.0,0,1,300,High
423
+ 422,Punjab,40,0.926,15.0,5.863,Cotton,0,7.116,-2.209,0,0.3909,16.1981,0.5,0.0,0,0,532,High
424
+ 423,Maharashtra,46,0.5,4.35,7.679,Wheat,1,-14.575,0.17,1,1.765,8.7008,0.2,2.915,1,1,300,High
425
+ 424,Maharashtra,52,1.041,3.984,3.703,Wheat,0,4.477,1.672,1,0.9295,3.8254,0.2,0.0,1,0,481,High
426
+ 425,Maharashtra,46,4.45,7.638,4.063,Rice,0,-6.635,0.164,0,0.532,1.7163,1.0,6.6351,1,0,481,High
427
+ 426,Maharashtra,45,2.189,15.0,7.235,Wheat,0,-11.032,0.309,0,0.4823,6.8519,0.2,2.2065,1,0,490,High
428
+ 427,Maharashtra,37,1.284,3.613,4.438,Rice,0,1.598,0.272,0,1.2283,2.8148,1.0,0.0,1,0,485,High
429
+ 428,Punjab,37,1.394,1.264,5.805,Cotton,1,-10.916,0.097,0,4.5923,0.9065,0.5,5.4581,0,1,300,High
430
+ 429,Maharashtra,28,0.5,8.492,2.391,Wheat,0,18.867,0.632,1,0.2816,16.9831,0.2,0.0,1,0,547,High
431
+ 430,Maharashtra,66,1.069,15.0,3.85,Cotton,1,-33.576,0.095,0,0.2567,14.0296,0.5,16.7881,1,1,300,High
432
+ 431,Maharashtra,30,3.119,15.0,1.426,Sugarcane,0,-19.728,-0.613,1,0.0951,4.8088,1.0,19.7276,1,0,452,High
433
+ 432,Punjab,37,10.971,8.41,2.045,Sugarcane,0,-13.898,-1.096,0,0.2431,0.7666,1.0,13.8978,0,0,496,High
434
+ 433,Punjab,36,5.633,8.766,0.507,Sugarcane,0,-5.408,-0.549,0,0.0578,1.5561,1.0,5.4082,0,0,552,High
435
+ 434,Maharashtra,56,0.5,15.0,0.794,Rice,0,7.019,0.014,1,0.053,30.0,1.0,0.0,1,0,552,High
436
+ 435,Maharashtra,41,6.865,2.73,7.83,Rice,0,-12.366,-0.616,1,2.8683,0.3976,1.0,12.366,1,0,337,High
437
+ 436,Punjab,60,4.586,8.928,2.318,Wheat,0,-33.333,0.014,0,0.2596,1.9466,0.2,6.6667,0,0,470,High
438
+ 437,Maharashtra,37,4.548,14.187,5.475,Millets,1,0.638,0.139,0,0.3859,3.1198,0.0,0.0,1,1,358,High
439
+ 438,Punjab,48,1.837,15.0,6.793,Sugarcane,0,-0.676,0.533,1,0.4529,8.1635,1.0,0.6756,0,0,510,High
440
+ 439,Punjab,35,1.523,8.102,4.63,Sugarcane,0,-41.128,0.983,0,0.5714,5.3217,1.0,41.1279,0,0,395,High
441
+ 440,Maharashtra,70,1.083,12.523,1.649,Cotton,0,-12.057,-0.222,0,0.1316,11.5679,0.5,6.0285,1,0,503,High
442
+ 441,Maharashtra,31,0.5,1.664,5.961,Cotton,0,-35.852,-1.608,1,3.5818,3.3284,0.5,17.9261,1,1,300,High
443
+ 442,Punjab,49,0.777,7.195,5.002,Wheat,1,-21.97,-0.645,0,0.6952,9.2574,0.2,4.394,0,1,300,High
444
+ 443,Maharashtra,53,0.849,15.0,5.984,Rice,0,-25.542,-0.256,1,0.399,17.6576,1.0,25.5421,1,1,379,High
445
+ 444,Maharashtra,50,1.985,5.552,6.273,Rice,0,0.139,-2.136,1,1.1299,2.7964,1.0,0.0,1,1,382,High
446
+ 445,Punjab,43,4.128,12.771,7.816,Millets,0,-10.248,1.089,1,0.612,3.0935,0.0,0.0,0,0,483,High
447
+ 446,Punjab,43,1.926,15.0,4.802,Rice,0,-31.284,-0.158,1,0.3201,7.787,1.0,31.2839,0,0,404,High
448
+ 447,Punjab,46,0.5,9.262,3.062,Rice,0,1.201,0.081,1,0.3306,18.5248,1.0,0.0,0,0,516,High
449
+ 448,Punjab,43,9.495,13.962,5.363,Rice,0,-33.507,1.066,1,0.3841,1.4705,1.0,33.5071,0,1,414,High
450
+ 449,Maharashtra,57,8.58,5.64,1.013,Millets,0,-7.048,-0.93,2,0.1797,0.6573,0.0,0.0,1,1,410,High
451
+ 450,Maharashtra,70,4.614,10.326,7.23,Wheat,0,-24.21,0.274,0,0.7002,2.2381,0.2,4.842,1,1,419,High
452
+ 451,Punjab,38,14.243,15.0,1.395,Wheat,0,-17.485,-0.41,0,0.093,1.0532,0.2,3.497,0,0,566,High
453
+ 452,Maharashtra,29,2.359,13.813,2.959,Millets,0,-4.436,-0.484,1,0.2142,5.8554,0.0,0.0,1,0,498,High
454
+ 453,Maharashtra,44,9.872,7.62,6.618,Cotton,0,-4.178,-1.072,1,0.8685,0.7719,0.5,2.0891,1,1,410,High
455
+ 454,Punjab,70,0.5,14.576,4.98,Wheat,0,8.055,1.366,0,0.3416,29.1519,0.2,0.0,0,0,597,High
456
+ 455,Maharashtra,35,1.366,15.0,3.452,Rice,0,-13.234,-0.676,2,0.2302,10.9841,1.0,13.2338,1,0,411,High
457
+ 456,Maharashtra,65,0.766,2.363,4.051,Rice,0,-7.403,0.399,0,1.7141,3.0846,1.0,7.4032,1,0,437,High
458
+ 457,Maharashtra,65,0.654,15.0,6.909,Sugarcane,1,-18.566,-2.175,1,0.4606,22.9412,1.0,18.5661,1,0,300,High
459
+ 458,Maharashtra,38,0.5,9.309,3.05,Sugarcane,0,-9.27,0.88,1,0.3276,18.6183,1.0,9.2702,1,1,469,High
460
+ 459,Maharashtra,52,2.922,15.0,7.022,Cotton,0,-5.408,0.752,3,0.4682,5.1337,0.5,2.7039,1,0,387,High
461
+ 460,Maharashtra,65,4.56,15.0,1.161,Cotton,1,-13.475,-0.203,0,0.0774,3.2891,0.5,6.7373,1,1,345,High
462
+ 461,Maharashtra,40,2.59,4.066,6.326,Wheat,0,-39.056,-0.527,1,1.5558,1.5697,0.2,7.8113,1,1,312,High
463
+ 462,Punjab,43,0.5,6.906,6.857,Rice,0,-7.028,0.1,0,0.9928,13.8128,1.0,7.0279,0,0,475,High
464
+ 463,Punjab,38,5.0,9.671,1.864,Rice,0,-6.532,1.989,0,0.1927,1.9343,1.0,6.5316,0,0,585,High
465
+ 464,Maharashtra,33,3.031,6.508,3.728,Rice,0,-22.203,-2.063,0,0.5728,2.1468,1.0,22.2026,1,1,382,High
466
+ 465,Punjab,37,1.474,15.0,1.741,Cotton,0,-31.266,0.482,1,0.1161,10.1772,0.5,15.6329,0,0,477,High
467
+ 466,Maharashtra,30,3.364,6.139,5.8,Sugarcane,0,10.138,-1.212,0,0.9448,1.8249,1.0,0.0,1,0,482,High
468
+ 467,Maharashtra,45,0.903,7.811,4.515,Cotton,1,-4.628,-0.32,0,0.578,8.651,0.5,2.3142,1,0,302,High
469
+ 468,Punjab,36,1.27,14.347,5.265,Rice,0,-15.436,-0.548,1,0.367,11.2944,1.0,15.4362,0,1,452,High
470
+ 469,Maharashtra,48,7.484,4.657,1.974,Wheat,0,-29.055,-0.728,1,0.4238,0.6222,0.2,5.8111,1,0,385,High
471
+ 470,Punjab,26,1.03,8.877,2.088,Millets,0,-24.327,-0.31,1,0.2352,8.6217,0.0,0.0,0,0,471,High
472
+ 471,Maharashtra,49,1.905,15.0,0.811,Rice,0,7.539,-1.434,2,0.0541,7.8758,1.0,0.0,1,0,483,High
473
+ 472,Punjab,55,6.626,9.334,2.916,Rice,0,-9.935,0.729,0,0.3123,1.4088,1.0,9.9351,0,0,528,High
474
+ 473,Maharashtra,25,3.69,11.306,4.698,Cotton,0,-20.259,-2.094,3,0.4156,3.0637,0.5,10.1294,1,1,306,High
475
+ 474,Punjab,49,0.5,7.977,6.935,Sugarcane,0,-4.355,0.24,2,0.8693,15.9536,1.0,4.3547,0,0,409,High
476
+ 475,Maharashtra,60,0.5,3.627,5.502,Wheat,0,-24.216,-0.627,0,1.5169,7.2541,0.2,4.8432,1,0,383,High
477
+ 476,Punjab,30,0.5,15.0,3.765,Sugarcane,1,10.513,-1.471,0,0.251,30.0,1.0,0.0,0,0,407,High
478
+ 477,Maharashtra,65,2.99,15.0,7.648,Millets,1,8.292,-0.098,0,0.5099,5.0163,0.0,0.0,1,1,337,High
479
+ 478,Maharashtra,50,1.781,12.363,5.894,Sugarcane,0,-18.999,-1.857,0,0.4768,6.9423,1.0,18.9986,1,0,399,High
480
+ 479,Punjab,37,0.5,14.588,7.476,Wheat,0,-21.43,-0.26,1,0.5125,29.1764,0.2,4.286,0,0,446,High
481
+ 480,Maharashtra,44,9.506,15.0,4.457,Wheat,0,-51.272,-1.723,1,0.2971,1.578,0.2,10.2544,1,0,347,High
482
+ 481,Punjab,52,2.263,4.413,2.442,Rice,1,-34.224,0.161,1,0.5533,1.9501,1.0,34.2237,0,1,300,High
483
+ 482,Punjab,46,0.831,15.0,0.896,Millets,0,-32.092,-1.224,1,0.0597,18.055,0.0,0.0,0,0,475,High
484
+ 483,Maharashtra,51,2.083,14.323,5.946,Cotton,0,-9.972,-0.751,0,0.4151,6.8759,0.5,4.9861,1,0,474,High
485
+ 484,Punjab,34,3.415,15.0,1.41,Rice,0,-16.894,-0.006,2,0.094,4.3927,1.0,16.8935,0,0,461,High
486
+ 485,Maharashtra,47,0.5,6.777,2.771,Wheat,0,-32.18,-1.073,0,0.4088,13.5545,0.2,6.436,1,1,411,High
487
+ 486,Punjab,28,0.964,15.0,4.494,Cotton,0,-16.217,-0.358,3,0.2996,15.5678,0.5,8.1087,0,0,402,High
488
+ 487,Maharashtra,44,4.935,15.0,4.733,Wheat,0,-4.42,-1.814,0,0.3155,3.0397,0.2,0.884,1,0,494,High
489
+ 488,Maharashtra,34,1.847,15.0,5.004,Wheat,0,-4.082,0.331,3,0.3336,8.1226,0.2,0.8165,1,1,414,High
490
+ 489,Punjab,36,2.373,14.691,1.747,Cotton,0,-40.495,1.465,0,0.1189,6.1913,0.5,20.2475,0,0,508,High
491
+ 490,Punjab,60,1.701,9.986,3.348,Sugarcane,0,-13.924,2.0,0,0.3353,5.8699,1.0,13.924,0,0,529,High
492
+ 491,Maharashtra,58,0.5,15.0,5.129,Cotton,0,-32.75,-0.209,0,0.3419,30.0,0.5,16.3751,1,0,430,High
493
+ 492,Punjab,52,0.544,13.63,7.774,Cotton,1,1.526,0.488,1,0.5703,25.0709,0.5,0.0,0,1,323,High
494
+ 493,Maharashtra,32,1.769,2.525,5.957,Wheat,0,-0.238,-2.081,2,2.3591,1.4273,0.2,0.0476,1,1,334,High
495
+ 494,Maharashtra,41,0.704,4.984,7.42,Wheat,1,-25.47,1.203,0,1.4886,7.0789,0.2,5.0941,1,1,300,High
496
+ 495,Maharashtra,60,0.5,10.499,6.217,Sugarcane,0,-23.491,0.476,2,0.5921,20.9989,1.0,23.4907,1,1,329,High
497
+ 496,Maharashtra,47,5.567,15.0,4.938,Cotton,0,-18.919,-0.784,1,0.3292,2.6945,0.5,9.4595,1,0,425,High
498
+ 497,Maharashtra,70,11.921,11.643,1.94,Wheat,0,-45.792,0.937,1,0.1666,0.9767,0.2,9.1584,1,1,408,High
499
+ 498,Maharashtra,50,4.727,15.0,5.5,Rice,0,-6.96,-0.554,2,0.3667,3.1731,1.0,6.9605,1,0,410,High
500
+ 499,Punjab,47,5.768,2.558,5.175,Millets,0,-16.093,-0.758,0,2.0234,0.4434,0.0,0.0,0,1,442,High
501
+ 500,Punjab,41,0.831,13.665,5.019,Cotton,0,2.553,0.175,0,0.3672,16.4421,0.5,0.0,0,0,568,High
502
+ 501,Punjab,47,9.704,2.845,4.173,Sugarcane,0,-28.476,-1.363,2,1.4668,0.2932,1.0,28.4761,0,1,300,High
503
+ 502,Maharashtra,43,0.658,15.0,4.465,Rice,0,-21.287,0.722,2,0.2977,22.799,1.0,21.2868,1,1,395,High
504
+ 503,Maharashtra,53,9.074,11.296,3.008,Rice,0,-34.598,-1.356,3,0.2663,1.2448,1.0,34.5979,1,1,300,High
505
+ 504,Punjab,56,15.788,15.0,4.395,Wheat,1,-27.064,-1.35,2,0.293,0.9501,0.2,5.4129,0,1,300,High
506
+ 505,Punjab,36,3.731,6.104,1.982,Millets,0,-29.73,-1.21,0,0.3247,1.6357,0.0,0.0,0,0,464,High
507
+ 506,Maharashtra,29,11.913,15.0,6.539,Wheat,1,2.94,0.46,2,0.4359,1.2592,0.2,0.0,1,1,300,High
508
+ 507,Punjab,25,2.529,15.0,1.893,Millets,0,-22.474,-0.917,0,0.1262,5.9319,0.0,0.0,0,1,541,High
509
+ 508,Punjab,51,0.901,15.0,1.137,Wheat,0,-10.137,-1.648,3,0.0758,16.6397,0.2,2.0275,0,1,424,High
510
+ 509,Punjab,32,1.723,10.983,3.772,Wheat,0,-17.711,-0.906,0,0.3434,6.3731,0.2,3.5423,0,0,499,High
511
+ 510,Punjab,25,2.701,15.0,5.437,Rice,0,-31.042,-0.332,1,0.3625,5.5536,1.0,31.042,0,0,404,High
512
+ 511,Punjab,50,0.5,6.92,3.783,Sugarcane,0,-14.525,-1.481,1,0.5466,13.841,1.0,14.5245,0,0,404,High
513
+ 512,Maharashtra,70,2.921,15.0,2.576,Rice,0,-3.013,-1.452,0,0.1717,5.1347,1.0,3.0135,1,0,508,High
514
+ 513,Punjab,45,11.918,15.0,4.686,Millets,0,-30.116,1.811,0,0.3124,1.2586,0.0,0.0,0,0,547,High
515
+ 514,Punjab,55,0.633,15.0,3.103,Millets,0,0.137,-1.161,2,0.2068,23.7131,0.0,0.0,0,1,479,High
516
+ 515,Maharashtra,46,4.719,6.796,7.497,Millets,0,-24.746,-0.623,2,1.1031,1.44,0.0,0.0,1,0,317,High
517
+ 516,Maharashtra,44,7.155,15.0,7.42,Wheat,0,-19.245,-0.667,0,0.4947,2.0966,0.2,3.849,1,0,454,High
518
+ 517,Maharashtra,56,8.631,4.33,4.268,Wheat,0,-4.04,-0.721,1,0.9857,0.5016,0.2,0.808,1,0,417,High
519
+ 518,Punjab,42,9.667,15.0,2.959,Sugarcane,0,-21.952,0.321,1,0.1973,1.5517,1.0,21.9515,0,0,475,High
520
+ 519,Punjab,48,2.211,15.0,6.028,Rice,0,-11.436,0.648,0,0.4019,6.7841,1.0,11.4364,0,0,520,High
521
+ 520,Maharashtra,49,11.357,2.73,0.775,Wheat,0,-16.72,-0.606,0,0.2841,0.2403,0.2,3.3441,1,0,464,High
522
+ 521,Maharashtra,37,4.248,4.809,4.061,Rice,0,-10.059,-1.536,2,0.8443,1.1322,1.0,10.0595,1,1,342,High
523
+ 522,Maharashtra,57,0.529,9.713,3.022,Wheat,0,-47.711,0.974,1,0.3112,18.3603,0.2,9.5422,1,0,382,High
524
+ 523,Punjab,43,1.944,9.577,7.404,Rice,0,-39.445,-0.395,1,0.7731,4.9263,1.0,39.4452,0,1,310,High
525
+ 524,Punjab,36,3.801,4.629,0.59,Rice,0,-2.76,1.43,1,0.1275,1.2179,1.0,2.7605,0,0,533,High
526
+ 525,Punjab,51,0.852,15.0,4.646,Cotton,1,3.558,-2.546,0,0.3097,17.5968,0.5,0.0,0,1,349,High
527
+ 526,Maharashtra,34,3.07,14.897,6.055,Cotton,0,-25.657,-0.105,0,0.4064,4.8524,0.5,12.8287,1,0,451,High
528
+ 527,Maharashtra,45,3.295,10.429,4.138,Wheat,0,-15.66,1.619,0,0.3967,3.1648,0.2,3.1321,1,0,511,High
529
+ 528,Maharashtra,45,0.533,6.655,1.141,Rice,0,-7.579,-0.653,0,0.1714,12.4925,1.0,7.5792,1,0,487,High
530
+ 529,Maharashtra,58,2.498,15.0,7.793,Wheat,0,-1.602,-0.525,1,0.5196,6.0052,0.2,0.3203,1,0,445,High
531
+ 530,Punjab,51,4.43,15.0,4.385,Rice,0,-42.415,-0.004,2,0.2923,3.3858,1.0,42.4152,0,0,325,High
532
+ 531,Punjab,45,2.073,8.274,5.106,Wheat,0,-25.291,-0.859,0,0.6171,3.9918,0.2,5.0581,0,1,445,High
533
+ 532,Punjab,55,0.5,7.465,2.275,Wheat,0,-16.989,-0.612,0,0.3047,14.9306,0.2,3.3977,0,0,492,High
534
+ 533,Punjab,62,0.5,15.0,4.126,Wheat,0,-1.453,-0.638,1,0.2751,30.0,0.2,0.2906,0,0,513,High
535
+ 534,Maharashtra,52,1.325,9.148,3.719,Sugarcane,0,20.0,-0.927,2,0.4065,6.9046,1.0,0.0,1,1,454,High
536
+ 535,Punjab,45,7.819,10.897,1.062,Cotton,0,-15.42,0.929,1,0.0974,1.3937,0.5,7.71,0,1,518,High
537
+ 536,Punjab,29,0.779,15.0,1.296,Sugarcane,1,-33.105,0.161,2,0.0864,19.2569,1.0,33.1047,0,1,300,High
538
+ 537,Punjab,32,3.018,2.645,6.781,Cotton,0,-5.966,-0.049,1,2.5641,0.8762,0.5,2.983,0,0,418,High
539
+ 538,Maharashtra,41,0.753,15.0,2.299,Wheat,0,7.815,0.509,1,0.1532,19.9103,0.2,0.0,1,0,553,High
540
+ 539,Maharashtra,38,1.164,12.912,1.962,Wheat,0,-10.38,-0.564,0,0.152,11.0892,0.2,2.076,1,0,522,High
541
+ 540,Maharashtra,43,5.652,8.765,4.287,Rice,0,-25.6,-1.074,0,0.4891,1.5507,1.0,25.5997,1,0,392,High
542
+ 541,Punjab,46,3.915,11.343,6.266,Wheat,0,2.37,-0.903,0,0.5524,2.8971,0.2,0.0,0,1,518,High
543
+ 542,Punjab,51,0.5,11.822,0.965,Wheat,0,-2.047,-0.298,1,0.0816,23.6436,0.2,0.4094,0,0,537,High
544
+ 543,Maharashtra,44,1.68,3.05,4.826,Cotton,0,-27.391,-1.359,2,1.5825,1.8158,0.5,13.6956,1,1,300,High
545
+ 544,Punjab,51,0.5,15.0,1.394,Rice,0,-6.279,-0.8,2,0.0929,30.0,1.0,6.2786,0,1,482,High
546
+ 545,Punjab,46,1.967,12.592,0.773,Rice,0,2.959,-0.816,0,0.0614,6.4019,1.0,0.0,0,0,584,High
547
+ 546,Maharashtra,25,3.258,15.0,0.896,Millets,0,5.728,1.825,0,0.0597,4.6041,0.0,0.0,1,0,635,Medium
548
+ 547,Maharashtra,34,0.5,15.0,6.756,Wheat,0,-12.997,-3.0,0,0.4504,30.0,0.2,2.5993,1,0,438,High
549
+ 548,Punjab,43,1.023,5.382,1.385,Rice,0,-17.371,-0.48,0,0.2573,5.2623,1.0,17.3712,0,0,472,High
550
+ 549,Maharashtra,30,1.522,15.0,0.839,Cotton,0,6.409,1.426,1,0.0559,9.8575,0.5,0.0,1,1,586,High
551
+ 550,Punjab,52,7.56,9.834,3.784,Wheat,0,-30.152,-0.178,2,0.3848,1.3009,0.2,6.0305,0,1,389,High
552
+ 551,Maharashtra,63,14.997,15.0,6.83,Sugarcane,0,-5.421,0.453,3,0.4553,1.0002,1.0,5.4213,1,1,384,High
553
+ 552,Punjab,60,0.5,2.222,2.468,Rice,1,-32.55,-0.2,1,1.1109,4.4432,1.0,32.5504,0,1,300,High
554
+ 553,Maharashtra,42,4.294,11.254,3.663,Rice,0,3.981,-0.967,2,0.3255,2.6209,1.0,0.0,1,0,438,High
555
+ 554,Maharashtra,63,1.394,7.521,0.799,Millets,1,-15.871,-2.542,1,0.1063,5.3942,0.0,0.0,1,1,300,High
556
+ 555,Punjab,47,1.495,15.0,3.868,Rice,0,7.029,-0.095,0,0.2579,10.0334,1.0,0.0,0,0,588,High
557
+ 556,Maharashtra,41,4.211,15.0,4.832,Rice,0,-4.629,-1.076,1,0.3221,3.5625,1.0,4.6288,1,0,460,High
558
+ 557,Maharashtra,38,7.519,6.916,4.782,Millets,0,-30.348,-1.1,1,0.6914,0.9199,0.0,0.0,1,0,373,High
559
+ 558,Maharashtra,41,9.043,6.891,2.993,Wheat,1,9.369,-0.799,1,0.4343,0.762,0.2,0.0,1,0,306,High
560
+ 559,Punjab,40,2.582,11.15,2.866,Cotton,0,11.269,1.445,0,0.2571,4.3184,0.5,0.0,0,0,618,Medium
561
+ 560,Punjab,47,1.325,5.946,1.3,Rice,0,1.234,2.0,0,0.2186,4.4861,1.0,0.0,0,0,590,High
562
+ 561,Punjab,47,4.647,15.0,3.251,Rice,0,-23.424,-0.083,0,0.2167,3.2278,1.0,23.4238,0,0,491,High
563
+ 562,Maharashtra,45,0.867,9.067,1.246,Rice,0,-16.59,-0.765,3,0.1374,10.4572,1.0,16.5902,1,1,340,High
564
+ 563,Maharashtra,50,2.491,1.191,6.249,Millets,0,-9.819,-1.477,0,5.2493,0.478,0.0,0.0,1,0,379,High
565
+ 564,Maharashtra,59,1.332,9.026,7.747,Cotton,1,-22.556,0.169,1,0.8583,6.7755,0.5,11.2778,1,1,300,High
566
+ 565,Maharashtra,56,3.207,5.308,7.776,Sugarcane,1,13.385,1.483,1,1.4649,1.6551,1.0,0.0,1,1,300,High
567
+ 566,Maharashtra,27,0.825,3.303,6.988,Millets,0,-9.835,-0.547,0,2.1153,4.0048,0.0,0.0,1,0,421,High
568
+ 567,Maharashtra,25,0.638,4.527,5.006,Cotton,1,-52.55,-2.679,1,1.1058,7.0948,0.5,26.2751,1,0,300,High
569
+ 568,Maharashtra,56,7.512,13.297,5.756,Rice,0,-6.91,0.37,2,0.4329,1.7701,1.0,6.9097,1,0,415,High
570
+ 569,Punjab,29,0.5,15.0,2.639,Wheat,0,-17.222,0.685,0,0.1759,30.0,0.2,3.4445,0,0,572,High
571
+ 570,Maharashtra,42,2.115,15.0,5.231,Millets,0,-13.124,-1.886,2,0.3487,7.0908,0.0,0.0,1,1,389,High
572
+ 571,Maharashtra,31,0.749,7.499,3.917,Sugarcane,0,-17.529,-0.124,0,0.5224,10.0168,1.0,17.5293,1,1,441,High
573
+ 572,Punjab,25,0.5,15.0,4.115,Rice,1,0.106,0.151,0,0.2743,30.0,1.0,0.0,0,1,414,High
574
+ 573,Maharashtra,51,0.5,8.438,6.183,Wheat,0,4.795,-0.373,2,0.7328,16.8757,0.2,0.0,1,1,405,High
575
+ 574,Punjab,54,0.578,6.989,2.614,Wheat,0,-7.754,-1.091,2,0.3741,12.0931,0.2,1.5508,0,0,418,High
576
+ 575,Punjab,38,6.047,4.838,2.885,Millets,0,-17.09,0.716,3,0.5964,0.8001,0.0,0.0,0,1,390,High
577
+ 576,Punjab,25,0.996,3.0,7.435,Rice,0,-12.62,-0.703,1,2.4785,3.0123,1.0,12.6201,0,0,372,High
578
+ 577,Maharashtra,38,9.015,8.918,0.922,Wheat,0,-11.706,-1.785,2,0.1034,0.9892,0.2,2.3412,1,1,409,High
579
+ 578,Punjab,50,2.614,13.825,4.142,Millets,1,-24.036,-2.349,2,0.2996,5.2884,0.0,0.0,0,1,300,High
580
+ 579,Maharashtra,27,1.721,11.276,7.346,Cotton,0,-3.316,0.961,2,0.6515,6.5507,0.5,1.658,1,1,425,High
581
+ 580,Maharashtra,47,2.603,8.734,5.078,Wheat,0,-5.099,0.317,1,0.5814,3.3552,0.2,1.0199,1,1,450,High
582
+ 581,Maharashtra,45,2.181,5.717,4.598,Rice,0,11.107,-0.212,0,0.8043,2.6208,1.0,0.0,1,0,504,High
583
+ 582,Punjab,52,4.266,15.0,2.373,Cotton,0,6.83,-0.74,2,0.1582,3.5161,0.5,0.0,0,0,508,High
584
+ 583,Maharashtra,46,0.996,4.247,3.075,Cotton,0,-22.285,-0.829,0,0.7239,4.2647,0.5,11.1426,1,0,409,High
585
+ 584,Maharashtra,33,1.306,15.0,6.89,Millets,0,0.304,-1.376,1,0.4594,11.4814,0.0,0.0,1,0,455,High
586
+ 585,Punjab,59,6.736,5.464,4.694,Cotton,0,-26.264,-0.731,0,0.8591,0.8112,0.5,13.1322,0,1,417,High
587
+ 586,Maharashtra,43,8.782,6.673,4.361,Wheat,0,-1.561,-2.42,1,0.6535,0.7599,0.2,0.3122,1,1,410,High
588
+ 587,Maharashtra,45,6.692,3.768,1.247,Wheat,0,-19.749,-1.036,0,0.3309,0.563,0.2,3.9498,1,0,446,High
589
+ 588,Maharashtra,34,1.631,8.157,0.62,Rice,0,-27.349,-0.611,0,0.076,5.0002,1.0,27.3488,1,0,431,High
590
+ 589,Maharashtra,40,4.547,15.0,7.728,Wheat,0,-7.799,0.31,2,0.5152,3.2986,0.2,1.5599,1,0,416,High
591
+ 590,Maharashtra,34,1.941,15.0,3.327,Sugarcane,0,-52.119,-0.34,0,0.2218,7.7291,1.0,52.1185,1,0,352,High
592
+ 591,Maharashtra,43,2.065,15.0,5.024,Millets,0,-38.265,0.495,1,0.3349,7.2649,0.0,0.0,1,0,423,High
593
+ 592,Punjab,66,0.687,15.0,1.098,Wheat,1,-14.662,1.049,0,0.0732,21.833,0.2,2.9325,0,1,404,High
594
+ 593,Maharashtra,29,2.683,5.038,5.623,Wheat,0,-10.763,0.758,0,1.1161,1.8778,0.2,2.1527,1,0,467,High
595
+ 594,Maharashtra,26,0.618,9.35,7.494,Rice,0,-17.54,0.171,0,0.8015,15.1321,1.0,17.5398,1,0,423,High
596
+ 595,Punjab,63,1.208,6.526,4.817,Millets,0,-35.692,-0.288,1,0.7382,5.4006,0.0,0.0,0,0,385,High
597
+ 596,Maharashtra,42,5.794,15.0,1.446,Rice,0,-24.268,-1.281,0,0.0964,2.589,1.0,24.2684,1,1,458,High
598
+ 597,Punjab,37,0.696,4.677,4.863,Sugarcane,0,-6.132,0.44,2,1.0398,6.7184,1.0,6.1319,0,1,412,High
599
+ 598,Maharashtra,57,0.5,15.0,6.248,Cotton,1,-3.273,1.38,0,0.4165,30.0,0.5,1.6366,1,1,361,High
600
+ 599,Maharashtra,38,0.5,15.0,3.548,Millets,0,-12.243,0.042,0,0.2365,30.0,0.0,0.0,1,0,533,High
601
+ 600,Maharashtra,67,8.48,15.0,7.099,Sugarcane,0,5.353,1.617,0,0.4733,1.7689,1.0,0.0,1,0,549,High
602
+ 601,Maharashtra,53,2.121,8.778,5.365,Sugarcane,0,-6.039,-1.826,0,0.6112,4.1381,1.0,6.039,1,1,433,High
603
+ 602,Maharashtra,39,1.58,15.0,7.244,Rice,0,-23.212,-1.454,1,0.483,9.4942,1.0,23.2118,1,1,357,High
604
+ 603,Maharashtra,70,4.996,15.0,5.176,Cotton,0,-16.208,0.555,2,0.3451,3.0023,0.5,8.1038,1,1,403,High
605
+ 604,Maharashtra,38,5.42,7.433,1.485,Wheat,1,-33.043,-0.036,1,0.1997,1.3712,0.2,6.6086,1,1,300,High
606
+ 605,Maharashtra,54,1.211,3.568,2.823,Sugarcane,0,-13.622,1.014,0,0.7911,2.9456,1.0,13.6221,1,0,453,High
607
+ 606,Maharashtra,49,3.549,2.707,2.013,Rice,0,4.682,-0.315,0,0.7437,0.7629,1.0,0.0,1,0,498,High
608
+ 607,Maharashtra,61,4.424,15.0,7.316,Millets,0,-1.721,-1.168,0,0.4877,3.3908,0.0,0.0,1,1,478,High
609
+ 608,Maharashtra,64,3.19,2.701,6.203,Millets,0,9.03,-0.514,3,2.2969,0.8467,0.0,0.0,1,1,327,High
610
+ 609,Maharashtra,45,0.5,9.044,5.573,Cotton,0,-16.543,-1.833,0,0.6162,18.0888,0.5,8.2716,1,1,413,High
611
+ 610,Punjab,36,6.26,15.0,2.757,Sugarcane,0,8.191,-1.429,1,0.1838,2.3963,1.0,0.0,0,0,544,High
612
+ 611,Maharashtra,51,2.324,14.128,1.88,Wheat,0,-14.9,0.672,0,0.1331,6.0799,0.2,2.9799,1,0,535,High
613
+ 612,Punjab,37,0.996,15.0,6.173,Wheat,0,10.074,0.573,0,0.4116,15.0628,0.2,0.0,0,0,589,High
614
+ 613,Punjab,69,1.661,14.554,4.056,Cotton,0,-12.328,0.063,0,0.2787,8.7601,0.5,6.1639,0,1,523,High
615
+ 614,Maharashtra,47,0.5,15.0,2.193,Wheat,0,-1.392,-2.021,0,0.1462,30.0,0.2,0.2783,1,0,526,High
616
+ 615,Punjab,41,0.5,5.687,5.125,Sugarcane,0,10.127,-0.658,1,0.9012,11.3736,1.0,0.0,0,0,479,High
617
+ 616,Punjab,47,4.351,7.088,0.803,Cotton,0,-14.901,-1.525,0,0.1132,1.6289,0.5,7.4507,0,0,490,High
618
+ 617,Maharashtra,29,0.5,6.566,2.946,Wheat,0,-8.724,0.877,1,0.4487,13.1316,0.2,1.7448,1,0,472,High
619
+ 618,Maharashtra,33,1.616,15.0,4.014,Wheat,0,7.333,-0.884,0,0.2676,9.2795,0.2,0.0,1,0,550,High
620
+ 619,Punjab,59,2.218,15.0,1.61,Sugarcane,0,-13.995,-1.386,3,0.1073,6.764,1.0,13.995,0,0,390,High
621
+ 620,Punjab,37,0.5,15.0,7.885,Rice,0,-31.813,-0.27,0,0.5257,30.0,1.0,31.8134,0,0,416,High
622
+ 621,Maharashtra,32,10.844,15.0,2.068,Millets,0,20.0,-0.94,2,0.1379,1.3832,0.0,0.0,1,0,523,High
623
+ 622,Maharashtra,51,0.769,4.747,1.478,Wheat,1,-19.046,1.184,2,0.3113,6.173,0.2,3.8093,1,1,300,High
624
+ 623,Maharashtra,59,1.088,15.0,2.027,Cotton,0,-9.619,-1.035,3,0.1351,13.7858,0.5,4.8093,1,0,389,High
625
+ 624,Maharashtra,54,1.087,15.0,6.268,Rice,0,5.34,-1.699,0,0.4179,13.7998,1.0,0.0,1,0,496,High
626
+ 625,Punjab,57,0.786,15.0,3.691,Wheat,0,-21.127,-2.453,1,0.2461,19.0908,0.2,4.2255,0,0,434,High
627
+ 626,Maharashtra,36,0.5,15.0,4.741,Millets,0,-27.118,-0.331,0,0.316,30.0,0.0,0.0,1,1,483,High
628
+ 627,Maharashtra,28,3.921,3.237,0.658,Cotton,0,-8.194,-0.862,0,0.2031,0.8257,0.5,4.097,1,0,483,High
629
+ 628,Punjab,63,10.22,8.008,0.758,Sugarcane,0,-38.896,-1.729,0,0.0947,0.7836,1.0,38.8961,0,1,386,High
630
+ 629,Maharashtra,41,0.762,6.765,3.844,Rice,0,-16.319,0.889,0,0.5682,8.8786,1.0,16.3186,1,1,456,High
631
+ 630,Maharashtra,42,3.263,15.0,6.625,Wheat,0,-8.324,0.367,3,0.4417,4.5964,0.2,1.6649,1,1,384,High
632
+ 631,Punjab,61,4.063,5.259,7.139,Millets,0,-16.049,-0.328,0,1.3576,1.2942,0.0,0.0,0,1,438,High
633
+ 632,Punjab,52,5.66,15.0,1.15,Sugarcane,0,-35.152,1.064,1,0.0767,2.6502,1.0,35.1518,0,0,448,High
634
+ 633,Maharashtra,50,1.648,15.0,4.538,Rice,0,11.913,0.363,1,0.3025,9.103,1.0,0.0,1,0,528,High
635
+ 634,Maharashtra,70,1.083,15.0,7.349,Wheat,0,-10.447,-1.123,1,0.4899,13.8554,0.2,2.0894,1,0,411,High
636
+ 635,Maharashtra,37,1.18,15.0,3.41,Rice,0,9.467,-1.339,1,0.2273,12.7071,1.0,0.0,1,0,509,High
637
+ 636,Maharashtra,56,3.741,5.527,6.722,Cotton,0,-15.901,0.518,0,1.2161,1.4775,0.5,7.9503,1,0,420,High
638
+ 637,Maharashtra,46,5.091,6.187,1.503,Sugarcane,0,-25.2,0.096,1,0.2429,1.2153,1.0,25.2002,1,0,388,High
639
+ 638,Maharashtra,48,0.601,15.0,7.515,Sugarcane,1,-7.962,-0.13,0,0.501,24.9475,1.0,7.9623,1,1,301,High
640
+ 639,Maharashtra,63,1.391,15.0,6.136,Rice,0,-15.237,-1.146,2,0.409,10.7868,1.0,15.2368,1,1,352,High
641
+ 640,Maharashtra,51,6.967,11.808,7.56,Millets,0,-29.666,0.308,1,0.6402,1.695,0.0,0.0,1,1,393,High
642
+ 641,Maharashtra,51,4.93,8.72,5.575,Wheat,0,10.047,-1.055,3,0.6393,1.7687,0.2,0.0,1,1,371,High
643
+ 642,Maharashtra,58,12.571,2.409,3.226,Cotton,0,-21.334,-0.402,0,1.3388,0.1917,0.5,10.667,1,0,413,High
644
+ 643,Maharashtra,41,4.21,5.172,7.536,Wheat,0,-39.604,1.147,0,1.4571,1.2285,0.2,7.9208,1,1,379,High
645
+ 644,Maharashtra,35,1.499,15.0,2.567,Wheat,0,7.922,-0.961,0,0.1711,10.009,0.2,0.0,1,0,564,High
646
+ 645,Maharashtra,32,2.679,4.374,2.991,Wheat,0,-19.564,-1.873,0,0.6839,1.6323,0.2,3.9129,1,1,417,High
647
+ 646,Punjab,25,3.245,14.176,5.756,Wheat,0,-21.117,-1.353,0,0.406,4.3682,0.2,4.2235,0,0,484,High
648
+ 647,Maharashtra,70,0.5,15.0,6.24,Wheat,0,-38.481,0.694,1,0.416,30.0,0.2,7.6962,1,1,392,High
649
+ 648,Punjab,32,2.359,4.464,7.471,Rice,1,14.114,-0.045,0,1.6735,1.8923,1.0,0.0,0,0,335,High
650
+ 649,Punjab,42,3.707,14.122,2.036,Sugarcane,0,-31.342,-0.429,1,0.1442,3.8101,1.0,31.3422,0,0,423,High
651
+ 650,Maharashtra,42,0.549,15.0,6.485,Wheat,0,-11.123,-0.809,2,0.4323,27.3064,0.2,2.2247,1,0,401,High
652
+ 651,Maharashtra,49,4.551,12.305,6.039,Rice,0,1.689,0.185,1,0.4908,2.7038,1.0,0.0,1,0,474,High
653
+ 652,Maharashtra,55,2.63,15.0,0.978,Sugarcane,0,-5.674,-1.149,0,0.0652,5.7044,1.0,5.6742,1,0,527,High
654
+ 653,Maharashtra,55,9.124,3.206,3.404,Millets,0,-12.895,0.006,0,1.0617,0.3514,0.0,0.0,1,1,458,High
655
+ 654,Punjab,38,0.5,15.0,2.621,Millets,0,-37.525,-1.031,0,0.1747,30.0,0.0,0.0,0,0,498,High
656
+ 655,Maharashtra,43,0.925,10.61,2.784,Cotton,0,-24.146,-1.198,0,0.2624,11.47,0.5,12.0729,1,1,440,High
657
+ 656,Maharashtra,48,2.761,15.0,7.872,Rice,0,-9.183,-0.937,1,0.5248,5.4337,1.0,9.183,1,1,410,High
658
+ 657,Maharashtra,42,1.055,15.0,5.321,Wheat,1,-23.808,-0.675,0,0.3547,14.2137,0.2,4.7615,1,1,300,High
659
+ 658,Maharashtra,64,3.76,6.777,5.883,Rice,0,-8.95,-0.349,2,0.8681,1.8024,1.0,8.9496,1,1,347,High
660
+ 659,Punjab,51,4.269,14.632,7.825,Millets,0,-1.774,-0.065,1,0.5348,3.4275,0.0,0.0,0,0,485,High
661
+ 660,Maharashtra,54,0.5,2.756,3.329,Rice,1,2.438,-3.0,1,1.208,5.5114,1.0,0.0,1,1,300,High
662
+ 661,Maharashtra,53,2.164,15.0,6.514,Cotton,0,-30.393,-1.108,0,0.4343,6.9324,0.5,15.1963,1,1,403,High
663
+ 662,Punjab,59,2.133,15.0,3.759,Cotton,0,20.0,-0.692,0,0.2506,7.0315,0.5,0.0,0,0,599,High
664
+ 663,Punjab,47,1.383,15.0,7.022,Cotton,0,-0.488,1.205,1,0.4681,10.8485,0.5,0.2439,0,0,523,High
665
+ 664,Maharashtra,29,8.106,15.0,1.855,Sugarcane,0,-12.026,-1.38,0,0.1237,1.8505,1.0,12.0257,1,0,508,High
666
+ 665,Maharashtra,50,5.272,15.0,7.608,Wheat,0,4.343,-0.137,0,0.5072,2.8451,0.2,0.0,1,0,514,High
667
+ 666,Maharashtra,37,3.584,13.715,2.141,Rice,0,20.0,1.195,0,0.1561,3.8265,1.0,0.0,1,0,627,Medium
668
+ 667,Maharashtra,39,3.759,6.02,2.947,Cotton,0,-33.581,-1.613,0,0.4894,1.6017,0.5,16.7904,1,1,378,High
669
+ 668,Maharashtra,52,1.858,6.891,6.171,Wheat,0,-15.379,0.094,1,0.8956,3.7086,0.2,3.0758,1,0,395,High
670
+ 669,Maharashtra,60,7.615,15.0,3.453,Rice,0,-47.676,-1.102,0,0.2302,1.9699,1.0,47.6765,1,1,345,High
671
+ 670,Maharashtra,45,3.558,15.0,5.062,Wheat,0,-9.11,-0.805,1,0.3374,4.2154,0.2,1.822,1,0,456,High
672
+ 671,Maharashtra,49,3.917,10.07,3.834,Wheat,0,-6.519,-1.103,0,0.3808,2.5709,0.2,1.3038,1,0,481,High
673
+ 672,Punjab,65,5.935,12.639,6.068,Sugarcane,0,-12.587,-1.032,1,0.4801,2.1297,1.0,12.5874,0,1,423,High
674
+ 673,Maharashtra,48,0.961,5.908,2.212,Millets,0,-21.818,2.0,2,0.3745,6.1483,0.0,0.0,1,1,420,High
675
+ 674,Maharashtra,70,4.936,15.0,0.938,Millets,0,-42.743,0.544,2,0.0626,3.0387,0.0,0.0,1,1,404,High
676
+ 675,Maharashtra,52,0.652,15.0,2.749,Millets,0,-6.397,0.802,0,0.1833,23.019,0.0,0.0,1,0,559,High
677
+ 676,Punjab,25,1.271,15.0,4.057,Rice,0,9.832,0.192,0,0.2705,11.8024,1.0,0.0,0,0,609,Medium
678
+ 677,Maharashtra,54,1.227,6.034,1.76,Rice,0,-20.865,-1.906,0,0.2917,4.9187,1.0,20.8653,1,0,396,High
679
+ 678,Maharashtra,50,11.523,9.003,3.161,Cotton,0,-5.399,0.095,1,0.3511,0.7814,0.5,2.6996,1,0,471,High
680
+ 679,Punjab,60,5.825,14.66,3.5,Millets,0,-35.522,0.773,1,0.2387,2.5168,0.0,0.0,0,0,471,High
681
+ 680,Punjab,53,3.624,15.0,0.93,Millets,0,-5.142,-1.153,1,0.062,4.1395,0.0,0.0,0,0,529,High
682
+ 681,Punjab,43,3.895,10.252,4.875,Millets,0,-17.901,0.665,0,0.4755,2.6318,0.0,0.0,0,0,515,High
683
+ 682,Maharashtra,30,2.477,6.06,7.133,Rice,1,-23.436,0.404,1,1.1771,2.4462,1.0,23.4363,1,1,300,High
684
+ 683,Maharashtra,42,8.818,15.0,1.638,Millets,0,-23.405,1.552,0,0.1092,1.7012,0.0,0.0,1,0,557,High
685
+ 684,Punjab,35,2.057,15.0,4.984,Cotton,0,-17.904,-0.718,1,0.3322,7.2919,0.5,8.9521,0,0,461,High
686
+ 685,Punjab,38,1.437,5.853,5.486,Rice,0,-6.264,-1.398,0,0.9372,4.0743,1.0,6.2635,0,0,458,High
687
+ 686,Maharashtra,52,0.534,15.0,3.645,Cotton,1,-31.682,-0.662,1,0.243,28.0941,0.5,15.8412,1,1,300,High
688
+ 687,Maharashtra,65,4.628,15.0,5.758,Rice,0,-17.957,1.136,0,0.3839,3.241,1.0,17.9567,1,0,471,High
689
+ 688,Maharashtra,50,3.978,13.564,3.58,Wheat,0,-12.622,-2.128,0,0.264,3.41,0.2,2.5244,1,1,468,High
690
+ 689,Punjab,31,1.455,12.983,4.285,Cotton,0,-28.486,-2.368,1,0.33,8.9218,0.5,14.2428,0,1,396,High
691
+ 690,Maharashtra,50,0.5,15.0,0.555,Wheat,0,14.95,-0.211,0,0.037,30.0,0.2,0.0,1,0,611,Medium
692
+ 691,Maharashtra,59,5.479,6.114,5.688,Wheat,0,-24.802,-0.743,1,0.9303,1.116,0.2,4.9605,1,0,356,High
693
+ 692,Maharashtra,38,0.5,12.479,5.46,Millets,0,-22.042,-0.292,1,0.4376,24.9574,0.0,0.0,1,0,430,High
694
+ 693,Maharashtra,43,3.649,2.177,0.788,Wheat,1,-26.675,0.645,1,0.3619,0.5967,0.2,5.3349,1,1,300,High
695
+ 694,Maharashtra,45,10.545,15.0,3.262,Cotton,1,14.977,-0.853,0,0.2175,1.4224,0.5,0.0,1,1,399,High
696
+ 695,Maharashtra,36,1.727,3.493,7.843,Sugarcane,1,-3.706,-2.173,0,2.2452,2.0227,1.0,3.7064,1,1,300,High
697
+ 696,Punjab,53,0.804,15.0,3.656,Millets,0,-26.049,1.744,1,0.2437,18.6675,0.0,0.0,0,1,513,High
698
+ 697,Maharashtra,44,3.661,9.355,4.265,Rice,0,4.593,-1.297,0,0.4559,2.5553,1.0,0.0,1,1,496,High
699
+ 698,Maharashtra,50,5.097,10.285,7.324,Wheat,0,-8.99,-1.359,1,0.7122,2.0178,0.2,1.7979,1,1,395,High
700
+ 699,Maharashtra,34,2.372,7.373,5.879,Cotton,0,-8.141,0.804,0,0.7974,3.1085,0.5,4.0706,1,0,478,High
701
+ 700,Maharashtra,40,10.237,9.675,4.866,Rice,0,-17.167,-0.684,0,0.5029,0.9451,1.0,17.1672,1,1,437,High
702
+ 701,Maharashtra,54,0.5,15.0,6.484,Wheat,0,-23.241,-0.363,0,0.4322,30.0,0.2,4.6482,1,0,456,High
703
+ 702,Maharashtra,41,2.108,1.665,6.983,Millets,0,-6.934,0.183,0,4.1941,0.7897,0.0,0.0,1,0,420,High
704
+ 703,Maharashtra,66,3.802,15.0,3.927,Rice,0,-20.176,0.784,0,0.2618,3.9449,1.0,20.1763,1,1,474,High
705
+ 704,Maharashtra,40,5.955,15.0,4.063,Sugarcane,0,15.251,-0.633,1,0.2709,2.5187,1.0,0.0,1,0,529,High
706
+ 705,Maharashtra,48,0.593,4.638,3.395,Millets,0,-31.039,1.22,1,0.732,7.8269,0.0,0.0,1,0,407,High
707
+ 706,Punjab,56,4.828,5.154,7.75,Millets,0,11.042,-2.436,0,1.5038,1.0674,0.0,0.0,0,0,452,High
708
+ 707,Maharashtra,28,2.414,15.0,5.729,Cotton,0,-13.67,0.46,3,0.3819,6.2147,0.5,6.8349,1,1,382,High
709
+ 708,Punjab,25,1.515,5.718,1.124,Millets,0,-7.514,-1.14,1,0.1966,3.7734,0.0,0.0,0,0,483,High
710
+ 709,Maharashtra,27,0.5,4.842,6.972,Cotton,0,0.497,1.072,2,1.44,9.6839,0.5,0.0,1,0,404,High
711
+ 710,Punjab,60,6.014,15.0,4.104,Wheat,0,-21.454,-0.158,1,0.2736,2.4942,0.2,4.2907,0,0,472,High
712
+ 711,Punjab,38,0.513,15.0,1.016,Rice,0,0.964,-0.973,1,0.0677,29.2205,1.0,0.0,0,0,556,High
713
+ 712,Maharashtra,70,1.112,5.753,4.623,Rice,0,-52.613,0.363,0,0.8036,5.172,1.0,52.6132,1,1,300,High
714
+ 713,Maharashtra,38,1.028,14.488,3.629,Sugarcane,0,-22.8,0.593,0,0.2505,14.0977,1.0,22.7998,1,0,475,High
715
+ 714,Maharashtra,47,6.153,5.362,7.083,Cotton,0,-25.861,0.342,0,1.3209,0.8714,0.5,12.9305,1,0,389,High
716
+ 715,Maharashtra,64,3.351,15.0,2.03,Cotton,0,-30.803,-1.33,1,0.1353,4.4767,0.5,15.4013,1,0,399,High
717
+ 716,Punjab,69,4.779,15.0,6.698,Rice,1,-15.224,-0.784,0,0.4466,3.1388,1.0,15.2243,0,1,300,High
718
+ 717,Punjab,70,0.865,15.0,4.683,Wheat,0,-6.214,-0.304,1,0.3122,17.3427,0.2,1.2428,0,0,494,High
719
+ 718,Punjab,60,2.941,15.0,0.91,Rice,1,-1.46,-0.341,0,0.0606,5.0995,1.0,1.4601,0,1,410,High
720
+ 719,Maharashtra,57,2.544,15.0,7.789,Sugarcane,0,-8.387,0.45,2,0.5193,5.896,1.0,8.3868,1,0,395,High
721
+ 720,Punjab,52,5.366,12.179,4.345,Rice,0,-21.985,-2.315,0,0.3567,2.2696,1.0,21.9854,0,1,425,High
722
+ 721,Punjab,54,7.096,4.733,2.682,Rice,1,-6.465,0.034,0,0.5666,0.6669,1.0,6.4648,0,1,329,High
723
+ 722,Maharashtra,38,0.5,15.0,4.021,Cotton,0,-10.136,-0.59,0,0.268,30.0,0.5,5.0679,1,0,512,High
724
+ 723,Maharashtra,35,3.363,15.0,6.934,Wheat,0,2.041,-1.139,0,0.4623,4.4606,0.2,0.0,1,0,503,High
725
+ 724,Punjab,45,0.5,5.41,2.787,Cotton,0,-0.346,-1.042,0,0.5151,10.8194,0.5,0.173,0,0,512,High
726
+ 725,Maharashtra,43,2.388,9.123,1.945,Cotton,0,-11.543,-0.515,1,0.2132,3.8206,0.5,5.7714,1,1,449,High
727
+ 726,Punjab,40,1.017,15.0,1.468,Millets,1,-25.459,-3.0,0,0.0979,14.7422,0.0,0.0,0,1,316,High
728
+ 727,Maharashtra,53,1.099,11.668,2.734,Wheat,0,-21.794,-1.001,0,0.2343,10.6152,0.2,4.3589,1,1,463,High
729
+ 728,Punjab,56,1.306,5.552,6.35,Rice,0,-20.247,-1.176,2,1.1438,4.251,1.0,20.2468,0,1,307,High
730
+ 729,Maharashtra,46,2.913,15.0,4.037,Cotton,0,-16.729,0.233,0,0.2691,5.1494,0.5,8.3645,1,0,499,High
731
+ 730,Maharashtra,63,1.22,15.0,2.206,Millets,0,-7.979,-1.106,2,0.1471,12.2989,0.0,0.0,1,0,436,High
732
+ 731,Maharashtra,31,3.958,14.252,1.746,Cotton,0,-1.272,-0.515,3,0.1225,3.6007,0.5,0.6362,1,0,437,High
733
+ 732,Punjab,43,1.555,5.911,2.995,Rice,0,-12.767,1.242,0,0.5068,3.8005,1.0,12.7668,0,1,508,High
734
+ 733,Punjab,36,0.5,3.528,7.549,Sugarcane,0,-11.758,0.694,0,2.1396,7.0567,1.0,11.7581,0,0,441,High
735
+ 734,Maharashtra,25,4.594,14.975,3.073,Wheat,0,-9.85,0.602,0,0.2052,3.2596,0.2,1.9701,1,1,554,High
736
+ 735,Maharashtra,44,1.01,15.0,7.911,Wheat,0,-19.739,-0.8,1,0.5274,14.8573,0.2,3.9477,1,1,401,High
737
+ 736,Punjab,44,1.701,15.0,4.139,Rice,0,-25.881,0.243,1,0.2759,8.8186,1.0,25.8809,0,1,438,High
738
+ 737,Maharashtra,63,3.47,12.159,1.844,Rice,0,-38.332,-0.534,1,0.1516,3.5043,1.0,38.3316,1,0,346,High
739
+ 738,Punjab,53,1.212,7.603,7.184,Wheat,0,-22.427,-0.496,1,0.9448,6.271,0.2,4.4854,0,0,389,High
740
+ 739,Maharashtra,33,0.5,5.085,3.953,Rice,0,-4.903,0.11,0,0.7773,10.1697,1.0,4.9028,1,1,478,High
741
+ 740,Maharashtra,67,1.405,15.0,5.823,Wheat,0,-22.544,-0.897,2,0.3882,10.6774,0.2,4.5087,1,1,361,High
742
+ 741,Maharashtra,60,8.671,15.0,7.878,Wheat,1,-15.567,1.193,1,0.5252,1.7298,0.2,3.1134,1,1,300,High
743
+ 742,Maharashtra,52,3.079,3.537,0.876,Cotton,0,-5.004,-0.46,1,0.2477,1.1487,0.5,2.5018,1,0,445,High
744
+ 743,Punjab,42,3.339,15.0,1.225,Millets,1,-4.19,0.318,2,0.0817,4.4917,0.0,0.0,0,1,345,High
745
+ 744,Maharashtra,33,3.001,15.0,5.903,Sugarcane,0,-28.193,1.156,1,0.3936,4.9978,1.0,28.193,1,1,405,High
746
+ 745,Maharashtra,41,0.666,15.0,2.614,Sugarcane,0,2.956,0.732,0,0.1742,22.5342,1.0,0.0,1,0,584,High
747
+ 746,Punjab,58,1.626,4.163,1.882,Rice,0,4.91,-1.709,0,0.4521,2.5611,1.0,0.0,0,0,505,High
748
+ 747,Maharashtra,68,4.17,4.085,0.795,Rice,1,-28.948,0.145,0,0.1947,0.9796,1.0,28.9477,1,1,300,High
749
+ 748,Maharashtra,64,0.5,10.814,0.664,Wheat,0,-24.358,0.551,0,0.0614,21.6276,0.2,4.8715,1,0,500,High
750
+ 749,Punjab,39,0.977,15.0,6.309,Rice,1,5.866,0.592,3,0.4206,15.3597,1.0,0.0,0,1,300,High
751
+ 750,Punjab,32,0.97,15.0,1.508,Millets,1,-14.203,-1.413,0,0.1006,15.4605,0.0,0.0,0,0,374,High
752
+ 751,Maharashtra,47,1.697,15.0,4.008,Rice,0,-45.297,-0.957,1,0.2672,8.8391,1.0,45.2967,1,0,312,High
753
+ 752,Punjab,25,11.792,10.033,5.044,Wheat,0,-32.995,0.695,1,0.5028,0.8508,0.2,6.599,0,1,446,High
754
+ 753,Punjab,49,0.5,5.36,3.713,Cotton,0,-15.741,-1.062,0,0.6927,10.7194,0.5,7.8703,0,0,453,High
755
+ 754,Maharashtra,43,2.194,15.0,0.703,Wheat,0,-29.446,-0.6,2,0.0469,6.8375,0.2,5.8891,1,0,415,High
756
+ 755,Maharashtra,39,0.593,5.631,6.376,Rice,0,-18.201,1.276,2,1.1324,9.4948,1.0,18.2014,1,1,342,High
757
+ 756,Punjab,26,10.588,15.0,0.579,Cotton,0,-11.514,-0.348,1,0.0386,1.4167,0.5,5.757,0,1,545,High
758
+ 757,Punjab,51,0.5,9.704,6.214,Cotton,0,9.934,-1.027,0,0.6404,19.4071,0.5,0.0,0,0,522,High
759
+ 758,Maharashtra,39,1.551,15.0,7.2,Millets,0,-16.357,-1.178,0,0.48,9.6741,0.0,0.0,1,0,458,High
760
+ 759,Punjab,31,4.017,15.0,3.746,Rice,0,4.088,0.033,0,0.2498,3.7342,1.0,0.0,0,0,594,High
761
+ 760,Punjab,25,3.658,10.918,4.517,Millets,0,9.431,-1.633,0,0.4137,2.9848,0.0,0.0,0,0,546,High
762
+ 761,Maharashtra,45,1.648,8.04,4.077,Sugarcane,0,9.515,-0.547,1,0.5071,4.8779,1.0,0.0,1,0,473,High
763
+ 762,Maharashtra,66,1.276,9.275,3.419,Cotton,0,-7.729,0.033,3,0.3687,7.2665,0.5,3.8643,1,1,363,High
764
+ 763,Maharashtra,65,1.521,15.0,7.156,Sugarcane,0,-41.449,0.999,1,0.477,9.8648,1.0,41.4493,1,1,322,High
765
+ 764,Punjab,40,0.921,12.958,7.205,Rice,0,-5.088,0.368,2,0.556,14.0742,1.0,5.0876,0,0,439,High
766
+ 765,Maharashtra,38,0.689,7.576,3.019,Millets,0,3.726,-1.014,1,0.3985,10.9874,0.0,0.0,1,1,465,High
767
+ 766,Maharashtra,51,1.979,10.671,5.113,Wheat,0,-13.216,0.878,0,0.4792,5.3909,0.2,2.6432,1,1,490,High
768
+ 767,Punjab,33,0.938,12.973,7.452,Cotton,0,14.169,-0.6,2,0.5744,13.8287,0.5,0.0,0,1,471,High
769
+ 768,Punjab,49,1.017,2.219,7.715,Cotton,0,0.898,-1.536,0,3.4771,2.1823,0.5,0.0,0,0,425,High
770
+ 769,Maharashtra,54,3.208,15.0,4.317,Rice,0,-3.476,-0.472,2,0.2878,4.6759,1.0,3.4759,1,0,434,High
771
+ 770,Punjab,60,10.377,5.563,3.896,Millets,1,4.296,1.138,0,0.7003,0.5361,0.0,0.0,0,0,377,High
772
+ 771,Maharashtra,44,2.776,4.842,2.59,Rice,0,-6.999,-0.135,0,0.5349,1.7441,1.0,6.9995,1,0,473,High
773
+ 772,Punjab,43,0.5,3.159,7.692,Wheat,0,-49.392,-0.287,2,2.4351,6.3172,0.2,9.8784,0,1,300,High
774
+ 773,Maharashtra,34,0.5,2.901,1.571,Cotton,0,-19.487,1.337,1,0.5417,5.801,0.5,9.7435,1,0,433,High
775
+ 774,Maharashtra,35,9.074,4.119,4.849,Millets,0,5.958,-1.731,2,1.1771,0.454,0.0,0.0,1,1,383,High
776
+ 775,Punjab,42,1.058,6.909,2.619,Rice,0,-24.114,-1.586,2,0.3791,6.5273,1.0,24.1139,0,1,340,High
777
+ 776,Maharashtra,49,0.5,15.0,2.593,Wheat,0,-15.352,-1.916,0,0.1728,30.0,0.2,3.0704,1,0,488,High
778
+ 777,Maharashtra,56,2.742,7.999,3.537,Wheat,0,-27.673,0.073,1,0.4422,2.9175,0.2,5.5345,1,1,397,High
779
+ 778,Punjab,35,2.932,14.044,7.991,Sugarcane,0,14.759,-0.134,0,0.569,4.7904,1.0,0.0,0,0,561,High
780
+ 779,Punjab,63,3.137,15.0,0.912,Rice,0,13.222,1.243,1,0.0608,4.7821,1.0,0.0,0,0,608,Medium
781
+ 780,Punjab,42,0.933,13.529,4.839,Rice,0,-25.258,-0.057,1,0.3577,14.4934,1.0,25.258,0,0,421,High
782
+ 781,Punjab,45,0.5,11.451,1.119,Rice,1,-9.791,-0.704,0,0.0977,22.9013,1.0,9.7905,0,0,360,High
783
+ 782,Maharashtra,36,10.059,4.682,1.659,Sugarcane,0,-22.207,-0.298,1,0.3543,0.4655,1.0,22.2074,1,1,392,High
784
+ 783,Maharashtra,25,0.867,15.0,3.797,Rice,0,-2.776,-0.182,1,0.2531,17.3086,1.0,2.7758,1,0,504,High
785
+ 784,Maharashtra,56,3.381,15.0,4.328,Wheat,0,-4.355,-1.972,0,0.2886,4.4362,0.2,0.871,1,0,488,High
786
+ 785,Maharashtra,54,3.679,3.17,2.441,Rice,0,0.176,2.0,2,0.7699,0.8618,1.0,0.0,1,0,447,High
787
+ 786,Punjab,42,2.825,5.37,2.873,Millets,0,-7.021,0.22,1,0.5351,1.9009,0.0,0.0,0,0,482,High
788
+ 787,Maharashtra,46,1.126,9.739,1.152,Millets,0,20.0,-0.09,2,0.1183,8.6504,0.0,0.0,1,0,504,High
789
+ 788,Maharashtra,51,0.949,5.631,2.774,Wheat,0,-27.419,0.315,0,0.4926,5.9364,0.2,5.4838,1,1,439,High
790
+ 789,Maharashtra,26,2.731,15.0,7.749,Cotton,0,-37.659,0.409,0,0.5166,5.4916,0.5,18.8295,1,0,412,High
791
+ 790,Punjab,39,6.032,6.803,7.585,Rice,0,-17.896,-0.441,1,1.115,1.1279,1.0,17.8964,0,0,378,High
792
+ 791,Maharashtra,55,8.797,15.0,3.012,Rice,0,-35.52,-0.931,0,0.2008,1.7051,1.0,35.5198,1,0,402,High
793
+ 792,Maharashtra,30,0.5,15.0,4.781,Cotton,0,-34.387,0.299,3,0.3188,30.0,0.5,17.1935,1,1,331,High
794
+ 793,Maharashtra,49,0.505,14.441,7.322,Wheat,0,-27.02,0.086,0,0.507,28.6157,0.2,5.4039,1,1,445,High
795
+ 794,Punjab,29,8.687,15.0,0.546,Wheat,0,-25.833,-1.11,1,0.0364,1.7267,0.2,5.1666,0,1,498,High
796
+ 795,Maharashtra,51,4.002,15.0,6.58,Millets,0,-26.319,1.119,1,0.4387,3.7486,0.0,0.0,1,0,441,High
797
+ 796,Punjab,45,6.437,7.759,7.613,Cotton,0,-4.227,-0.007,0,0.9812,1.2054,0.5,2.1134,0,0,486,High
798
+ 797,Punjab,26,0.679,6.341,1.185,Wheat,0,-19.593,0.43,0,0.1869,9.3342,0.2,3.9186,0,0,524,High
799
+ 798,Maharashtra,59,2.657,12.968,1.711,Wheat,0,-14.693,1.092,1,0.1319,4.8805,0.2,2.9385,1,0,494,High
800
+ 799,Punjab,36,3.623,15.0,7.706,Wheat,0,1.413,-0.278,1,0.5137,4.1398,0.2,0.0,0,0,498,High
801
+ 800,Punjab,35,3.419,13.616,4.532,Cotton,0,-23.495,0.017,0,0.3328,3.9821,0.5,11.7474,0,0,497,High
802
+ 801,Punjab,47,1.574,3.45,0.606,Wheat,0,-15.968,0.51,2,0.1758,2.1926,0.2,3.1936,0,0,432,High
803
+ 802,Maharashtra,59,0.5,6.409,2.432,Wheat,1,-6.514,-1.025,0,0.3795,12.8185,0.2,1.3027,1,0,300,High
804
+ 803,Maharashtra,33,2.623,11.482,3.875,Sugarcane,0,-41.124,-0.246,0,0.3374,4.3768,1.0,41.1235,1,0,371,High
805
+ 804,Punjab,46,0.875,11.467,5.697,Millets,0,-47.774,-0.174,1,0.4968,13.0979,0.0,0.0,0,0,391,High
806
+ 805,Maharashtra,50,1.795,15.0,5.999,Cotton,0,-6.808,-1.256,0,0.3999,8.357,0.5,3.4041,1,0,477,High
807
+ 806,Punjab,53,9.48,4.02,7.966,Rice,0,-4.62,2.0,2,1.9817,0.424,1.0,4.6198,0,0,410,High
808
+ 807,Punjab,47,1.528,15.0,2.656,Wheat,0,18.963,-1.707,0,0.1771,9.819,0.2,0.0,0,0,595,High
809
+ 808,Punjab,41,5.494,15.0,4.537,Wheat,0,-9.629,-1.598,0,0.3024,2.7302,0.2,1.9257,0,1,519,High
810
+ 809,Maharashtra,35,0.627,15.0,4.5,Rice,1,0.296,1.014,0,0.3,23.9325,1.0,0.0,1,1,391,High
811
+ 810,Maharashtra,46,3.348,8.815,3.542,Sugarcane,1,-14.932,0.413,1,0.4018,2.6326,1.0,14.9321,1,1,300,High
812
+ 811,Punjab,32,11.318,15.0,1.769,Millets,0,-7.542,-1.326,1,0.1179,1.3254,0.0,0.0,0,0,531,High
813
+ 812,Punjab,25,0.5,15.0,7.831,Millets,0,13.009,0.307,1,0.5221,30.0,0.0,0.0,0,1,543,High
814
+ 813,Maharashtra,50,0.5,14.245,6.9,Rice,1,-43.86,1.168,0,0.4844,28.4894,1.0,43.8599,1,1,300,High
815
+ 814,Punjab,56,1.705,11.256,4.237,Millets,0,-5.796,-0.33,0,0.3765,6.6009,0.0,0.0,0,0,526,High
816
+ 815,Punjab,25,0.5,15.0,5.024,Sugarcane,0,20.0,2.0,2,0.335,30.0,1.0,0.0,0,0,578,High
817
+ 816,Maharashtra,33,4.14,1.607,2.204,Wheat,0,-7.769,-2.024,0,1.372,0.3881,0.2,1.5539,1,1,435,High
818
+ 817,Maharashtra,52,7.379,15.0,4.578,Wheat,0,12.759,0.394,2,0.3052,2.0327,0.2,0.0,1,0,493,High
819
+ 818,Maharashtra,70,1.708,13.476,5.712,Sugarcane,0,-21.438,0.867,0,0.4239,7.8921,1.0,21.4382,1,1,440,High
820
+ 819,Maharashtra,45,0.898,10.196,4.364,Wheat,0,-12.481,0.591,2,0.428,11.3532,0.2,2.4961,1,1,414,High
821
+ 820,Maharashtra,36,1.71,15.0,7.927,Cotton,0,-11.497,-0.504,0,0.5285,8.7739,0.5,5.7486,1,0,465,High
822
+ 821,Punjab,43,3.856,7.1,5.085,Wheat,0,-45.264,-0.59,1,0.7162,1.8412,0.2,9.0528,0,1,356,High
823
+ 822,Maharashtra,61,0.5,8.825,3.282,Wheat,0,-29.523,0.144,0,0.372,17.6491,0.2,5.9045,1,1,441,High
824
+ 823,Maharashtra,37,2.671,15.0,6.291,Rice,0,-28.453,0.516,0,0.4194,5.6163,1.0,28.4531,1,1,427,High
825
+ 824,Maharashtra,35,2.85,6.261,1.778,Millets,0,0.331,0.302,0,0.2841,2.1967,0.0,0.0,1,0,531,High
826
+ 825,Maharashtra,39,3.046,7.845,3.384,Wheat,0,1.082,0.74,0,0.4313,2.5758,0.2,0.0,1,0,531,High
827
+ 826,Punjab,34,0.831,10.831,3.102,Wheat,0,-7.139,-1.319,0,0.2864,13.0285,0.2,1.4279,0,0,524,High
828
+ 827,Maharashtra,46,3.756,15.0,3.739,Rice,1,0.362,-0.528,1,0.2492,3.9938,1.0,0.0,1,1,321,High
829
+ 828,Maharashtra,64,0.5,14.386,6.363,Wheat,1,-14.462,-1.24,1,0.4423,28.7716,0.2,2.8924,1,0,300,High
830
+ 829,Punjab,49,0.667,4.331,4.131,Rice,0,6.029,-0.686,1,0.9538,6.4969,1.0,0.0,0,0,467,High
831
+ 830,Maharashtra,42,6.298,7.959,6.455,Rice,0,-11.868,0.715,1,0.8111,1.2636,1.0,11.8682,1,0,412,High
832
+ 831,Maharashtra,41,4.027,7.494,4.824,Wheat,0,-11.132,-0.192,1,0.6437,1.8612,0.2,2.2264,1,0,425,High
833
+ 832,Maharashtra,26,0.5,11.453,3.066,Cotton,0,-15.984,2.0,0,0.2677,22.9053,0.5,7.9919,1,0,538,High
834
+ 833,Maharashtra,56,0.857,15.0,6.575,Wheat,1,-1.733,-0.107,0,0.4383,17.5119,0.2,0.3466,1,0,332,High
835
+ 834,Maharashtra,44,0.724,15.0,2.287,Rice,1,-18.318,-0.24,0,0.1525,20.7197,1.0,18.318,1,1,314,High
836
+ 835,Maharashtra,43,0.947,2.942,2.183,Cotton,0,2.646,-0.194,2,0.7419,3.1055,0.5,0.0,1,1,415,High
837
+ 836,Maharashtra,70,0.853,15.0,4.284,Rice,0,-28.982,-0.938,0,0.2856,17.5788,1.0,28.9822,1,1,402,High
838
+ 837,Punjab,49,0.5,14.91,2.456,Millets,0,-28.484,-0.358,0,0.1647,29.8207,0.0,0.0,0,0,525,High
839
+ 838,Maharashtra,36,1.843,15.0,0.568,Wheat,0,-1.689,0.828,1,0.0379,8.1403,0.2,0.3377,1,0,556,High
840
+ 839,Maharashtra,40,3.959,15.0,5.362,Wheat,0,-13.328,-0.186,0,0.3575,3.7893,0.2,2.6656,1,1,498,High
841
+ 840,Punjab,59,2.8,15.0,4.333,Cotton,0,-18.808,-1.093,2,0.2889,5.3575,0.5,9.4042,0,0,406,High
842
+ 841,Maharashtra,46,3.352,15.0,3.841,Rice,0,1.351,-1.225,2,0.2561,4.4747,1.0,0.0,1,0,444,High
843
+ 842,Punjab,28,0.5,15.0,7.752,Millets,0,-21.109,-0.75,0,0.5168,30.0,0.0,0.0,0,0,490,High
844
+ 843,Maharashtra,56,9.078,15.0,4.784,Cotton,0,-15.003,-0.226,0,0.3189,1.6523,0.5,7.5015,1,0,488,High
845
+ 844,Punjab,37,5.47,11.265,6.976,Cotton,0,8.988,0.894,0,0.6193,2.0595,0.5,0.0,0,0,565,High
846
+ 845,Maharashtra,67,4.906,15.0,1.546,Wheat,0,11.087,-1.64,1,0.1031,3.0577,0.2,0.0,1,1,513,High
847
+ 846,Maharashtra,58,5.195,15.0,4.769,Rice,0,11.586,-0.62,0,0.3179,2.8876,1.0,0.0,1,0,545,High
848
+ 847,Maharashtra,40,8.096,15.0,7.01,Sugarcane,0,-16.232,-0.156,1,0.4673,1.8527,1.0,16.2319,1,0,415,High
849
+ 848,Punjab,60,2.357,4.388,4.873,Wheat,0,6.461,-2.134,1,1.1105,1.8615,0.2,0.0,0,1,428,High
850
+ 849,Maharashtra,46,0.67,4.346,5.885,Cotton,1,-26.234,-1.134,0,1.354,6.4825,0.5,13.1171,1,1,300,High
851
+ 850,Maharashtra,55,2.877,15.0,3.29,Rice,0,-25.604,-0.98,0,0.2194,5.2129,1.0,25.6035,1,0,431,High
852
+ 851,Maharashtra,51,4.075,13.687,1.193,Rice,0,-47.257,-1.096,1,0.0872,3.359,1.0,47.2568,1,1,323,High
853
+ 852,Punjab,35,4.017,7.454,3.934,Millets,0,13.093,-0.108,0,0.5278,1.8554,0.0,0.0,0,0,565,High
854
+ 853,Maharashtra,37,2.211,13.637,3.459,Wheat,0,-24.96,-0.461,2,0.2536,6.1679,0.2,4.9919,1,1,395,High
855
+ 854,Punjab,57,0.5,15.0,7.003,Rice,1,-13.898,-0.855,0,0.4669,30.0,1.0,13.898,0,1,300,High
856
+ 855,Maharashtra,41,1.391,15.0,2.33,Rice,0,-25.655,0.128,1,0.1553,10.7804,1.0,25.6549,1,0,428,High
857
+ 856,Maharashtra,40,7.606,4.89,7.751,Wheat,1,-1.573,1.423,2,1.585,0.6429,0.2,0.3145,1,1,300,High
858
+ 857,Maharashtra,34,2.634,11.143,7.686,Wheat,0,-17.635,1.339,2,0.6898,4.2296,0.2,3.5269,1,1,391,High
859
+ 858,Maharashtra,50,2.319,6.398,2.357,Cotton,1,-31.572,-2.223,0,0.3684,2.7594,0.5,15.7861,1,1,300,High
860
+ 859,Maharashtra,70,0.939,8.934,3.11,Cotton,0,-5.375,0.277,0,0.3482,9.5098,0.5,2.6875,1,1,496,High
861
+ 860,Maharashtra,32,1.379,8.75,7.217,Rice,1,-33.506,-0.478,1,0.8247,6.3468,1.0,33.506,1,1,300,High
862
+ 861,Punjab,45,6.771,8.314,7.75,Wheat,0,-24.561,-0.145,0,0.9322,1.2278,0.2,4.9122,0,0,438,High
863
+ 862,Maharashtra,62,3.294,4.463,3.826,Millets,0,-43.603,-0.698,0,0.8572,1.355,0.0,0.0,1,1,372,High
864
+ 863,Maharashtra,44,4.645,11.0,2.907,Rice,0,-33.359,-0.182,2,0.2643,2.3682,1.0,33.3594,1,1,324,High
865
+ 864,Maharashtra,50,1.817,7.78,4.446,Wheat,1,-9.322,-0.149,0,0.5715,4.2809,0.2,1.8644,1,1,300,High
866
+ 865,Maharashtra,32,2.985,1.169,5.658,Cotton,0,-41.468,-0.879,0,4.8388,0.3918,0.5,20.734,1,1,305,High
867
+ 866,Maharashtra,50,0.857,15.0,2.551,Cotton,0,-34.217,-1.196,0,0.1701,17.5113,0.5,17.1086,1,0,435,High
868
+ 867,Maharashtra,43,3.667,15.0,6.024,Cotton,1,-12.036,-0.749,1,0.4016,4.0905,0.5,6.0178,1,1,300,High
869
+ 868,Maharashtra,57,1.674,9.016,0.887,Sugarcane,0,-20.154,-0.066,1,0.0984,5.3865,1.0,20.1541,1,1,418,High
870
+ 869,Punjab,59,1.753,12.367,0.87,Wheat,0,17.881,0.299,0,0.0703,7.0544,0.2,0.0,0,0,629,Medium
871
+ 870,Punjab,70,3.144,4.772,3.397,Wheat,0,15.508,0.553,0,0.712,1.5178,0.2,0.0,0,0,554,High
872
+ 871,Maharashtra,52,8.26,15.0,3.151,Cotton,0,-25.019,-0.794,0,0.2101,1.816,0.5,12.5094,1,0,466,High
873
+ 872,Maharashtra,49,0.5,15.0,2.867,Rice,1,-3.643,-0.016,1,0.1911,30.0,1.0,3.6429,1,0,328,High
874
+ 873,Punjab,47,5.225,13.809,4.183,Rice,0,-0.761,0.663,0,0.3029,2.6432,1.0,0.7608,0,0,576,High
875
+ 874,Maharashtra,41,1.038,15.0,2.906,Sugarcane,0,-20.962,0.866,2,0.1937,14.457,1.0,20.9622,1,1,414,High
876
+ 875,Maharashtra,49,1.761,14.016,1.942,Rice,1,-34.433,-0.359,0,0.1385,7.9615,1.0,34.4331,1,1,300,High
877
+ 876,Maharashtra,41,0.5,4.181,2.821,Wheat,0,-12.184,-0.521,3,0.6747,8.3626,0.2,2.4369,1,1,335,High
878
+ 877,Punjab,47,1.075,8.763,7.812,Cotton,0,-14.593,-0.109,0,0.8914,8.1554,0.5,7.2963,0,0,452,High
879
+ 878,Punjab,61,2.095,13.539,3.583,Cotton,0,-18.536,-1.45,1,0.2647,6.4615,0.5,9.2682,0,1,439,High
880
+ 879,Maharashtra,33,0.5,8.469,3.835,Wheat,0,-5.365,-0.494,0,0.4529,16.9371,0.2,1.073,1,1,495,High
881
+ 880,Maharashtra,59,2.026,10.227,4.824,Cotton,0,-23.261,0.445,0,0.4717,5.0469,0.5,11.6305,1,0,441,High
882
+ 881,Maharashtra,61,7.856,11.324,7.875,Rice,1,-29.28,0.342,2,0.6955,1.4413,1.0,29.28,1,1,300,High
883
+ 882,Punjab,44,0.5,11.419,2.312,Cotton,0,-10.364,-0.57,2,0.2025,22.8384,0.5,5.1819,0,0,452,High
884
+ 883,Maharashtra,25,4.337,12.703,5.61,Wheat,0,-6.21,-0.082,0,0.4416,2.9286,0.2,1.2421,1,0,510,High
885
+ 884,Maharashtra,38,1.581,5.215,5.87,Wheat,0,-29.65,-1.125,1,1.1256,3.298,0.2,5.9299,1,0,336,High
886
+ 885,Punjab,61,3.194,6.865,5.055,Cotton,0,1.921,0.403,1,0.7364,2.1491,0.5,0.0,0,0,480,High
887
+ 886,Maharashtra,45,0.904,4.359,1.164,Wheat,1,-38.557,-0.378,2,0.2671,4.8209,0.2,7.7114,1,1,300,High
888
+ 887,Punjab,33,0.521,15.0,5.577,Rice,1,-20.672,-0.576,0,0.3718,28.7771,1.0,20.6717,0,0,302,High
889
+ 888,Maharashtra,39,0.525,2.26,0.981,Rice,0,-15.87,-0.662,1,0.4339,4.3076,1.0,15.8701,1,0,392,High
890
+ 889,Maharashtra,55,0.5,15.0,4.971,Rice,0,-21.543,-0.363,0,0.3314,30.0,1.0,21.5434,1,1,446,High
891
+ 890,Maharashtra,52,0.616,15.0,6.047,Millets,0,-20.476,-0.748,0,0.4031,24.3474,0.0,0.0,1,1,466,High
892
+ 891,Punjab,42,3.274,9.566,2.082,Rice,0,16.066,0.358,2,0.2177,2.922,1.0,0.0,0,0,525,High
893
+ 892,Punjab,41,6.403,1.518,6.812,Rice,0,-24.763,-0.695,0,4.4872,0.2371,1.0,24.7633,0,0,357,High
894
+ 893,Punjab,40,5.048,9.124,0.728,Cotton,0,20.0,1.293,0,0.0797,1.8075,0.5,0.0,0,0,647,Medium
895
+ 894,Maharashtra,34,3.467,11.573,6.829,Rice,0,-5.443,1.165,1,0.5901,3.3381,1.0,5.4431,1,1,463,High
896
+ 895,Punjab,64,0.5,5.428,3.952,Wheat,0,-10.619,-1.192,1,0.7282,10.8555,0.2,2.1238,0,1,421,High
897
+ 896,Maharashtra,41,1.024,8.067,2.132,Rice,0,-4.856,-0.23,0,0.2643,7.878,1.0,4.8564,1,0,504,High
898
+ 897,Maharashtra,60,1.112,15.0,1.503,Rice,0,20.0,-0.951,0,0.1002,13.4849,1.0,0.0,1,1,588,High
899
+ 898,Punjab,63,0.863,15.0,7.65,Wheat,0,-26.904,-0.627,2,0.51,17.3838,0.2,5.3808,0,1,369,High
900
+ 899,Maharashtra,57,2.171,5.814,1.045,Cotton,0,-28.806,1.702,0,0.1797,2.6784,0.5,14.4031,1,0,464,High
901
+ 900,Maharashtra,40,2.301,3.394,1.993,Sugarcane,0,-23.323,-0.608,1,0.5873,1.4751,1.0,23.323,1,0,360,High
902
+ 901,Maharashtra,50,1.324,9.378,3.109,Wheat,1,-11.518,0.06,1,0.3315,7.0816,0.2,2.3036,1,1,300,High
903
+ 902,Maharashtra,45,1.31,10.27,5.152,Cotton,0,-37.887,0.241,0,0.5016,7.8404,0.5,18.9433,1,0,398,High
904
+ 903,Maharashtra,34,5.29,15.0,4.586,Wheat,0,-11.665,-1.301,2,0.3057,2.8353,0.2,2.333,1,1,412,High
905
+ 904,Maharashtra,49,4.672,7.939,1.442,Rice,0,13.403,-1.155,1,0.1817,1.6993,1.0,0.0,1,0,497,High
906
+ 905,Maharashtra,31,1.104,15.0,2.673,Wheat,0,-9.729,-1.506,0,0.1782,13.5916,0.2,1.9458,1,0,514,High
907
+ 906,Punjab,59,7.353,15.0,2.291,Cotton,1,-16.39,-1.186,1,0.1527,2.04,0.5,8.1951,0,1,300,High
908
+ 907,Punjab,39,9.161,15.0,2.102,Cotton,0,-21.272,-3.0,1,0.1401,1.6374,0.5,10.6362,0,1,442,High
909
+ 908,Maharashtra,47,1.187,11.723,3.584,Wheat,0,1.478,0.245,1,0.3057,9.8769,0.2,0.0,1,1,497,High
910
+ 909,Maharashtra,48,1.313,10.522,5.78,Millets,1,-24.387,1.754,2,0.5493,8.0148,0.0,0.0,1,1,300,High
911
+ 910,Maharashtra,42,2.113,9.158,2.131,Millets,0,15.696,-0.152,0,0.2327,4.3334,0.0,0.0,1,0,564,High
912
+ 911,Maharashtra,52,8.497,15.0,3.25,Wheat,0,17.0,-1.716,0,0.2167,1.7654,0.2,0.0,1,0,558,High
913
+ 912,Maharashtra,39,6.27,7.375,3.432,Cotton,0,-8.149,-0.943,0,0.4653,1.1763,0.5,4.0744,1,0,472,High
914
+ 913,Punjab,55,0.5,12.631,7.823,Rice,0,-12.173,-0.759,0,0.6194,25.2626,1.0,12.1727,0,0,459,High
915
+ 914,Maharashtra,29,1.496,12.692,7.66,Cotton,0,3.46,-1.318,0,0.6035,8.4819,0.5,0.0,1,1,484,High
916
+ 915,Maharashtra,47,2.418,8.155,6.501,Wheat,0,4.422,0.56,2,0.7972,3.3723,0.2,0.0,1,0,418,High
917
+ 916,Maharashtra,68,2.098,4.063,2.312,Cotton,0,-24.09,0.51,1,0.5691,1.9365,0.5,12.0449,1,0,385,High
918
+ 917,Maharashtra,33,0.647,15.0,1.01,Millets,1,-19.898,-1.455,1,0.0674,23.2017,0.0,0.0,1,1,300,High
919
+ 918,Punjab,37,5.873,11.602,2.877,Cotton,0,-31.835,0.425,1,0.248,1.9755,0.5,15.9176,0,1,447,High
920
+ 919,Punjab,51,3.39,15.0,2.501,Cotton,0,-5.864,1.227,2,0.1667,4.4251,0.5,2.932,0,0,512,High
921
+ 920,Maharashtra,47,5.459,7.95,4.294,Cotton,0,-2.001,1.603,0,0.5402,1.4563,0.5,1.0003,1,1,528,High
922
+ 921,Punjab,49,5.872,15.0,6.333,Sugarcane,0,-32.249,2.0,2,0.4222,2.5545,1.0,32.2489,0,0,384,High
923
+ 922,Maharashtra,51,4.139,6.041,6.937,Wheat,0,-18.828,-1.202,0,1.1484,1.4595,0.2,3.7656,1,1,392,High
924
+ 923,Punjab,53,1.735,15.0,6.836,Wheat,1,-32.209,2.0,2,0.4558,8.6444,0.2,6.4418,0,1,300,High
925
+ 924,Punjab,58,2.829,3.01,3.198,Cotton,0,-25.482,-0.654,1,1.0624,1.0639,0.5,12.741,0,1,378,High
926
+ 925,Maharashtra,50,0.524,15.0,5.654,Sugarcane,0,-3.735,-0.892,0,0.377,28.606,1.0,3.7347,1,0,498,High
927
+ 926,Maharashtra,42,3.359,15.0,2.846,Rice,0,-23.002,0.027,1,0.1898,4.4652,1.0,23.0022,1,0,431,High
928
+ 927,Maharashtra,53,0.593,6.447,0.957,Millets,0,-16.512,-0.882,1,0.1484,10.8781,0.0,0.0,1,0,432,High
929
+ 928,Maharashtra,68,3.552,15.0,5.762,Wheat,1,-36.41,0.099,0,0.3841,4.223,0.2,7.2819,1,1,300,High
930
+ 929,Punjab,43,0.783,15.0,0.574,Cotton,0,-9.195,-1.62,1,0.0382,19.1686,0.5,4.5976,0,0,514,High
931
+ 930,Maharashtra,33,0.5,2.068,3.569,Wheat,1,-12.664,-0.539,0,1.7258,4.1358,0.2,2.5328,1,1,300,High
932
+ 931,Maharashtra,58,0.542,15.0,2.97,Wheat,0,-22.934,0.986,0,0.198,27.6756,0.2,4.5869,1,0,516,High
933
+ 932,Punjab,44,0.5,1.658,5.7,Rice,0,-14.835,-0.357,2,3.4389,3.3152,1.0,14.8352,0,0,327,High
934
+ 933,Punjab,25,3.805,5.626,6.247,Millets,0,-9.296,-0.158,1,1.1103,1.4785,0.0,0.0,0,0,445,High
935
+ 934,Maharashtra,55,3.955,15.0,2.781,Cotton,0,-24.223,0.175,2,0.1854,3.7929,0.5,12.1115,1,0,403,High
936
+ 935,Maharashtra,39,2.17,7.649,6.587,Cotton,0,-34.144,0.871,1,0.8612,3.5242,0.5,17.072,1,1,353,High
937
+ 936,Maharashtra,44,0.528,4.763,2.704,Rice,0,15.084,-1.955,0,0.5678,9.0222,1.0,0.0,1,0,495,High
938
+ 937,Maharashtra,49,0.5,10.398,3.847,Cotton,0,-21.499,0.285,1,0.37,20.7968,0.5,10.7495,1,0,422,High
939
+ 938,Punjab,47,0.5,15.0,5.953,Wheat,0,-13.451,-0.568,1,0.3968,30.0,0.2,2.6903,0,0,473,High
940
+ 939,Maharashtra,54,0.544,2.814,5.697,Cotton,0,3.163,-0.133,3,2.0244,5.1763,0.5,0.0,1,0,331,High
941
+ 940,Maharashtra,40,6.645,5.254,7.905,Wheat,0,20.0,0.76,0,1.5047,0.7906,0.2,0.0,1,0,511,High
942
+ 941,Maharashtra,51,0.829,15.0,2.189,Cotton,1,-30.667,-1.494,2,0.1459,18.0857,0.5,15.3336,1,1,300,High
943
+ 942,Maharashtra,42,1.312,15.0,5.467,Millets,0,-5.253,-1.313,2,0.3645,11.4318,0.0,0.0,1,0,414,High
944
+ 943,Punjab,54,0.5,11.215,5.073,Wheat,0,-22.613,-2.235,1,0.4523,22.4301,0.2,4.5227,0,1,401,High
945
+ 944,Punjab,52,0.754,4.521,7.363,Sugarcane,0,-20.082,-0.849,2,1.6286,5.9924,1.0,20.0819,0,1,300,High
946
+ 945,Maharashtra,34,2.197,15.0,1.673,Rice,0,-22.803,1.03,0,0.1115,6.8273,1.0,22.8032,1,1,507,High
947
+ 946,Maharashtra,58,2.808,15.0,6.138,Cotton,0,-28.885,-0.421,3,0.4092,5.3427,0.5,14.4424,1,1,300,High
948
+ 947,Maharashtra,39,0.845,15.0,4.762,Cotton,0,-12.619,-1.64,1,0.3175,17.7617,0.5,6.3097,1,1,432,High
949
+ 948,Punjab,55,0.5,6.36,2.56,Wheat,0,-34.118,-0.786,0,0.4025,12.7206,0.2,6.8235,0,0,437,High
950
+ 949,Punjab,49,1.488,11.714,4.058,Millets,1,2.202,-1.788,2,0.3464,7.8724,0.0,0.0,0,1,300,High
951
+ 950,Maharashtra,67,0.801,10.716,3.003,Rice,0,-11.175,-1.425,0,0.2803,13.386,1.0,11.175,1,0,451,High
952
+ 951,Punjab,42,0.744,15.0,4.845,Rice,0,-5.663,0.089,0,0.323,20.1703,1.0,5.6635,0,0,549,High
953
+ 952,Punjab,41,9.646,15.0,7.168,Millets,0,-18.993,-1.474,1,0.4778,1.555,0.0,0.0,0,1,441,High
954
+ 953,Maharashtra,45,2.874,15.0,4.77,Rice,0,-17.508,0.813,0,0.318,5.2198,1.0,17.5081,1,0,486,High
955
+ 954,Punjab,41,2.442,5.145,5.238,Wheat,0,-7.687,-0.371,0,1.018,2.1073,0.2,1.5373,0,0,480,High
956
+ 955,Maharashtra,55,1.612,15.0,4.391,Wheat,0,-29.461,-0.214,2,0.2927,9.3029,0.2,5.8922,1,1,378,High
957
+ 956,Maharashtra,26,1.681,15.0,0.884,Sugarcane,0,-17.37,-0.578,0,0.0589,8.9243,1.0,17.3699,1,0,509,High
958
+ 957,Maharashtra,32,2.335,15.0,2.246,Rice,0,-24.894,0.473,0,0.1498,6.4226,1.0,24.8942,1,0,484,High
959
+ 958,Maharashtra,32,3.576,15.0,4.19,Rice,0,-25.359,0.483,0,0.2793,4.1941,1.0,25.3585,1,1,463,High
960
+ 959,Maharashtra,56,3.633,5.006,2.827,Wheat,0,-43.648,0.035,0,0.5646,1.3779,0.2,8.7295,1,0,389,High
961
+ 960,Punjab,66,0.565,11.838,1.863,Millets,0,8.09,0.265,1,0.1574,20.9484,0.0,0.0,0,0,553,High
962
+ 961,Maharashtra,44,2.08,7.963,4.281,Cotton,0,-22.298,-0.512,1,0.5376,3.8283,0.5,11.149,1,0,385,High
963
+ 962,Punjab,43,1.593,3.475,2.921,Cotton,1,5.451,0.242,2,0.8405,2.1819,0.5,0.0,0,1,300,High
964
+ 963,Maharashtra,46,6.133,15.0,2.436,Wheat,1,4.032,-0.638,1,0.1624,2.4458,0.2,0.0,1,1,343,High
965
+ 964,Maharashtra,59,2.994,15.0,3.98,Millets,0,-31.29,-0.298,0,0.2653,5.0095,0.0,0.0,1,0,466,High
966
+ 965,Maharashtra,34,2.281,2.795,1.5,Sugarcane,0,-28.326,-0.575,2,0.5365,1.2254,1.0,28.3262,1,1,306,High
967
+ 966,Maharashtra,48,0.5,11.872,7.458,Millets,0,20.0,-0.757,1,0.6282,23.7438,0.0,0.0,1,1,481,High
968
+ 967,Punjab,57,2.791,15.0,7.008,Rice,0,14.264,-0.989,1,0.4672,5.3735,1.0,0.0,0,0,508,High
969
+ 968,Maharashtra,51,0.5,13.443,5.807,Rice,0,-12.473,0.168,1,0.432,26.8861,1.0,12.4728,1,0,433,High
970
+ 969,Maharashtra,47,1.234,11.128,1.297,Wheat,0,-8.139,1.011,2,0.1165,9.019,0.2,1.6279,1,0,468,High
971
+ 970,Maharashtra,57,0.5,4.309,6.319,Sugarcane,0,-21.463,0.871,1,1.4666,8.6173,1.0,21.4627,1,1,346,High
972
+ 971,Punjab,25,3.534,14.676,6.56,Cotton,0,-5.515,-1.557,0,0.447,4.1532,0.5,2.7574,0,0,511,High
973
+ 972,Punjab,53,0.693,6.65,6.258,Rice,0,-22.758,0.989,1,0.9411,9.5961,1.0,22.7577,0,1,390,High
974
+ 973,Punjab,37,1.492,2.113,1.355,Sugarcane,1,-42.485,-0.618,0,0.6412,1.4161,1.0,42.4853,0,1,300,High
975
+ 974,Maharashtra,25,6.781,15.0,5.329,Rice,0,-31.823,0.301,0,0.3553,2.2122,1.0,31.8233,1,0,429,High
976
+ 975,Maharashtra,51,0.686,15.0,6.757,Cotton,0,-11.684,-1.206,0,0.4505,21.8767,0.5,5.8418,1,0,458,High
977
+ 976,Maharashtra,61,2.127,12.697,4.83,Wheat,0,-28.966,-0.158,0,0.3804,5.9702,0.2,5.7932,1,1,441,High
978
+ 977,Maharashtra,43,1.63,14.633,5.348,Wheat,0,-13.009,0.014,0,0.3655,8.9748,0.2,2.6018,1,0,498,High
979
+ 978,Maharashtra,56,0.5,15.0,3.938,Sugarcane,0,-28.12,-1.785,0,0.2625,30.0,1.0,28.1199,1,1,404,High
980
+ 979,Maharashtra,64,4.722,14.577,4.465,Cotton,0,-23.735,0.308,1,0.3063,3.0874,0.5,11.8677,1,0,424,High
981
+ 980,Maharashtra,61,0.5,15.0,0.758,Wheat,1,0.797,1.046,2,0.0505,30.0,0.2,0.0,1,1,339,High
982
+ 981,Maharashtra,65,1.929,9.602,5.292,Wheat,0,-8.288,-0.475,3,0.5511,4.9784,0.2,1.6576,1,0,339,High
983
+ 982,Punjab,54,2.468,15.0,1.111,Wheat,0,-12.145,1.06,0,0.0741,6.0789,0.2,2.429,0,0,590,High
984
+ 983,Maharashtra,46,2.97,15.0,3.763,Wheat,0,1.184,-0.49,1,0.2508,5.0505,0.2,0.0,1,0,500,High
985
+ 984,Maharashtra,26,3.5,14.228,2.695,Cotton,0,-4.791,0.55,2,0.1894,4.0649,0.5,2.3954,1,0,479,High
986
+ 985,Punjab,42,0.876,4.41,4.591,Rice,0,9.698,-2.519,0,1.0409,5.0337,1.0,0.0,0,1,480,High
987
+ 986,Maharashtra,35,0.5,15.0,1.501,Rice,1,-18.898,2.0,1,0.1,30.0,1.0,18.8979,1,1,330,High
988
+ 987,Punjab,70,3.856,6.262,5.687,Rice,1,-18.445,1.195,1,0.9083,1.6239,1.0,18.4445,0,0,300,High
989
+ 988,Maharashtra,43,2.301,7.311,6.463,Wheat,0,-31.517,-0.585,0,0.884,3.1768,0.2,6.3033,1,0,387,High
990
+ 989,Maharashtra,46,5.426,6.345,1.725,Sugarcane,0,-18.435,-2.272,2,0.2719,1.1694,1.0,18.4347,1,1,327,High
991
+ 990,Punjab,52,5.168,5.191,1.282,Sugarcane,0,2.472,-0.012,2,0.247,1.0046,1.0,0.0,0,0,469,High
992
+ 991,Punjab,46,5.561,15.0,1.591,Sugarcane,0,7.5,-1.744,0,0.1061,2.6975,1.0,0.0,0,0,583,High
993
+ 992,Punjab,65,1.991,15.0,7.078,Cotton,1,2.405,0.145,0,0.4719,7.5327,0.5,0.0,0,1,363,High
994
+ 993,Maharashtra,38,1.218,15.0,4.461,Cotton,0,-38.913,0.112,0,0.2974,12.3181,0.5,19.4564,1,0,431,High
995
+ 994,Maharashtra,47,4.704,4.58,4.004,Cotton,0,4.247,-1.241,0,0.8743,0.9736,0.5,0.0,1,0,471,High
996
+ 995,Maharashtra,36,1.801,12.897,1.3,Rice,0,-39.578,0.821,1,0.1008,7.1628,1.0,39.5778,1,0,390,High
997
+ 996,Maharashtra,29,0.608,4.328,5.372,Rice,0,1.472,0.506,1,1.241,7.1194,1.0,0.0,1,0,448,High
998
+ 997,Punjab,38,5.793,6.983,7.01,Wheat,1,-17.517,0.676,0,1.0039,1.2055,0.2,3.5034,0,1,300,High
999
+ 998,Maharashtra,45,6.425,5.844,6.711,Millets,0,-1.462,-0.291,2,1.1483,0.9096,0.0,0.0,1,1,378,High
1000
+ 999,Punjab,40,1.884,15.0,5.195,Rice,0,-31.987,-1.716,0,0.3464,7.9625,1.0,31.9867,0,1,409,High
1001
+ 1000,Maharashtra,37,0.5,8.873,1.065,Rice,0,5.568,0.678,0,0.12,17.7461,1.0,0.0,1,0,572,High
requirements.txt CHANGED
@@ -1,3 +1,9 @@
1
- altair
 
 
2
  pandas
3
- streamlit
 
 
 
 
 
1
+ streamlit
2
+ google-genai
3
+ scikit-learn
4
  pandas
5
+ numpy
6
+ joblib
7
+ matplotlib
8
+ plotly
9
+ fpdf2>=2.7.0
src/streamlit_app.py DELETED
@@ -1,40 +0,0 @@
1
- import altair as alt
2
- import numpy as np
3
- import pandas as pd
4
- import streamlit as st
5
-
6
- """
7
- # Welcome to Streamlit!
8
-
9
- Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
10
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
11
- forums](https://discuss.streamlit.io).
12
-
13
- In the meantime, below is an example of what you can do with just a few lines of code:
14
- """
15
-
16
- num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
17
- num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
18
-
19
- indices = np.linspace(0, 1, num_points)
20
- theta = 2 * np.pi * num_turns * indices
21
- radius = indices
22
-
23
- x = radius * np.cos(theta)
24
- y = radius * np.sin(theta)
25
-
26
- df = pd.DataFrame({
27
- "x": x,
28
- "y": y,
29
- "idx": indices,
30
- "rand": np.random.randn(num_points),
31
- })
32
-
33
- st.altair_chart(alt.Chart(df, height=700, width=700)
34
- .mark_point(filled=True)
35
- .encode(
36
- x=alt.X("x", axis=None),
37
- y=alt.Y("y", axis=None),
38
- color=alt.Color("idx", legend=None, scale=alt.Scale()),
39
- size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
40
- ))