No changing of place at a hundred miles an hour will make us one whit stronger, happier, or wiser. There was always more in the world than men could see, walked they ever so slowly; they will see it no better for going fast. The really precious things are thought and sight, not pace.
Bixi on the iPhone
May 16, 2009.
Last updated September 7th, 2011
(… and ipod touch, and blackberry…)
Update July 2011: The code is open on github.
Update September 2011: The map should now work not only for Montreal, but Toronto too.
Update 28 October 2011: Access to the toronto map is broken. Looks like Bixi Toronto is blocking access to their station data from my server. Sorry, Toronto! :(
Update December 2011: That's it, I give up. The Montreal bixi site has changed the location of their map files, again. Probably following a shiny "redesign" where they also broke access to map.bixi.com. And in the new location, they are blocking access from my server, just as they do for Toronto. By now, I hope this hack has served its purpose, anyway: show that using data to build useful mobile access wasn't so hard, and show the importance of a commitment to open, documented data access. I will be decomissioning my script from today on - if you want it back, feel free to nag bixi until they understand why it would make sense for them to provide an open data feed or an API.
Bixi is the new community bike service here in Montreal. Lots of brewhaha around launchtime, but to me, the really annoying shortcoming of the system so far was not being able to check the status of stations on the go.
According to a message I read on the facebook group for bixi a few weeks ago, there is “no plan to provide an API, iphone app or mobile access to the map of bixi stations”. That’s rather silly, knowing that the users will want to know, in real time and on the go, whether they can get or return a bike nearby.
I’m too lazy to build a real iphone app over the week-end, but I wanted to prove that it doesn’t cost tens of thousands of dollars to provide bixi users mobile access to the status of the stations.
30 minutes and about as many lines of python later, I had a working hack to include a map of all stations in google earth, google maps or the map application on my iphone.
Here’s how to use it on the iphone (or networked iPod Touch):
Disclaimer: I built this using only publicly available data – not a public, official API, though. If the powers-that-be at bixi decide they don’t like it, or change the way they organise their data, or any other silly move, I’ll have to pull the plug on this little hack. In the meantime, I intend to use it and provide it for free. Enjoy.
Update Dec 2nd, 2010: I originally used the bit.ly service to have users of this little hack have as few characters to type as possible. A year and a half later, I notice that the map wasn’t loading any more… because bit.ly no longer redirected to the kml file on my server, but to a news item that has nothing in common with the bixi map. Two hours later, it was back.
Glitch? No glitch? I don’t know, but I have learned my lesson learned: URL shorteners don’t guarantee that their service will be stable and that they won’t recycle their preciously short identifiers: links going through them may well lead to uncomfortable surprises. Meanwhile, I have made the kml available through http://ot.zoy.org/bixi, which arguably is 5 characters longer than http://bit.ly/bixi – the price of stability.
For the first decade I spent working in Technology and the Web, I never really had a Job title. My roles and responsibilities varied from project to project, and I never felt like a single title would do my work justice. So it is with a certain feeling of excitement that, in 2009, I signed for a job with a clear title: “Web Architect”.In hindsight and with a little honesty, I had very little idea what that meant.