OpenSurf Update: Forecasting!
Making my surf forecasting app actually forecast the conditions...
Hi team,
This week was a productive week! I had the change to refactor some of the existing code in my application, refined some of my data selection, and added another data source to enable wave forecasts - something I was hoping to get done by the end of the semester.
What I did last week
Refined the header handling in my
parser.py
module. The NOAA realtime txt files typically start with two header lines (one for variable names and one for units) both beginning with ‘#’. My previous code popped the first line and skipped the second due to aValueError
, which worked, but isn’t very elegant. I changed my parser to handle the data properly.Changed my dict to include dominant wave period in addition to average wave period (more relevant to surfing).
Improved the way data gets displayed in app.py by leveraging my to_dataframe() method for a better way to visualize this data (not graphed yet).
Added forecasting and a second data source by utilizing the Open-Meteo Marine Weather API which allows free, non-commercial access to hourly wave forecasts up to 7 days in advance. This is HUGE for OpenSurf!
What I plan to do this week
Next week is all about visualization. I plan to take this data and elegantly graph it in the terminal using some simple ASCII charts to start in the utils.py module. This module was eliminated this week since it was empty but will make another appearance next week.
Reflection on challenges & process
For me, the learning curve for some of these tools has been steeper than I’d originally anticipated. My code production (in terms of lines written) has dropped but the leverage I get with each subsequent line has shot up. In other words, taking the time to learn and research is paying off in a big way.
Cheers!