Mystery In The UK

I’m currently working on a webapp that will allow every country to participate. the content is locally consumed. I’m attempting to build a database to hold all the information, in a structured way. I’m confused by the  country relationships of the UK. I’m in the USA, so I’m not sure what the typical experience is for a UK citizen.

There are four countries: England, Wales, Scotland, and North Ireland. These four countries, have formed an entity called “United Kingdom”, or UK for short.  Plain old ‘Ireland’ is a separate country. There is another entity called “Great Britian”, which refers to the countries England, Wales, and Scotland (source: DirectGov).  There’s an organization ISO that maintains global standards. One of the standards is ISO 3166-2, which is a list of country names, and their 2 character abbreviations. Looking at this list of country codes and names, the United Kingdom has the code of ‘GB’. Huh?  More confusingly, the countries England, Wales, Scotland, and North Ireland are all without their own 2 character codes. I guess the real question is “Who’s on first?“.

Let’s hold off on that issue for a moment, and look back to my original problem. I’m unclear as to how I should model the relationship between the UK, the individual countries of the UK, and their cities. Let me give you an example. I live the United States, in the state of Washington(WA), in the city of Seattle. So my record would be like this: country=US, state=WA, city=Seattle. Given that, lets do an example for London. Three examples come to mind. The first captures the most information: country=UK, state=England, city=London. This one is appealing as it captures the most information in an existing structure. The second just removes England from the state field: country=UK, state=null, city=London. The third uses England for the country country=England, state=null, city=London. I’m considering this one because I know that England is a country, so it’s technically correct.

Do people who live in the UK, look on web forms for UK, then their own specific country? Or do they look for their specific country, then UK? What’s the convention most users expect? Is there another territorial breakdown I’ve missed?  I know of postal codes.

I appreciate any feedback you can provide.

UPDATE 2009-FEB-21: Everybody’s feedback was very helpful, particularly Gary Gale (@vicchi) who just happens to be Head of UK Engineering at Yahoo Geo Technologies (@yahoogeo).

Let’s recap of the things I’ve learned. First ‘United Kingdom’ is what users search for. It’s also the name that appears in the ISO 3166 list. So I can safely use it. Second, people never look for things by their individual country (England, Scotland, etc) – partly because of the previous point, and partly because postcodes are so informative, they can be used to pre-populate other fields like city and county. Third, the ‘county’ is what people typically use to filter things.  There are actually two sets of county information – administrative and postal. The web apps I’m writing are for people and not the government, so I’m going to use the postal counties.

In summary, Mr Gale said “if you’re designing a web based mechanism for addresses you’d use the country, the county and the town followed by the street address and our Postal Code, the equivalent of the US ZIP”. Nice! Pragmatic and simple.

Thanks again everyone. It’s been illuminating.

11 Responses to “Mystery In The UK”

  1. @Lancs says:

    OK

    To confuse you further: If someone asks me my nationality, I prefer to say “English” yet most UK surveys would only have a category of “British” for this sort of question.

    When I buy something from the US, or I’m filling in a form on a web, mostly we come under “UK”

    We don’t have states, and rarely have it broken down in to Country. The rest is normally done by PostCode. Post codes are of 2 halves.
    The alpha characters of the 1st half of a postcode relate to a city or large town in most cases = BB=Blackburn BS = Bristol BD=Bradford – Although in London, its N=North London E=East London etc.
    Then there is a number, either 1 or 2 digits. And these refer to an area of the town, or a more specific area if we’re talking about London…

    Anyway – to cut a long story short, each road has a different post code… and long roads might have several codes, or one for each side of the road, depending on how many addresses are on the road.

    So, when filling in a web form, I select “UK” and then input my Post Code – which brings up my street name, and then I select the house number…. means that they’ve had to buy in to some sort of Post Code database… but from the post code and house number, forms generally auto-populate with all the rest of the address.

    Sometimes that address will have the County – Lancashire (or Lancs) in my case, or other times it’ll refer to my nearest large town.

    All very unhelpful, I know!

    http://en.wikipedia.org/wiki/Post_Code#United_Kingdom

    and

    http://www.royalmail.com/portal/rm/content1?catId=400044&mediaId=9200078

    and

    For “Correct Postal Addresses” see
    http://www.royalmail.com/portal/rm/content1?catId=400044&mediaId=9200078#4300060

    Feel free to yell any other questions, and if I know the answer, I’ll tell ya 🙂

  2. Matthew says:

    Firstly: “Looking at this list of country codes and names, the United Kingdom has the code of ‘GB’. Huh?” – I believe both Ukraine and the UK wanted “UK”, so neither got it (except in domain names, which was basically a land grab).

    The country is the United Kingdom of Great Britain and Northern Ireland. The parts that make it up, you can refer to as countries if you want, Wikipedia does, but I’m not sure it’s clear – anyway, as you point out they don’t have country codes and e.g. don’t have seats at the UN or anything else like that. I would expect to see “United Kingdom” in a list of countries; I don’t think anyone in the UK would expect a breakdown into England/Scotland/etc. unless there was some specific reason for that.

    England is definitely not a “state” of the UK. England, Scotland, Wales, Northern Ireland are all broken up into counties which are vaguely more similar to states (except they don’t really have much autonomous control). Here’s the divisions I’ve used in the past, probably based on ceremonial counties and the like: http://dracos.co.uk/temp/uk-division.txt

    You’re going to try when you start looking at the Channel Islands 😉 Hope some of that might be helpful.

  3. Matthew says:

    One more thing – mySociety’s website http://www.pledgebank.com/ works everywhere in the world, and lets you sign up for local alerts anywhere etc., so that might be useful for you to see how we dealt with the same sort of issues you’re facing.

  4. Aquarion says:

    First:

    http://farm1.static.flickr.com/6/8735122_5a571c55db.jpg

    Second, postally England’s addresses are more divded by county than country, so generically you pick “UK”, but for state you pick “sussex” or “kent” or “London” (London’s special, being both a county and a city). Within that, you have a postal town, so for example when I was living in Letchworth, Hertforshire, England, The United Kingdom, my full postal address was:

    [#] My Road
    Letchworth
    Stevenage
    Hertfordshire
    SG7 2BB
    ENGLAND

    In most practical purposes, the postal town confuses people, and is duplicate information anyway as that’s what the “SG” means, so generally forms use “United Kingdom” for the country, you pick a county from the list instead of a State, you have a postal code, and everything Just Works Out.

    (Postal code works as a checksum to some extent to, theoetically you can uniquely identify any building in the UK by [Number] + [Postcode], and if the postcode is “SG”, but the address is in “Stansted”, someone’s got something wrong. This is not a relevant piece of information to your question)

  5. I normally tab to the country list box and then tap U a couple times expecting to quickly see a United Kingdom option. If it’s not there, then I have to decide whether you’ve called us Great Britain, or split up England/Scotland etc – either way I’m already slightly annoyed. Only a little bit, but that’s a little bit that can be avoided, so why not?

    What’s even worse is when I select UK but am then asked for England/Scotland – why do you need me to tell you? You’ve got the rest of my address and my postcode, work it out yourself! And does it really matter – postage costs are the same either way…

  6. Spaggie says:

    Did you mention County ?

  7. Mia says:

    Living in London, but not being English/British/Scottish/Irish or Welsh, I used to look for ‘England’ or ‘Great Britain’, but these days the first thing I look for is ‘United Kingdom’.

  8. Andrew Woods says:

    Thank you all. Your feed back is a tremendous help. United Kingdom has won by a landslide! Since everyone is looking for UK, I’ll use that. County wasn’t something I had thought about, as it’s not used by people in the US. However, everyone’s feedback tells me it’s important in the UK, so I’ll add that to my data model.

    This is will be very helpful when creating dynamic select list. The goal is to allow people to search for things around them, without using a post code. While the post code is more exact, I’m trying to avoid the need to do additional parsing and calculation. By using Country > County > City that will be sufficient for most purposes on the user search side.

    @Aquarion Your venn diagrams is great. It helps clarify the country relationships. Also the idea of using the post code as a checksum is genius! I’ll have to remember that for future projects.

  9. […] Andrew Woods is confused about the spatial nature of the UK and its semantics and I got the Yahoo Geo team to tackle this – blog post to come […]

  10. […] Read the rest of the post here: Mystery In The bUK/b « For Work And Play […]

  11. […] confused far and foremost Andrew Woods who tried to get this information for a web app and failed to do so. Broken, disheartened and annoyed he didn’t turn to drink but instead to […]