Tides
I love going down and walking the shoreline beside Newhaven harbour but the tidal range and short beachline benefit from visiting on only the lowest of tides. Also, when a storm hits on the highest of tides it’s super interesting to see just how high the water gets in the harbour itself, with water lapping the legs of the park benches. There are several great websites showing UK tide heights but none had what I was looking for - an alert for extremes of high and low tides. So I used ai and my Google Sheets skills to create a simple Google App Script that copies a single table of data with the Leith heights once every few days from a tide site, stores it in a spreadsheet, and then a second part of the script which drops me an email under certain conditions. The conditions I’ve gone with are tides higher than 5.7 or tides lower than 0.75. The email is super basic and just has a link back to the sheet if needed.
Here’s the email:
The following significant tides were found for the next 3 days:
• [LOW TIDE] Thursday 10 Sep at 07:54: 0.56m
• [HIGH TIDE] Friday 11 Sep at 02:12: 5.77m
• [LOW TIDE] Friday 11 Sep at 08:36: 0.34m
• [HIGH TIDE] Saturday 12 Sep at 02:51: 5.89m
• [LOW TIDE] Saturday 12 Sep at 09:15: 0.28m
To me it was an interesting problem in that if there was an API it would have been easier, so it was a case of sourcing and importing the data (App Script), formatting and sorting the data into high tides and low tides (Google Sheets formula), filtering down to any in the next three days that cross thresholds and sending (App Script).