https://github.com/arush04/agriculturecasestudy
Comprehensive case study to assess and measure the climate resiliency of agricultural production in MH and MP.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Repository
Comprehensive case study to assess and measure the climate resiliency of agricultural production in MH and MP.
Basic Info
- Host: GitHub
- Owner: Arush04
- Language: Python
- Default Branch: main
- Size: 7.81 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
AGRICULTURE CASE STUDY
Table of Contents
- Overview
- Features
- Project Structure
- Getting Started
- Project Roadmap
- Contributing
- License
- Acknowledgments
Overview
This project, undertaken for agricultural policymakers and stakeholders in the Indian states of Maharashtra (MH) and Madhya Pradesh (MP), aimed to comprehensively assess and strengthen climate resiliency in regional agriculture—a critical issue for these states’ millions of farming families, given the mounting risks from unpredictable rainfall, temperature shifts, and frequent extreme weather. The initiative’s scope spanned deep-dive climate data analysis (including ten years’ temperature, rainfall, and NDVI satellite data), district-level crop performance evaluations, economic impact assessments, infrastructure and technology review, and policy effectiveness audits.
case study: https://docs.google.com/document/d/1fQWoklRnerbU-fw0uvym0x1-GisBtauC9V8fudRn8/edit?usp=sharing
demo video: https://drive.google.com/file/d/17s8pzaQSoNS3vHLsb88H5GDC71I41rUb/view?usp=sharing
Project Structure
sh
└── AgricultureCaseStudy/
├── README.md
├── data
│ └── raw
├── requirements.txt
└── src
├── config.py
├── extractor.py
├── main_MH.py
├── main_MP.py
├── plot_graphs.py
├── scrapper.py
├── visualize_mh.py
└── visualize_mp.py
└── tests
├── test_plotting.py
├── test_scrapper.py
Getting Started
Prerequisites
Before getting started with AgricultureCaseStudy, ensure your runtime environment meets the following requirements:
- Programming Language: Python
- Package Manager: Pip
Installation
Install AgricultureCaseStudy using one of the following methods:
Build from source:
Clone the AgricultureCaseStudy repository:
sh ❯ git clone https://github.com/Arush04/AgricultureCaseStudyNavigate to the project directory:
sh ❯ cd AgricultureCaseStudyInstall the project dependencies:
sh
❯ pip install -r requirements.txt
Steps
Make sure the requirements are installed and environment activated
1. Make use of the scrapper to download raster files:
Using pip
sh
❯ python src/scrapper.py
This will download files in data/download folder
- Check out to the downloads folder and select and extract all zip files, once extracted move all files to a new folder called
ndvi_filesin the data folder Then run this from root
sh ❯ python src/extractor.pyThis extracts all .tif files from thendvi_filesfolder and saves them in thedata/tif_filesNow we have all data, now run
sh ❯ python src/main_MH.py # for MP run src/main_MP.pyThis creates a folder calledanalysis_MHin the root directory which contains year-wise csv files with data like meantemp, meanndvi, rainfall(in mm) for each district of MahrashtraFor plotting graphs we have 3 options:
1 is for NDVI vs mean temp and rainfall 2 is for NDVI concentration for different temp and rainfall ranges 3 is NDVI vs temp and NDVI vs rainfall trend lineTo get these graphs run the following:sh ❯ python src/plot_graphs.py --plot_function <option> --input_folder <folder with csv files we get from running main_MH>Similarly to visualize district wise average NDVI per year run the following:
sh ❯ python src/visualize_mh.py --input_folder <older with csv files we get from running main_MH> --output_folder <your output folder>
Testing
For testing the scrapper:
Using pip
sh
❯ python -m unittest tests/test_scrapper.py
For testing the plotting file
sh
❯ python3 -m unittest tests/test_plotting.py
Owner
- Name: Arush Sharma
- Login: Arush04
- Kind: user
- Repositories: 1
- Profile: https://github.com/Arush04
GitHub Events
Total
- Push event: 14
- Create event: 2
Last Year
- Push event: 14
- Create event: 2
Dependencies
- geopandas *
- matplotlib *
- numpy *
- pandas *
- rasterio *
- rasterstats *
- tqdm *