Thanks, that's handy. There are a couple of special cases to deal with
("Glasgow South" also produces Glasgow South West, "Woking" Wokingham,
"Stafford" Staffordshire, and amusingly "East Ham" East Hampshire) but those
can be handled.
Cheers
Leigh.
On 25 August 2010 15:24, Ryan Cullen <[email protected]> wrote:
> http://mapit.mysociety.org/areas/Saffron?type=WMC
>
> Brings up only Westminster Constituencies with Saffron in their name.
>
> Ryan Cullen
>
> http://blog.artesea.co.uk
> @artesea
>
>
> On Wed, Aug 25, 2010 at 15:14, Leigh Caldwell <[email protected]> wrote:
>
>> Hi there
>>
>> I've been trying to look up Westminster constituencies on the excellent
>> new MapIt service by ONS ID (e.g. D84 for Saffron Walden). However it
>> appears that they are not coded in this way (except possibly in Northern
>> Ireland). Instead I assume the area IDs used are the BoundaryLine primary
>> keys (65654 in this case). Anyone know if that's correct?
>>
>> Alternatively, it would be good to look them up by canonical name. I can
>> do this by going to /areas/Saffron Walden and then parsing the results, but
>> that also includes council wards beginning with Saffron Walden, so it's a
>> bit indirect and means making an extra call to the web service.
>>
>> I'm happy to try to get into the code and add this feature myself (I will
>> have to get round to learning Python eventually), but wondered if anyone's
>> already working on it or if I have missed something in the API - or if it is
>> just a matter of loading in an extra data file to update the codes table.
>> The table of constituency names and ONS codes is available free from the ONS
>> site and is a straightforward list of key-value pairs. Maybe I just need to
>> write a data loader to import that and insert its contents into the codes
>> table.
>>
>> Many thanks in advance for any tips
>>
>> Leigh.
>>
>>
>> --
>> Leigh Caldwell (t) +44 20 7064 6556 (m) +44 7747 062906
>> Chief executive, Inon http://www.inon.com/
>> Blog: http://www.knowingandmaking.com/
>>
>> _______________________________________________
>> Mailing list [email protected]
>> Archive, settings, or unsubscribe:
>>
>> https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public
>>
>
>
> _______________________________________________
> Mailing list [email protected]
> Archive, settings, or unsubscribe:
> https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public
>
--
Leigh Caldwell (t) +44 20 7064 6556 (m) +44 7747 062906
Chief executive, Inon http://www.inon.com/
Blog: http://www.knowingandmaking.com/
_______________________________________________
Mailing list [email protected]
Archive, settings, or unsubscribe:
https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public