placr

For the past few months I’ve been doing some work for placr, and this week I’ve joined the team full-time.

Placr

I’m working on a new transport related API *, with some interesting geolocation and realtime dimensions to it. Currently this is all aimed at partner projects and B2B type clients, so I’m afraid there’s nothing fun to show you yet. Hopefully we shall go public with an API at some point, but it’s not the priority at the moment.

The work is very interesting, and now that I’m not splitting up my week with other things I can try to build up a bit more momentum. We’ve been starting from scratch.ย  A fresh subversion repo! I wanted to build a RESTful API outputting both XML and JSON, so I’m doing this in Ruby on Rails. I settled on this after doing some experiments with django piston first. Some interesting problems encountered with both though (despite this being very much core to what these frameworks are supposed to be good at)ย  Still plenty of framework details to work out, but it’s all good fun. I’ve also been using various libraries for HTML scraping.

The team is following (and getting involved in) the various open government data debates, because we’re looking at making use of some of these datasets. These are a moving target at the moment though, so as we look to develop on top of these things, agility is going to be important.

* What’s an API?

These days I’ve been socialising far too much with techy people, and was rather taken aback when someone (might have been my mum) interrupted me in the middle of my well rehearsed little job description to ask “What’s an API?”. It stands for Application Programming Interface.

I rather liked the way Richard Boulton described it as he demo’ed his API at last weekend’s rewired state event. Pointing at a this screen full of data he said “It may not look very nice to you, but to a developer this is beautiful”. That particular screen full of JSON formatted registry office data did look beautiful to me, so I developed this thing last Saturday. An example of an API and an application built to use it.

8 thoughts on “placr

  1. So the registry office thing sounded cool, as I need one of those. However, entering my postcode gets a location some way from my house (can’t tell you how far cos there’s no scale bar – vital for every map), and it doesn’t list my nearest registry office.

  2. Ah. Hmmm

    Looks like we have a bug with handling spaces in postcodes. You’ll probably find it’s ignoring the second half of your postcode. I believe Robert’s API is using google to do the postcode search, but I think he’s doing something wrong with space characters. Don’t *think* it’s my fault.

    “Doesnโ€™t list my nearest registry office.” Robert’s API was created by scraping several different government sources. Some more reliable than others (Some in PDF format!) I blame the government for that one. The rewired state event was all about working with somewhat dubiously formatted government datasets and getting them into more useful formats. Can you find details on directgov?

    “No scale bar” OK that one’s my fault. Added ๐Ÿ™‚

  3. The list of registry offices for england was obtained through a “back channel” – someone from Direct Gov was persuaded to give me an excel file of them. I’ve noticed that some of the entries were a bit dubious, and it’s quite possible an office is missing. The source data is in http://github.com/rboulton/registryoffices/tree/master/sourcedata/ – if you’re in England/Wales your office should be in that list. If you’re in Scotland, I’m afraid I have no data for Scotland yet. What _is_ your nearest registry office?

    The location lookup is just using google – it’s quite possible I’m doing something wrong there – was very quickly hacked up. I’m hoping to be able to replace it with something better with the data released on april 1st, so not worrying about it much right now.

    Oh, and minor correction Harry: it’s “Richard” not “Robert”. We were too busy hacking on saturday to properly introduce ourselves ๐Ÿ™‚

  4. Sorry “Richard”!

    I’m doing a PHP urlencode on the location which converts space to ‘+’. Do a bogus search for “aaa bbb” and it shows what’s happening. Python should decode that to a space again automatically I would’ve thought. Maybe the final link with google is going wrong there.

  5. Well, in its simplest form…

    the hungry customer (data consumer) orders some chips (data) through the kitchen hatch (the API) and gets the already-prepared chips in return. Never do they need to know anything about how those chips are made in the kitchen (the database?), what ingredients need to be added to make them tasty, etc. All of that complexity is hidden by the API.

    I probably shouldn’t try to think up analogies when hungry, should I?

  6. Yep, you should say which flavour you want the chips, erm, data in. Oh, and if it’s not freely available, you may well need to give some form of key with your order, like money or something.

Leave a Reply

Your email address will not be published.