Inspiration

After some planning on what to work on, one of us remembered something we saw on the news on soil quality worsening over the years. This is a serious issue as many locations can no longer grow crops and if farmers unknowingly plant crops in these areas, it can lead to bad harvests or suboptimal crops.

What it does

On the basis above, we came up with the idea to create a web application that allows the user to input their city and country and receive present data on various important features regarding the land and region to find the best location for agriculture as well as the weather forecast which will help optimize crop growth. Using this information, the user can make an educated prediction on whether to grow crops in the area and also if the incoming weather is optimal for crop growth or if they need to prepare.

How we built it

We built two separate applications to run the project. One of our applications uses Tkinter and Python to run the GUI locally. The other application uses HTML/CSS as well as a Django back-end and is a web application that can be accessed through the internet. We did this so that we could run a local version quickly and be used for testing while the django one was being built.

We used two different APIs as well to gain access to the information. We used Ambee’s Soil API to receive live data about the soil which intakes the longitude and latitude of the location of interest. To convert the city and country into geological coordinates we used GeoPy, a Python client for geocoding. We also used OpenWeather’s One Call API to get the daily and hourly weather. Then we finally output this for the user to see in an organized and clean manner.

Challenges we ran into

There were a few challenges we ran into. The first was to try to convert the city and country information into longitude and latitude. We were originally going to do this with the Google Maps API but realized that we could run into paywall problems. We ended up finding good alternatives using libraries (GeoPy, specifically Nominatim).

Accomplishments that we're proud of

For many of us, it was the first time using an API. We used python-requests within the Tkinter application with great success and we were happy with the product we made as it worked exactly how we wanted. We also are proud to have split our group into teams so that we can make 2 similar but unique applications that could be used as a final result for our project. We also collaborated very well and helped each other through each step of the way which made the experience all that much better.

What we learned

We learned a lot through this hackathon process. Most of us now know how to use GET requests to access and use API data. We also learned the basics of Django and Tkinter which were new areas that we had not all explored in the past. All in all, this project allowed us to expand our knowledge of frameworks that we can use with Python and the importance of APIs in projects such as this one.

What's next for Soilytics

Due to the short amount of time we had for this project, we were unable to find the data we needed as well as the time to implement some features. Soilytics plans to use the soil moisture to tell the users the most effective plant options to maximize harvest. For example, vegetables grow best when the soil moisture is between 41 and 70% and therefore we could suggest what sorts of plants would grow best in the area or which shouldn’t be planted. We plan to add this feature using the soil moisture to effectively predict what plants would be ideal in the area.

We also planned on adding a sign-in feature so that the users can have access to the weather conditions as well as the soil conditions without needing to re-enter their city and country of choice. This would make the web app a lot more convenient and is definitely something we would add if there was more time!

Built With

+ 2 more
Share this project:

Updates