dakboard / Cloud-Platform

Feature requests, enhancements and anything you'd like to see in DAKboard!
https://dakboard.com
166 stars 39 forks source link

Ocean Tides Custom Block #559

Closed danking6 closed 3 years ago

danking6 commented 5 years ago

Show the high/low tide times and any other relevant data on DAKboard

U.S. data available from NOAA here: https://tidesandcurrents.noaa.gov/api/

theoracle09 commented 5 years ago

Hi Dan, and thank you for entering this request in as a feature request. I work for a small shipyard in FL, and being able to fine-tune the formatting of the date and time would be very valuable for us, so we can display exactly what we need.

Specifically, something as simple as "H: 9:00 am - L: 3:00 pm" at the bottom of a Google Calendar integration would be ideal. Right now we have 4 weeks displayed, and having the tide info formatted as above available on every day 'cell' is best case scenario. As far as a block of data on a custom screen is concerned, that'll work too if we can control which days to display. Similar to how the weather displays the current week's forecast, we could toss a custom block under that and choose which days to display, and in what format to display the High/Low times.

danking6 commented 5 years ago

This has been added for U.S. data using NOAA. More information here: https://dakboard.freshdesk.com/support/solutions/articles/35000119041-how-to-find-the-station-id-for-tidal-data

We had a request to add U.K. tide data. Looks like the data is available here: https://admiraltyapi.portal.azure-api.net/ We are looking into this.

theoracle09 commented 5 years ago

The integration works perfectly for our application. Thank you so much! My company greatly appreciates the fact that Dakboard added this block!

YDraig commented 5 years ago

I love the addition of the tide data widget, however this doesn't include tide data for Australia. The Australian Bureau of Meteorology (BoM) provides accurate data. I have checked their copyright and disclaimers and looks ok for you to use.

Obviously the site above in PDF format in the second link is useless, but provides the Usage Rights info, both on the webpage and in the PDF.

inspecting the source of their interactive map I found a json endpoint that contains all the site codes required to pull the data from their feed. http://www.bom.gov.au/australia/tides/tide_prediction_sites.json each "feature" in the json has a property for PORT_NAME (town), STATE_NAME (Australian state) and AAC (location code) This json file is pretty static as tide stations change infrequently, so its probably worth just caching a copy of it locally, update it yearly.

once you have the location code you can pull the whole years tide prediction for that area by fetching the url with the following syntax http://www.bom.gov.au/ntc/IDO59001/IDO59001__.xml ie: for AAC code VIC_TP005 "Geelong" the URL for this year is http://www.bom.gov.au/ntc/IDO59001/IDO59001_2019_VIC_TP005.xml you can then access the elements for the forecast-period for each day. As this data is generated yearly, you could also store this data til next year.

I hope this info proves to be useful, and I'm happy to help out in any way.

YDraig commented 4 years ago

@danking6 any update on adding Tides data for Australia and UK?

juankoegelenberg commented 3 years ago

Would there be any chance of adding tide data for South Africa and other countries? Perhaps something like https://www.windguru.cz/ could help gather more info for more countries.

Dan-Peck commented 3 years ago

Merged in @ 69e1e1a Added to queue for upcoming update to the live site.

Once added, selecting the "StormGlass" source in the Tide block will now allow for selection of world-wide tide monitoring stations.

danking6 commented 3 years ago

This has been released to production.