Skip to content

HUZIBRO/Crop-Yield-Analysis-and-Insights-using-Python-Plotly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌾 Crop Yield Analysis and Insights using Python & Plotly

This project provides a comprehensive exploratory data analysis (EDA) of a crop yield dataset. It focuses on identifying key patterns and trends in agricultural productivity, rainfall, and pesticide usage across various countries and years. The notebook showcases core competencies in data science, data analytics, and interactive data visualization using Python.


πŸ” Project Objective

To explore and analyze crop yield data to uncover:

  • Yearly and country-wise trends in crop yield
  • Relationships between yield, rainfall, and pesticide usage
  • Comparative insights across different crops and regions

πŸ“Š Skills Highlighted

🧠 Data Science & Analytics

  • Data Acquisition & Integration
    Retrieved dataset using kagglehub, showcasing the ability to access and manage external data sources.

  • Data Cleaning & Preprocessing

    • Removed irrelevant columns
    • Identified missing values using .info() and .isnull().sum()
    • Ensured clean data for further analysis
  • Exploratory Data Analysis (EDA)

    • Counted unique countries and crop items
    • Analyzed crop distribution using value_counts()
    • Aggregated data by Area, Item, and Year to generate insights
  • Statistical & Correlation Analysis
    Developed a crop_country function to measure correlation between yield and pesticide usage β€” useful for insight generation and hypothesis validation.


πŸ“ˆ Data Visualization (Plotly)

  • Interactive Charts
    Created highly interactive and user-friendly visualizations using Plotly, ideal for reports and presentations.

  • Visual Features Include:

    • Bar charts of crop frequency
    • Subplots comparing yield, rainfall, and pesticide usage across top 10 countries
    • Yearly trend visualizations for both countries and crops
    • Subplots built with make_subplots for cohesive visual storytelling
  • Customization for Clarity

    • Titles, axes, colors, labels, and layout tailored for easy interpretation
    • Clear separation of insights via subplot grids and legends

πŸ“ˆ Key Business Relevance

The analysis provides decision-making support in:

  • Identifying countries with high or low productivity
  • Evaluating environmental and chemical factors affecting yield
  • Informing agricultural strategy and sustainability practices

πŸ’» Tech Stack

Tool/Library Purpose
Python Programming language
Pandas Data manipulation & aggregation
Plotly Interactive data visualization
KaggleHub Dataset acquisition
NumPy Numerical computation

About

This project provides a comprehensive exploratory data analysis (EDA) of a crop yield dataset. It focuses on identifying key patterns and trends in agricultural productivity, rainfall, and pesticide usage across various countries and years.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors