{"id":24875969,"url":"https://github.com/devang-2021/croppredictionmodel","last_synced_at":"2026-02-04T15:33:36.729Z","repository":{"id":266795101,"uuid":"899372127","full_name":"DEVANG-2021/CropPredictionModel","owner":"DEVANG-2021","description":"This is the baisically crop prediction model which helps the farmers to make the data-driven decision about which crop is suitable according to the current soil quality and climate factors.","archived":false,"fork":false,"pushed_at":"2024-12-06T07:13:03.000Z","size":7916,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T02:45:29.580Z","etag":null,"topics":["anylogic","anylogic-simulation","flask","java","machine-learning-algorithms","predictive-modeling","python","random-forest-classifier","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEVANG-2021.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T06:08:58.000Z","updated_at":"2025-01-05T22:10:08.000Z","dependencies_parsed_at":"2024-12-06T07:35:11.923Z","dependency_job_id":null,"html_url":"https://github.com/DEVANG-2021/CropPredictionModel","commit_stats":null,"previous_names":["devang-2021/croppredictionmodel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEVANG-2021%2FCropPredictionModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEVANG-2021%2FCropPredictionModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEVANG-2021%2FCropPredictionModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEVANG-2021%2FCropPredictionModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEVANG-2021","download_url":"https://codeload.github.com/DEVANG-2021/CropPredictionModel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248709427,"owners_count":21149178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anylogic","anylogic-simulation","flask","java","machine-learning-algorithms","predictive-modeling","python","random-forest-classifier","rest-api"],"created_at":"2025-02-01T08:18:36.868Z","updated_at":"2026-02-04T15:33:31.705Z","avatar_url":"https://github.com/DEVANG-2021.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crop Prediction using Agent based modeling and Machine Learning\n\nThis repository contains the AnyLogic model for the project \"Crop Prediction using Agent based modeling and Machine Learning\". This model simulates the influence of weather factors on soil dynamics, utilizing the Crop_Prediction.csv dataset from Kaggle Dataset Repository to enhance our understanding of Crop Prediction based on the different environmental factors and soil quality.\n\n# Crop Prediction Project\n\nThis repository contains two main components:\n1. A **Machine Learning Model** for crop prediction.\n2. An **AnyLogic Model** to simulate the prediction process.\n\n\n---\n\n## Table of Contents\n\n1. [Prerequisites](#prerequisites)\n2. [Cloning the Repository](#cloning-the-repository)\n3. [Importing the Model in AnyLogic](#importing-the-model-in-anylogic)\n4. [Running the Model](#running-the-model)\n5. [Adjusting Parameters](#adjusting-parameters)\n6. [Outputs](#outputs)\n7. [Acknowledgments](#acknowledgments)\n\n---\n\n## Prerequisites\n\nTo open and run this model, you need:\n- **AnyLogic Software**: Please install AnyLogic (version X.X or later) from [AnyLogic's official website](https://www.anylogic.com/).\n- **Git** (optional): If you prefer cloning via command line.\n\n### For the ML Model:\n- **Python 3.7 or higher**\n- **Flask (`pip install flask`)**\n- **Other dependencies listed in `requirements.txt`**\n\n---\n\n## Cloning the Repository\n\nTo obtain a copy of this project, follow one of these methods:\n\n### Method 1: Cloning via Git\n\nIf Git is installed, open a terminal and enter the following command:\n\n```bash\ngit clone https://github.com/DEVANG-2021/CropPredictionModel.git\n```\n### Downloading the Repository\n\n1. **Download as ZIP**:\n   - Go to the repository’s GitHub page.\n   - Click on **Code \u003e Download ZIP**.\n   \n2. **Extract the ZIP**:\n   - Unzip the downloaded file to a folder of your choice on your local machine.\n\n---\n## Running the ML Model\n1. **Navigate to the ML_model folder**:\n   \n```bash\ncd ML_model\n```\n\n2. **Navigate to the ML_model folder**:\n\n```bash\n  cd ML_model\n```\n\n3. **Start the Flask server**:\n```bash\npython api.py\n```\n\n4. The ML model will now run on the Flask-based API. You can interact with it through its endpoint.\n\n## Importing the Model in AnyLogic\n\n1. **Open AnyLogic**:\n   - Start AnyLogic on your computer.\n\n2. **Import the Project**:\n   - In AnyLogic, go to **File \u003e Open Project**.\n   - Navigate to the folder where you extracted the ZIP file.\n   - Select the `.alp` file (e.g., `CropPredictionNew.alp`) and click **Open**.\n\n---\n\n## Running the Model\n\n1. **Select the Experiment**:\n   - Locate the **Projects** pane (usually on the left side of the AnyLogic interface).\n   - Select the main experiment, typically named `Main` or `Simulation`.\n\n2. **Run the Experiment**:\n   - Click the **Run** button (green triangle) in the AnyLogic toolbar, or right-click the experiment name and select **Run**.\n\n3. **View the Simulation**:\n   - The simulation window will open, displaying the Crop Prediction Main Agent with the button, sliders, and crop images.\n\n### Example\n\nHere’s an example screenshot of the simulation:\n\n![Adjusting all parameters](images/asjusting_parameters.jpg)\n\n![Got Crop Prediction based on different parameters](images/got_crop_prediction.jpg)\n\n\n\n---\n\n## Adjusting Parameters\n\nYou can modify certain weather and fire parameters to see how different conditions affect the simulation:\n\n1. **Locate Parameters**:\n   - In the **Projects** pane, click on the main experiment (`Simulation` or `Main`).\n   \n2. **Modify Values**:\n   - Modify input parameters within the AnyLogic model to test different scenarios.\n   - For the ML model, update the input data in the API payload to adjust predictions.\n\n3. **Save and Run**:\n   - After modifying parameters, save changes and **Run** the experiment again to see the effects.\n\n---\n\n## Outputs\n\nThe model provides several outputs, including:\n- **ML Model**: Provides crop prediction results via the Flask API.\n- **AnyLogic Model**: Simulates crop prediction dynamics and outputs visualization of scenarios.\n\n---\n\n## Acknowledgments\n\nSpecial thanks to Dr. Ziad Kobti for his support and guidance.\n\n**Technologies used**:\n- **AnyLogic**: For simulation modeling.\n- **Java**: For programming and model customization.\n- **Python**: For programming and making machine learning model and also perform visualisation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevang-2021%2Fcroppredictionmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevang-2021%2Fcroppredictionmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevang-2021%2Fcroppredictionmodel/lists"}