Satyam0077 commited on
Commit
8aa35d5
Β·
verified Β·
1 Parent(s): 1b48bff

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -133
README.md CHANGED
@@ -1,141 +1,27 @@
1
- # 🌾 Project Samarth β€” Intelligent Q&A System
2
- **Bridging Agriculture & Climate Insights using Live Government Data**
3
-
4
- ---
5
-
6
- ### 🧠 Overview
7
-
8
- **Project Samarth** is an intelligent **Q&A system** built to analyze and answer complex, data-driven questions about **India’s agricultural economy** and its relationship with **climate patterns** β€” powered entirely by **live datasets from [data.gov.in](https://data.gov.in/)**.
9
-
10
- This system fetches real-time data from the:
11
- - πŸ›οΈ **Ministry of Agriculture & Farmers Welfare**
12
- - 🌦️ **India Meteorological Department (IMD)**
13
-
14
- It integrates both datasets and allows users to query them in **natural language** through a clean **Streamlit-based interface**.
15
-
16
- ---
17
-
18
- ### 🎯 Problem Statement
19
-
20
- Government portals like **data.gov.in** contain thousands of valuable datasets β€” but they exist in diverse formats across ministries, making it difficult to extract cross-domain insights.
21
-
22
- **Your Mission:**
23
- To design and build a **functional end-to-end prototype** that:
24
- 1. Fetches live government data using APIs.
25
- 2. Integrates multiple datasets (Agriculture + IMD Rainfall).
26
- 3. Enables users to ask **natural language questions**.
27
- 4. Returns accurate, traceable, and data-backed insights with proper citations.
28
-
29
  ---
30
-
31
- ### πŸš€ Features
32
-
33
- βœ… **Real-Time API Integration**
34
- - Fetches data directly from `data.gov.in` via official API keys and resource IDs.
35
- - Agriculture: Crop production data (1997–2014)
36
- - IMD: Sub-divisional rainfall data (1901–2017)
37
-
38
- βœ… **Data Integration Layer**
39
- - Automatically merges climate and crop production datasets using cleaned and normalized state names.
40
-
41
- βœ… **Intelligent Q&A Engine**
42
- - Understands queries like:
43
- - β€œCompare rainfall and rice production in Bihar and Jharkhand for the last 5 years.”
44
- - β€œAnalyze crop trends in Andhra Pradesh.”
45
-
46
- βœ… **Streamlit Chat Interface**
47
- - Simple user input box.
48
- - Clean, markdown-based formatted answers.
49
- - Auto-citation of data sources.
50
-
51
- βœ… **Accuracy & Traceability**
52
- - Every answer is directly backed by the live dataset and cited source.
53
-
54
- ---
55
-
56
- ### 🧩 System Architecture
57
-
58
- User (Streamlit UI)
59
- β”‚
60
- β–Ό
61
- Natural Language Parser (LLM / Keyword Extractor)
62
- β”‚
63
- β–Ό
64
- Query Engine (Pandas Logic)
65
- β”‚
66
- β–Ό
67
- Data Layer (APIs + Local CSV Integration)
68
- β”‚
69
- β–Ό
70
- Answer Generator (Formatter + Citation)
71
-
72
-
73
  ---
74
 
75
- ### 🧰 Tech Stack
76
-
77
- | Layer | Tools / Libraries |
78
- |-------|--------------------|
79
- | Data Fetching | `requests`, `pandas`, `json` |
80
- | Data Integration | `pandas`, `numpy` |
81
- | NLP Parsing | Custom keyword parser / rule-based |
82
- | Visualization | `matplotlib`, `seaborn`, `plotly` |
83
- | Frontend | `streamlit`, `style.css` |
84
- | Backend Logic | Python 3.10+ |
85
- | Source | [data.gov.in](https://data.gov.in) APIs |
86
 
87
- ---
 
88
 
89
- ### βš™οΈ Setup Instructions
 
 
 
 
90
 
91
- 1️⃣ **Clone the Repository**
92
  ```bash
93
- git clone https://github.com/<your-username>/Project_Samarth.git
94
- cd Project_Samarth
95
-
96
- 2️⃣ Create a Virtual Environment
97
-
98
- python -m venv venv
99
- source venv/bin/activate # (or venv\Scripts\activate on Windows)
100
-
101
-
102
- 3️⃣ Install Dependencies
103
-
104
  pip install -r requirements.txt
105
-
106
-
107
- 4️⃣ Fetch & Integrate Data
108
-
109
- python main.py
110
-
111
-
112
- 5️⃣ Run the Streamlit Q&A Interface
113
-
114
- streamlit run ui/app_streamlit.py
115
-
116
- 🧠 Example Query
117
-
118
- Input:
119
-
120
- Compare rainfall and rice production in Andaman and Nicobar Islands for the last 5 years
121
-
122
-
123
- Output:
124
-
125
- πŸ“Š Analysis for Andaman and Nicobar Islands β€” Crop: Rice
126
-
127
- 🌧️ Average Rainfall (mm):
128
- β€’ Andaman and Nicobar Islands: 1142.46
129
-
130
- 🌾 Total Production (tonnes):
131
- β€’ Andaman and Nicobar Islands: 45,451
132
-
133
- πŸ“š Data Source: Ministry of Agriculture & Farmers Welfare and India Meteorological Department (IMD), data.gov.in
134
-
135
- 🧩 Key Dataset References
136
- Dataset Ministry API Resource ID
137
- District-wise Crop Production Statistics (1997–2014) Ministry of Agriculture & Farmers Welfare xxxxx
138
- Sub-divisional Rainfall Data (1901–2017) India Meteorological Department (IMD) xxxxxx
139
-
140
- πŸ‘¨β€πŸ’» Developed By
141
- Satyam Kumar
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: "🌾 Project Samarth β€” Intelligent Q&A System"
3
+ emoji: 🌦️
4
+ colorFrom: green
5
+ colorTo: blue
6
+ sdk: streamlit
7
+ sdk_version: "1.38.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
+ # 🌾 Project Samarth β€” Intelligent Q&A System
 
 
 
 
 
 
 
 
 
 
14
 
15
+ An AI-powered Q&A interface that integrates live government data from **data.gov.in**
16
+ to answer natural language questions about agriculture and climate.
17
 
18
+ ## 🧠 Features
19
+ - Real-time data fetching via official APIs (Agriculture + IMD)
20
+ - Automatic data cleaning, merging, and correlation
21
+ - Streamlit chatbot for user-friendly question answering
22
+ - Source citation for every answer
23
 
24
+ ## βš™οΈ Run Locally
25
  ```bash
 
 
 
 
 
 
 
 
 
 
 
26
  pip install -r requirements.txt
27
+ streamlit run app.py