Inspiration

Our team was inspired by the popular farming videogame called Farming Simulator for our project. We wanted to make an application to help decide which crops to farm in the game, but we ended up choosing to do it for real life data that would apply to everywhere in the world.

What it does

The project is a real-world application for farmers to choose the best crop to plant in a given piece of farmland. The farmer would start by choosing the location of their farm, as well as the fertilizer they plan to use in order to generate more accurate values for the soil. The farmer is then shown information about the weather at the location they selected as an AI performs a prediction based on the data provided. The response of the AI model (a Neural Network Machine Learning Algorithm) is synthesized using ChatGPT to prepare it for display on the website. The farmer is then given the option to view the top 3 crop suggestions, including one generated separate from the data to guarantee at least one of the crops suggested is commonly grown within the region the farmer chose.

How we built it

We built a React-Flask project for the front-end and back-end using REST APIs to transfer data across them seamlessly. React Bootstrap was used for premade components to help with the ease of development. We used the VisGL React Google Maps API to load the map and customize it, installing it through the Node Package Manager. Animations were also downloaded from the Node Package Manager to add interesting effects to the webpage. On the back-end, the Google Search API was used to find images for each of the suggested crops. The Open-Meteo Weather API was used to find historical weather data for the region provided by the farmer. Additionally, the SoilGrids API is used to find information about the soil, including the pH level. TensorFlow Keras was used to create a Neural Network for the Crop Prediction Dataset on Kaggle. Using the data from the Neural Network, the OpenAI API synthesizes the predicted data into a readable format for the website.

Challenges we ran into

We ran into several issues with the routing of our webpages as well as the Flask connections with React. Most prominently, we struggled to adapt to the React framework, but it got easier as we went along. It took us quite a while to properly integrate the front and back-end. Additionally, finding the correct prompts to generate our desired output with the synthesized information from ChatGPT was a challenge, as it would sometimes be inconsistent with returning the data with the correct delimiters.

Accomplishments that we're proud of

We are proud to have used React for this project, as it was our team's first time using React. We were able to stay well organized on GitHub which allowed us to work together well as a team. We are very glad to have been able to implement all of the different libraries and frameworks necessary for this project and happy to have fixed the many bugs that came along with this project.

What we learned

We primarily learned how to work with each other as a team, handling our unique personalities and creating the best working environment for everyone. We also learned how to create a Front-End in React for the first time as well as use the Google Maps API which was very exciting to see for the first time. Overall, we learned many things along our journey, including a more robust debugging process and many libraries and frameworks.

What's next for Crop AI

If we are to continue the Crop AI project, we will likely add more pages to our website, including a home page and an about us page. Functionally, we could consider adding another AI model to generate the expected yields for the crops that were in the original Kaggle dataset, which would display as a bar graph for the user to give them a better idea of what to expect from a harvest. We could also include a tutorial for farmers so that the website is accessible to all ages.

Built With

Share this project:

Updates