Glean Fields

Motivation

After a harvest it is often times more economical to leave edible food laying in the fields than to collect it. The practice of collecting excess crops from fields is called "gleaning", and is an approach intended to address the growing global problem of food security. Many non-profit organizations exist that will volunteer to glean food, but it remains challenging to connect these non-profits with producers. With the goal of reducing food waste, we set out to build an application that could address these concerns by making the process smoother and by providing incentives for farmers to engage with non-profits in this manner.

Description

Our application allows users of John Deere's platform, namely farmers, to log in and view their fields. They can then view information about particular fields -- most importantly, the size of the harvest. We use this and other information parsed from the John Deere developer API to determine how much of the crop was wasted. This information, along with the user's personal information, could then be quickly auto-filled into a form for a gleaning non-profit called The Society of St. Andrew. The estimated cost of the uncollected crop is also determined -- this would serve as an incentive in the form of a tax deduction, as the gleaned crop is essentially a donation and they provide proof to the farmer of it and the application allows farmers to quickly and accurately submit such a form, hopefully reducing food waste and improving overall food security.

Technologies

Expo.io and React Native were the primarily technologies used to build the application. AWS Lambda, Google Cloud Compute Engine, and Express.js were used for connecting with our third-party APIs, namely John Deere's.

Challenges

John Deere uses OAuth 1.0a and it was a challenge to get it working without exposing the client ID and secret. We used an open Source library made by Source Allies, linked below, but changed it a bit to work with Google Functions for the tokens. We also used Google Cloud Platform Compute Engine to provide a back-end server that acted as a proxy between the user and John Deere's APIs for the post and get requests. After that worked, other issues were integrating Granular's APIs, getting user and farm information, and calculating the leftover amount after harvest and its profit using the information available to us. Expo had challenges handling deep links as well, so we had to develop a workaround.

What's Next

Expanding the project to handle more information from the farms such as different crop types, connecting more gleaning companies to the network, sending emails out with location, and automating the process in a more complex way.

References

Code

Libraries

Gleaning & Food Security

Share this project:
×

Updates