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 OpenGovt.gov.nz 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:
This 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…
I have created twitter feeds for three New Zealand ports so far:
There is also a combined feed of all the tides at http://twitter.com/alltwides. 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.
In: Uncategorized · Tagged with: open access, open data, twitter



on August 12, 2009 at 10:18 am
Permalink
[...] details for Auckland, Wellington, and Onehunga ports respectively using LINZ tide data. He has blogged what’s going on behind the scenes. Stuart was inspired by Simon Lyall’s @NZ_quake [...]
on August 18, 2009 at 2:59 pm
Permalink
Any chance of a Lyttleton or Brighton feed for Christchurch?
on August 18, 2009 at 3:34 pm
Permalink
Hi Gavin,
Sure – no problem. http://twitter.com/LYTPortTides has now been created. It is due to send it’s first tweet at low tide at 20:29 tonight.
Thanks,
Stuart
on September 23, 2009 at 7:07 pm
Permalink
Love it! Thanks Stuart. Any chance of a Waikato tide feed? (I also tweeted this request, apologies for double-up)
on September 24, 2009 at 6:46 am
Permalink
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.
Thanks,
Stuart
on October 28, 2009 at 7:31 am
Permalink
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,
Maria
on October 28, 2009 at 10:03 am
Permalink
Hi Julie,
http://twitter.com/WaikatoTides
(It has had some problems over the past few days, but should be OK now)
Thanks,
Stuart
on March 5, 2010 at 5:59 am
Permalink
Hi,
Would you know where to get tide feeds for California, Florida and Hawaii and make them twides?
on March 5, 2010 at 3:02 pm
Permalink
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.
Thanks,
Stuart
on April 22, 2010 at 10:50 am
Permalink
Hello,
Would you be willing to share or do you have examples of this quick script? What language are you using, PHP?
Thanks,
Amado
on April 22, 2010 at 4:33 pm
Permalink
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.
Thanks,
Stuart
on April 25, 2010 at 2:23 am
Permalink
Thanks Stuart! That would be cool!
on April 25, 2010 at 4:40 pm
Permalink
I have now posted the code at github:
– http://github.com/stuartlewis/Twitter-Tides