Git Product home page Git Product logo

sohrabrezaei / global-crop-yield-analysis Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 33.65 MB

This project showcased the influence of global rainfall and temperature on crop yield, predicted the yield based on the customer's input, and recommended the three most efficient crops for a specific country.

Jupyter Notebook 92.82% JavaScript 2.25% CSS 0.04% SCSS 3.40% HTML 1.44% Python 0.06% Procfile 0.01%

global-crop-yield-analysis's Introduction

Global Crop Yield Analysis

Team members

Checkout the presentation here: Global Crop Yield Analysis Presentation

Table of Content

  1. Project Overview
  2. Why this topic?
  3. Source Data
  4. Sections
  5. Tools and Technologies
  6. Dashboard

Project Overview🌾🌽

Agriculture is extremely important to the world economy. Understanding global agricultural output is critical for tackling food security concerns (hunger) as the human population continues to grow.

Crop yield prediction is a significant agricultural problem. Agricultural yield is largely influenced by meteorological conditions (rain, temperature, etc.) and pesticides, and reliable information about crop yield history is critical for making agricultural risk management and future predictions choices.

Why this topic?

"In 2020, between 720 and 811 million people faced hunger." (FAO, 2021)

World hunger is now increasing, after having declined for a decade. This trend is expected to last, while being amplified by the alarming population increase.

"We need bold actions!"

In 2030, almost 660 million people may still be hungry. Hunger will not be eradicated by 2030 unless bold efforts are implemented to expedite progress, particularly actions to address significant causes of food insecurity that influence millions of people's access to food (FAO, 2021).

We picked top 20 most populated countries of the world to analyze this issue at a macroscopic level and present suggestions that can be implemented to prevent the growing gap between world hunger and crop yield.

Overview.mp4

Source Data

Original datasets for this project were taken from Kaggle: Crop_Yield_Prediction_Dataset

All dataset (publicly available dataset) on Kaggle are taken from FAO (Food and Agriculture Organization) and World Data Bank.

Sections

Meteorological Analysis 🌦️🌦️

  • Objectives: To give the users visual representation of different weather phenomena that would affect their crop yield.
  • Model: GeoJSON data plotting

  • How it works: This model gets real time rainfall and temperature data of the world from OpenWeatherAPI and plots it on a world map to provide a visual representation of correlation those and the effect on crops.
Meteorological.Analysis.mp4
  • Challenges: Making the webpage dynamic by filtering the content of leaflet map.
  • Improvements: Plot world harvest as a heat map on the world map to further improve the immediate inferences drawn from the rainfall vs temperature maps for crop yield.

Yield Prediction πŸ‘©β€πŸŒΎπŸ‘¨πŸΏβ€πŸŒΎπŸ“ˆ

  • Objectives: Using ML model on previous data to predict future total yield of selected crops to help current and new farmers/business owners make an informed decision based on their existing area conditions (rain, temperature, pesticides).
  • Model: Machine Learning (RandomForest Regressor)

  • How it works: Get customer input and send it to the app β€”> app communicates with the machine learning pickle file β€”> ML model uses given parameters to calculate the yield and sends it back to the webpage.
Yield.Prediction.mp4
  • Challenges: ML pipelining and preprocessing of users input.
  • Improvements: Train data to provide crop yield predictions only via environmental factors, without the need of specifying a country.

Crop Recommendation 🌱

  • Objectives: Advising farmers top three crops to grow in their perspective country to maximize total crop yield.
  • Model: Getting highest yield crops of each country for year 2013 using pandas and sqlalchemy.

  • How it works: Get customer input (country) and send it to the app β€”> app communicates with database β€”> sends back data of 3 highest yields and their historical yield plot to the webpage.
Crop.Recommendation.mp4
  • Challenges: Figuring out the API route which conncets to database and showcasing the data on front-end.
  • Improvements: Creating a ML model for this section which also provides the user future yield plot for the next 5 years.

Tools & Technologies

  • Database
    • PostgreSQL
    • pgAdmin
    • AWS RDS / S3
    • SQLAlchemy
    • PySpark
  • Data Analysis
    • Jupyter Notebook
    • Pandas
    • Numpy
    • Matplotlib
    • Plotly
    • Seaborn
  • Machine Learning
    • Scikit-Learn
      • Random Forest Regressor
      • OneHotEncoder
      • StandardScaler
      • BaseEstimator & TransformerMixin
      • ColumnTransformer
      • Pipeline
      • Random Forest Regressor
      • Gradient Boosting Regressor
      • Linear Regression
      • MLP Regressor
      • Decision Tree Regressor
      • Linear model
      • R2
    • Pickle
  • Dashboard
    • Javascript
    • D3
    • Flask
    • HTML
    • CSS
    • Leaflet
    • OpenWeather API
    • Heroku
    • Boostrap5

global-crop-yield-analysis's People

Contributors

nedaaj avatar brizvi4 avatar rababhanda avatar sohrabrezaei avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.