Data Analysis Application for Agriculture
Posted on: July 09, 2022The application is being developed incrementally, with new features continuously added. Here’s a brief overview:
The aim of the application is to provide agricultural producers with comprehensive statistics. The company uses equipment that gathers position and performance data from harvesters and planters.
The application is built using Python, with libraries like Pandas, GeoPandas, and Shapely for data analysis, and Django for the API.
Main Algorithms
Throughout the development process, I implemented a series of algorithms that I detailed in this post, which you might find interesting.
Key Features I Developed
Real-Time Progress Reports, Updated Every 8 Hours During the Harvest Season
These dynamic reports offer a comprehensive overview of the harvest season, updated every 8 hours. They provide critical insights, including:
- Total area covered by each machine
- Areas of overlap during operation
- Harvest percentage completed on each farm
- Yield maps for every farm
- Average yield and humidity levels per farm
- Identification of low-yield zones within farms
- Detection of equipment errors
- List of machines deployed on each farm
- Visual progress polygons showing the harvested areas
- Start and end dates for harvesting or planting on each farm
These results can be accessed via a web platform or exported in multiple formats, such as PDF, Excel, CSV, PNG, GeoJSON, and more, ensuring flexibility and ease of use for agricultural producers.
API for Frontend Integration
This API was designed to seamlessly integrate with the frontend, providing powerful features to enhance user interaction and data management. Key functionalities include:
- Grouping and organizing information by company
- Automatic detection of events that require field team intervention
- Management of machines and farms for each harvest season
- Identification of farms using planting progress polygons
- Upload and management of farm polygons via GeoJSON
- Export capabilities in multiple formats
- Access to satellite imagery with various vegetation indices for each farm, including NDVI and ReCL
These features ensure a robust and responsive frontend experience, allowing users to efficiently manage and analyze agricultural data.
Work Status Detection Using Artificial Intelligence
Using the FastAI library, I trained a Machine Learning model to accurately detect when a machine is in operation. This innovation significantly reduces operational costs and workload by eliminating the need for multiple sensors, requiring only a GPS on planters.
Additionally, this functionality enables the automatic detection of machine issues, such as disconnected, faulty, or misconfigured sensors, and sends alerts.
Spatial Indices Integration Using Earth Engine and Other Data Sources
I integrated Google Earth Engine into the application, allowing the retrieval of various vegetation indices, such as NDVI, for each field. This integration enables time-based comparisons of these indices, providing valuable insights that help explain crop behavior over time and enrich the data available for analysis.
Advanced Sensor Calibration System for Yield and Humidity
I developed a sophisticated server-side system to calibrate yield and humidity data from harvesters over time. The system uses real field measurements as a baseline, allowing for retroactive calibration of the data. By generating a calibration curve, the system can correct and fine-tune data from each individual harvester, ensuring more accurate yield and humidity readings.
Final Comments
This solution equips producers with valuable statistics that help optimize field usage, enhance productivity, prioritize high-performing fields, and identify problematic areas that need attention.