Inspiration
What it does
The Growing Degree Days (GDD) Formula is a useful tool for farmers to predict the emergence of crops, time pesticide/insecticide treatments, and understand which pests might become prevalent during that time in the season. It is based in the fact that crops grow increasingly fast above a certain baseline temperature (varies by crop). Using historical and forecasted weather data along with location, data, this tool aims to make accurate predictions about these landmark events in the farming season.
How we built it
This project was built primarily in JavaScript, with front-end in basic HTML and CSS. Using Ajax calls to OpenWeathers One Call API 3.0, we were able to access weather forecasts for the next 8 days going forward, and were able to access historical data for specific days in the past. The user would be able to enter a city and state, in which the system calls the GeoCoding API, a free API that associates City names with coordinates that can later be used by the aforementioned weather API. Then, using those streams of data, the system calculates the GDD for each day along with the total accumulated Degrees from the days since the user had planted their crop (historical weather data is stored in the browsers local storage, as to alleviate API traffic). Should the amount of degrees remaining before the crops emergence exceed that which would happen in the forecasted 8 days, the system uses a linear projection based on the 8-day forecast to estimate when the crop would emerge in the days beyond.
Challenges we ran into
As with most projects, there were a number of difficulties that we ran into throughout. One of primary issues being integration with the weather API. From Unix Timecode conversion mismatches to CORS Policy errors, being able to get a stable connection to the API was a steep learning curve for us all. Additionally, saving JSON String Data from to local browser storage was uncharted territory for us, and thus caused a lot of difficulty.
Accomplishments that we're proud of
Tying into our difficulty, the accomplishments that we are most proud of were the problems that were the hardest to solve. From utilizing APIs for the first time, to extracting and handling JSON responses, there was a lot of hardship and it was the overcoming of that hardship that was the most rewarding.
What we learned
As said earlier, there was a lot of new territory to cover. All of us had limited experience in HTML, CSS, and JavaScript, so there was a lot to learn. Additionally, very few of us had any experience with APIs, so that was a process too. This project has introduced and allowed us to get amazing exposure to these technologies, which are ever prevalent today.
Built With
- css
- html
- javascript
- json
- openweather
Log in or sign up for Devpost to join the conversation.