Tweeting temporal tidal data

There are movements worldwide to free not only research publications through the Open Access publishing movement, but also to make data sets free and open. In New Zealand work in this area is being championed by the public site which has a useful open data catalogue of online open government created data sets. Having been involved with Open Access publishing for a few years due to my involvement with open access repositories, I thought I’d better start to get more involved.

One of my favourite Twitter feeds is that of @NZ_quake which is run by Simon Lyall. This twitter feed periodically polls the GeoNet website which lists the latest earthquakes to occur in New Zealand (quite a regular occurrence!). When it sees that a new earthquake has been reported, it sends a tweet:

nzquakeThis got me thinking about other temporal data sets that could be usefully turned into a Twitter feed. Having lived in coastal areas for the past 12 years, my thoughts turned to the tides. Tides are constantly changing, and knowing the current state of the tide can be important. I thought it would be good to create twittering tide tables (or to ‘twitterify’ the name, twides!!!)

Luckily for me, there is plenty of open data in this area. For New Zealand, comprehensive data is provided on the Land Information New Zealand web site. Data is provided for sixteen standard ports, and a further hundred or so secondary ports. The data is available in either CSV or PDF format (I chose the former), and despite the website only offering this year’s and next year’s data, a bit of URL tweaking can also grab the data for 2011 and 2012.

There is no obvious use or re-use licence on the tides page, just a disclaimer and a link to a Crown Copyright declaration which does (commendably) include an open licence:

The material may be used, copied and re-distributed free of charge in any format or media. Where the material is redistributed to others the following acknowledgement note should be shown: “Sourced from LINZ. Crown Copyright reserved.”

A quick script can take this data (one row per day) and re-format it as one tide (high or low) per line with a date-stamp. Another quick little script runs every minute via a cron job, and checks each of the ports to see if it is currently high or low tide there. If it is, it sends a tweet using the Twitter API

aklexampleI have created twitter feeds for three New Zealand ports so far:

  1. Auckland
  2. Wellington
  3. Onehunga

There is also a combined feed of all the tides at If there are any other New Zealand ports that you would like to have a Twitter feed for, please feel free to get in touch as I have a simple script to create new feeds. Or if you know of other tide tables that are exposed via Twitter I’d be interested to see them.

Does Twitter provide a useful outlet for temporal data, or for tide tables? I’d be interested in your opinions! Please leave a comment below. This entry was posted in Uncategorized and tagged , , on by .

13 thoughts on “Tweeting temporal tidal data

  1. Pingback: Tweeting Tides « Open New Zealand

  2. Stuart Post author

    Hi Julie,

    Yes! 🙂 LINZ (Land Informaition New Zealand) have data for ‘Waikato River Entrance’ tides, so if that is the one you want I’ll try and find time over the next few days to create the feed. I’ll need a photo with rights use to use as the Twitter profile (CreativeCommons etc), so if you have a good photo of the area that you could send to me, that would be great.



  3. Neuseeland Reisen

    Good day,

    At this time I was collecting new stuff for a new anchor story on Christchurch for our German travel guide to New Zealand when I was sent by Yahoo to your page. Actually, I didn’t find exactly what I expected. But, your article has given me inspiration for another article. Insofar: Thanks.

    Kind regards,

  4. Stuart Post author

    Hi Scott,

    Which particular beaches would it be most useful to create Twides for? As the tide varies at each beach they need to created specially for each beach or small area. If you can list a few I’ll see if I can find some data sources for those tides.



  5. Amado


    Would you be willing to share or do you have examples of this quick script? What language are you using, PHP?


  6. Stuart Post author

    Hi Amado,

    Yes – it is programmed in PHP, which is then run as a shell script every minute using cron. I’ll try and get the script tidied up and posted somewhere. Will email you with a link once I do.



Leave a Reply

Your email address will not be published. Required fields are marked *