https://github.com/arush04/agriculturecasestudy

Comprehensive case study to assess and measure the climate resiliency of agricultural production in MH and MP.

https://github.com/arush04/agriculturecasestudy

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
Last synced: 10 months ago · JSON representation

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
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

AGRICULTURE CASE STUDY

last-commit repo-top-language repo-language-count


Table of Contents


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:

  1. Clone the AgricultureCaseStudy repository: sh ❯ git clone https://github.com/Arush04/AgricultureCaseStudy

  2. Navigate to the project directory: sh ❯ cd AgricultureCaseStudy

  3. Install the project dependencies:

Using pip  

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

  1. Check out to the downloads folder and select and extract all zip files, once extracted move all files to a new folder called ndvi_files in the data folder
  2. Then run this from root sh ❯ python src/extractor.py This extracts all .tif files from the ndvi_files folder and saves them in the data/tif_files

  3. Now we have all data, now run sh ❯ python src/main_MH.py # for MP run src/main_MP.py This creates a folder called analysis_MH in the root directory which contains year-wise csv files with data like meantemp, meanndvi, rainfall(in mm) for each district of Mahrashtra

  4. For 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 line To 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>

  5. 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

GitHub Events

Total
  • Push event: 14
  • Create event: 2
Last Year
  • Push event: 14
  • Create event: 2

Dependencies

requirements.txt pypi
  • geopandas *
  • matplotlib *
  • numpy *
  • pandas *
  • rasterio *
  • rasterstats *
  • tqdm *