Posts Tagged ‘uk’

Making Maps The Hard Way – From Memory

In his book A Zebra Is The Piano Of The Animal Kingdom, Jarod Kintz wrote “when you’re a cartographer, having to make maps sort of comes with the territory”. He’s right. When your business is making maps you should be able to do just that. But what if you’re not a cartographer? What if you had to draw a map of the country you live in? From memory? What would that map look like?

Maybe something like this perhaps? The shape of the United Kingdom and Ireland is vaguely right, though Cornwall and all of the Scottish islands bar the Shetlands seem to be lacking. Then again, the Isle Of Wight is on holiday off the North Coast of Wales. The Channel Islands have evicted the Isle Of Man, which is off sulking in the North Sea, probably annoying cross Channel ferries into the bargain. Also “Woo! Geography“.


Or maybe your lovingly hand drawn map would look like this one, which is my personal favourite for no other reason than the helpful arrow in the North East corner pointing to Iceland (Not The Shop). Readers of this blog who don’t live in the UK should know that in addition to being a Nordic island country that straddles the boundary between the North Atlantic and Artic Oceans, Iceland is also a chain of British stores that specialise in frozen food.


I’d like to think that I’d be able to do better than this final example from someone who has applied a significant amount of cartographical license and really, really needs someone to buy them an atlas. I’d like to think that. I might even try to do this myself, but in the interests of preserving what little reputation I have, I’d only post my attempt if it was any good.


Maps courtesy of BuzzFeed.
Written and posted from home (51.427051, -0.333344)

The Great British Map; Or Great Britain vs. The United Kingdom vs. The British Isles

Last night I made another map. It tries to answer some of more perplexing and confusing facets of the geography surrounding the world’s 9th largest island. I mean of course Great Britain. No, wait. I mean the United Kingdom. No, wait. I mean Britain. Or do I mean England? See, it’s confusing.

  • So if the ISO 3166-2 code is GBR, how come the country is called the United Kingdom?
  • But if England is a country and the United Kingdom is a country, how come England is part of the United Kingdom?
  • What about Scotland, Wales and Northern Ireland?

This isn’t the first time I’ve covered this topic. The first time was for a post on the now defunct Yahoo! Geo Technologies blog entitled UK Addressing, The Non Golden Rules Of Geo Or Help! My Country Doesn’t Exist. The domain is now long gone and redirects to the Yahoo! corporate blog but I was able to reproduce this post here and it’s also captured in the Internet Archive’s WayBackMachine. The second time was when I made a variation of The Great British Venn Diagram. But this is the first time (though probably not the last) that I’ve used a map, which is odd as this is something that’s tailor-made for a map.

I’d been looking for a good source of geographic vector data that I could use to easily overlay polygons on a map and came across a rich source of free vector and raster map data from Natural Earth. But instead of overlaying that data on top of a standard slippy map using a JavaScript maps API to tap into a tile server’s bitmap tiles, I soon wondered whether I could actually make a map from the vector data. It turned out I could and decided to revisit the structure of the group of islands I live on one more time and try to visualise the difference between Great Britain, the United Kingdom and the British Isles. The end result, punningly entitled the Great British Map, looks something like this …

Great British Map

When the page first loads you’ll see the coastlines of Britain, Ireland and towards the bottom, the Channel Islands. There’s then five ways of looking at this particular map.

There’s the group of geographic islands that’s termed the British Isles; these show up in purplish-grey and if you’re observant, the Channel Islands vanish as they’re not part of this island group.

Great British Map - Great Britain

Then there’s the individual geographic islands of Great Britain, Ireland, the Isle Of Man and The Channel Islands; these show up in green.

Great British Map - United Kingdom

There’s two sovereign states, The United Kingdom of Great Britain And Northern Island and the Republic Of Ireland; these show up in red.

Great British Map - England

Next comes the administrative countries which make up the United Kingdom; England, Scotland, Wales and Northern Ireland. These show up in yellow.

Great British Map - Crown Dependencies

Finally, there’s the Crown Dependencies, the self governing possessions of the British Crown; the Isle of Man and the Channel Islands are these and they show up as purple.

What’s missing from the map? The British Overseas Territories, which is a polite way of saying what’s left of the British Empire that didn’t gain independence and which the United Kingdom still asserts sovereignty over. These are Anguilla, Bermuda, British Antarctic Territory, British Indian Ocean Territory, British Virgin Islands, Cayman Islands, Falkland Islands, Gibraltar, Montserrat, Pitcairn Islands, St. Helena, Ascension Island, Tristan da Cunha, the Sovereign Base Areas of Akrotiri and Dhekalia and the Turks and Caicos Islands.

If you’re interested in how I actually made the map, read on.

The source data from the map are two public domain datasets from Natural Earth; the 1:10m map Admin 0 Subunits dataset and the 1:10m Populated Places dataset. This data includes shapefiles which can be converted into GeoJSON format by the GDAL ogr2ogr command line tool. I extracted the vectors for the UK, Ireland, Isle of Man and Channel Islands from the Admin 0 Subunits dataset, keying on their ISO 3166-1 Alpha-3 country codes.

$ ogr2ogr -f GeoJSON -where "adm0_a3 IN ('GBR','IRL','IMN','GGY','JEY','GBA')" subunits.json ne_10m_admin_0_map_subunits/ne_10m_admin_0_map_subunits.shp

I then extracted the place data from the Populated Places dataset, again extracting data for the UK, Ireland, Isle of Man and Channel Islands, this time keying on their ISO 3166-1 Alpha-2 country codes. Not entirely sure why one dataset uses Alpha-2 and the other uses Alpha-3 but go figure; the data is free, accurate and open so who am I to complain?

$ ogr2ogr -f GeoJSON -where "iso_a2 IN ('GB','IM','JE','GG') AND SCALERANK < 8" places.json ne_10m_populated_places/ne_10m_populated_places.shp

Finally, I merged subunits.json and places.json into a single TopoJSON file, with the added bonus that TopoJSON is much much smaller than GeoJSON. The source GeoJSON weighed in at 549 KB whereas the combined TopoJSON is a mere 78 KB.

$ topojson --id-property su_a3 -p NAME=name -p name -o great-british-map.json subunits.json places.json

The main reason for use of TopoJSON is not that it’s much more lightweight than GeoJSON, but that Mike Bostock’s excellent D3 JavaScript library can easily slurp in TopoJSON and inject SVG straight into an HTML document. Which is precisely what the map’s underlying code does. There’s a lot more that D3 could do with this map, but it’s early days and for a first step into a new maps library, I’m pretty happy with how it’s turned out.

Speaking of code, it should come as no surprise that the map’s code base is available on GitHub. The Great British Map is based on great D3 tutorial that Mike has written on vector mapping using Natural Earth, so the similarity between Mike’s map and my map is entirely intentional.

Written and posted from home (51.427051, -0.333344)

Three Days. Three Cities. Three Continents

There’s a saying that travel broadens the mind. It’s a cliche but cliches generally come about because they’re true. This week my mind has been considerably broadened, visting the Tandale slum on the outskirts of Dar es Salaam and attending and judging the Sanitation Hackathon, but more about that in a later post.

The week started in Chicago, the Windy City, which lived up to its name, being cold, windy and with crystal clear skies. It’s a classic example of the American style of high rise architecture and the view from one of the meeting rooms in Nokia’s offices were spectacular.

Then I was at home for just under a day. Cold, clear skies and a typical suburban London street scene, surrounded by Victorian era terraced cottages.

Then I was under a blazing sun in the capital of Tanzania. The contrast between an American city, a British city and a Tanzanian one couldn’t have been more marked.

Three days, three cities, three continents and a well and truly broadened mind.

Written and posted from the Sanitation Hackathon, COSTECH, Dar es Salaam, Tanzania (-6.77457, 39.24125)

If You Live In The UK, You Need To Know About The Communications Data Bill

On Thursday June 14th. 2012, Theresa May, the UK Secretary Of State published the draft Communications Data Bill. If you’ve been reading or watching the UK media you might well be aware of this. The bill is hugely controversial, not least because it requires all UK internet service providers to track and store for 12 months the details of every email sent within the UK, every website visited from within the UK and every use of a mobile phone within the UK. This is a huge undertaking and will gather an equally huge amount of data. It’s also a costly undertaking, one that is ill conceived and impractical, one that is a massive invasion of our personal privacy and right to communicate with each other and one that is fundamentally undemocratic.

It’s costly because the estimated price tag is £1.8bn over 10 years, a price tag that the country cannot afford given the current economic climate and the austerity measures which are being applied across all aspects of the United Kingdom. The estimated price tag is also just that, an estimate and the UK Home Office has already stated that the final figure is likely to be much higher.

It’s ill conceived and impractical because the data collection and monitoring will be bypassed by those that the bill seeks to target; the terrorist, the paedophile and the organised criminal. As Conservative MP David Davis said recently

“The only people who will avoid this, avoid being covered by this, are the actual criminals because they are always around this. You use a pre-paid phone, you use an internet cafe to hack into somebody’s wi-fi. You use what is (sic) called proxy servers, and those are just the easy ways. There are harder ways too and you know, actually, the 7/7 bombers went round it. Organised criminals go round it. Organised pedophile rings go round it. What this will catch is the innocent and the incompetent”

It’s an invasion of privacy because the much maligned Human Rights act dictates that our right to a private life must be respected by the Government. Though Theresa May has been clear to point out that what will be recorded and monitored is the end points of our communications, email address, phone numbers, web URLs, not the content of those communications, you can build up an incredibly accurate picture of an individual’s life, activities and movements without the need to see the content of communications. It’s also an invasion of privacy because examination of this data would be able to be undertaken without the need for a warrant and thus for fair and impartial scrutiny.

It’s undemocratic because already Theresa May has branded anyone who criticises this bill as a “conspiracy theorist“, using the justification of “if you have nothing to hide you have nothing to fear“. This criticism is not only offensive to those who would hold our government to scrutiny, but it flies in the face of existing evidence of leaks and abuse of personal data that the government and its agencies already hold on us. It also is a direct reversal of the coalition government’s pre-election stance, when David Cameron, now the UK Prime Minister said “If we want to stop the state controlling us, we must confront this surveillance state”.

I’m not alone in thinking this. The UK’s Guardian calls it an online snooping scheme, InfoSecurity notes that the bill is more intrusive than anything anywhere outside of China. Big Brother Watch says “we are all suspects now” and Big Brother Watch and Liberty comments that it won’t matter if you have never got so much as a speeding fine, personal information about you will be stored just in case it may prove useful one day.

What you can do and what you should do is protest against this bill. Let your MP know that you’re deeply concerned about this bill. Sign the 38 Degrees online petition against the bill. I don’t consider myself politically active but I’ve done just this because I value my freedoms and my privacy. I think you should too. You can also draw attention to this through your website as I’ve done here on my blog and I’ve knocked up a quick and dirty WordPress plugin to do just that.

Written and posted from home (51.427051, -0.333344)

The Non Golden Rules of Geo (Redux)

Back when I used to work for Yahoo! I wrote a lot of posts for the Geo Technologies blog; for reasons partially explained in my last post, that blog is now offline, presumed dead. But one post that seems to keep catching people’s imagination is the one in which I, somewhat tongue in cheek, codified the Six Non Golden Rules Of Geo. Much to my satisfaction, it keeps getting mentioned, although the full original post is inaccessible, as is the rest of that blog. Nate Kelso reproduced part of it, as did John Goodwin but until earlier today I’d not been able to find the full post.

Step forward the aforementioned John Goodwin who, with a bit of internet detective work, managed to find a mirror of the post. While I much prefer to link to blog posts rather than reproduce them in full, in this case I’m plagiarising myself and making an exception on the ground of inaccessibility, and have mirrored the post in full here. It’s worth mentioning that this post was originally written in February of 2009, when I was still working for Yahoo! so it’s a little out of date and was originally posted as …

UK Addressing, The Non Golden Rules of Geo or Help! My County Doesn’t Exist

George Bernard Shaw once said the golden rule is that there are no golden rules and at Geo Technologies we understand that there is no one golden rule for geo and so we try to capture and express the world’s geography as it is used and called by the world’s people. Despite the pronouncement on golden rules, a significant proportion of the conversations we have with people about geo lend themselves to the Six Non Golden Rules of Geo, namely that:

  1. Any attempt to codify a series of geo rules into a formal, one size fits all, taxonomy will fail due to Rule 2.
  2. Geo is bizarre, odd, eclectic and utterly human.
  3. People will in the main agree with Rule 1 with the exception of the rules governing their own region, area or country, which they will think are perfectly logical.
  4. People will, in the main, think that postal, administrative and colloquial hiearachies are one and the same thing and will overlap.
  5. Taking Rule 4 into account, they will then attempt to codify a one size fits all geo taxonomy.
  6. There is no Rule 6, see Rule 1.

I codified these rules after a conversation last week, via Twitter and Yahoo! Messenger, with Andrew Woods, a US based developer who was, understandably, confused by the vagaries of the how addresses work in the UK. Andrew’s blog contains the full context but it can be distilled into three key questions:

  • If the country is The United Kingdom, how come the ISO 3166-2 code is GB?
  • If the country is The United Kingdom, is England a country?
  • If England is a country, do I use it in an address?

As a US developer, Andrew is naturally fluent with the US style of addressing, with all of its’ localised and regional exceptions. This is a good example of both Rules 3 and 4 in the real world; most people in the US will use number, street, city, State and ZIP for specifying an address. But how does this transfer to the UK? What’s the equivalent of a State … England, Scotland or Wales? Let’s try to answer some of these problems:

Middlesex In 1824

If the country is The United Kingdom, how come the ISO 3166-2 code is GB?

The UK’s full name is The United Kingdom of Great Britain and Northern Ireland and although the United Kingdom and Great Britain are used interchangeably, Great Britain really refers to England, Scotland and Wales. At the time of writing, both GB and UK are formal ISO 3166-2 codes for the United Kingdom with GB being the assigned code for Great Britain and UK being exceptionally reserved by the United Kingdom.

If the country is The United Kingdom, is England a country?

To be formal and precise, the United Kingdom is a unitary state, not a country, with four “member” countries; England, Northern Ireland, Scotland and Wales.

If England is a country, do I use it in an address?

Normally, no. A full UK address consists of the following:

  • The addressee’s name, if known or applicable
  • The company or organisation, if known or applicable
  • The building name; optional if the building has a number
  • The number of the building and the name of the street
  • The locality name;optional
  • The Post Town
  • The county; optional if a Post Town and Postcode are supplied
  • The Postcode

… for example, take our office address of Yahoo! Geo Technologies, 125 Shaftesbury Avenue, London, WC2H 8AD. This address has no building name, a building number and street, no locality name, a Post Town, no county as we have a Post Town and a Post Code, and a Post Code.

Which brings me neatly to another example of Rule 4 and the missing county of this post’s title. The UK’s postal hierarchy and administrative hierarchy are not the same. Since 1996 the first half of a UK postcode, known as the outward code, has been used to help in the sorting of mail but prior to this a set of postal counties were used as part of addresses and these frequently do not match the current set of administrative counties. For example, the county of Middlesex was formally abolished in 1965 with the majority of the county becoming part of Greater London. Despite this and despite the 1996 postcode changes, Middlesex lives on as a postal county and as informal area name with the side effect that it is still possible to send mail, and have it delivered, to places in a county which hasn’t existed for over 40 years.

Oh, and Yahoo! GeoPlanet, naturally, recognises Middlesex and correctly identifies it as a Historical County.

Written and posted from home (51.427051, -0.333344)

Is it Great Britain, the United Kingdom, the British Isles or what exactly?

In February 2009 I wrote a post for the Yahoo! Geo Technologies blog about how people outside of the United Kingdom are sometimes confused by the vagaries of how to correctly write street addresses in the UK and if the United Kingdom is a country and if England is a country then how can England be part of the United Kingdom. Some pointed comments to the original post ensued from the likes of Ed Parsons from Google and Andrew Larcombe from the British Computer Society’s Geospatial Specialist Group.

And so almost a year later I went back and started to research exactly how the United Kingdom, Great Britain and the British Isles are actually put together. It was an educational journey because, even with being born and bred in London, it turned out that even I didn’t fully understand this subject. So I tried to codify it with a variation on The Great British Venn Diagram, which looks something like this:

United Kingdom Venn Diagram

Let’s start with the easy bit. England, Scotland, Wales and Northern Ireland are constituent countries at an administrative level; they’re shown in yellow on the diagram above.

Great Britain, so named as to distinguish itself from Brittany, is a geographic island which comprises the countries of England, Scotland and Wales.

The United Kingdom is a sovereign state, shown in red, which comprises England, Scotland, Wales and Northern Ireland.

Ireland, also a geographic island, contains the administrative country of Northern Ireland and the sovereign state of the Republic of Ireland or Eire.

So far so good, but what about the Isle of Man and the Channel Islands? Both of these are not part of the United Kingdom, instead they are both Crown Dependencies, shown in purple, and are part of a federacy with the United Kingdom. And a federacy? That’s a type of government where one or more of the member administrative units have more independence than the majority of the member administrative units.

Finally, there’s everything else; those remnants of the British Empire scattered across the globe which enjoy the slightly nondescript appellation of British Overseas Territories (or British Dependent Territories prior to 2002 or Crown Colonies prior to 1981).

To be more precise, these are parts of the British Empire that did not gain independence and that the United Kingdom asserts sovereignty over. They take in Anguilla, Bermuda, British Antarctic Territory, British Indian Ocean Territory, British Virgin Islands, Cayman Islands, Falkland Islands, Gibraltar, Montserrat, Pitcairn Islands, St Helena, Ascension Island and Tristan da Cunha, the Sovereign Base Areas of Akrotiri and Dhekalia and the Turks and Caicos Islands.

Of course not everyone agrees with these definitions

Britain Venn Diagram

Image Credits: Nanci.
Written and posted from the Kempinski Hotel Bristol in Berlin (52.5052405, 13.3280218)

An Open Letter to Asda and Walmart

This is an open letter to Andy Bond, Chief Executive of Asda and to Mike Duke, CEO of Wal-Mart.
As a British citizen who travels a lot in the US I understand that the “customer service” ethos which is so prevalent in the US doesn’t travel or translate particularly well in the UK. I also understand that it’s almost naive to expect that since Asda was taken over by Wal-Mart in 1999 any type of US values would transfer to the UK arm. I also understand that the UK supermarket business is highly competitive and that through Asda, Wal-Mart is competing head-to-head with Tesco, Morrison’s and Sainsbury’s. I understand and accept all of this.
What I do not understand and what I do not accept is the sheer bloody-mindedness and rudeness of your staff, especially those of your online retailer business.
Let me explain.
As a family we tried out Asda, as their prices are extremely competitive compared to those of their competitors, so on the 19th of October we booked a delivery slot for an online shop; the order wasn’t particularly large or complex but it was still in excess of £100.00. The only delivery slot available was from 8.00 PM to 10.00 PM the following day.
October 20th. 10.05 PM. No shopping. So I look online for some insight.
We know how important it is that we deliver on time but occasionally we can run into difficulties. In the unlikely event that we will be late, we’ll always try to let you know.
I liked the answer to the question “My delivery hasn’t arrived yet?” … “If your shopping hasn’t arrived by the end of your delivery slot, please call our Helpline on 0844 8733333 (calls will be charged at a local rate, lines are open 8am-10pm, 7 days a week.)“.
Unless, of course, your shopping is due to arrive at 10.00 PM in which case if there is a problem, anyone at Asda has gone home for the night. But not my delivery driver it would seem, who rings me at 10.20 to tell me “we’re running slightly late” and that “your shopping will be there at 35 past latest“.
October 20th. 10.40 PM. No shopping.
October 20th. 10.45 PM. Shopping arrives with a giggle and a laugh; “We’re running a bit late tonight (hee hee hee)“. No apology, no contrition, no final bill so I know how much we’ve actually spent, it all seems one great big joke. Apart from the point where they knocked on the front door so hard it managed to wake both of my children up. A great joke, hilarious; only I’m the only one who doesn’t seem to find this particularly amusing.
So I look at my confirmation email … “If you have any queries about ASDA Online Shopping you can contact us on 0844 8733333“. Ah yes, this would be the helpline that closed at 10.00 PM.
So the following day at around 9.30 AM, we ring customer service; they’re open now. They promise to ring the store and the store manager would call us.
October 21st. 2.00 PM. No call. So we hold while customer services rings the store; the store manager “isn’t available and will call us back“.
October 21st. 5.00 PM. No call. So we call customer services who have, miraculously, been in touch with the store. They agree that this is appalling customer service, so appalling that as a token of their esteem they offer “Free delivery of your next order“. This assumes there will be a next order and it works out at the grand total of £4.25. Obviously not that appalling so we say that it’s not good enough.
Asda’s second, and final as it turns out, offer? £10.00 in e-vouchers, which again assumes that there will be a next order and which, by the way, needs to be redeemed in 2 months otherwise they’re invalidated. Still not that appalling so we say that it’s not good enough. So we’re put on hold … permanently as the call isn’t picked up again and after another 15 minutes we hang up in sheer frustration.
As an organisation, Asda may have had a consumer spend of almost £3.5B and a market share of 17% as of August 2008 but as of October 2009 my wallet won’t be contributing to that spend and Asda’s market share just dropped by one household’s worth, which has gone back to one of their rivals.
Photo credits: itsleftyjuliebee and Tico on Flickr

Posted via email from Gary’s Posterous

When a Middle Initial Has Transatlantic Significance

Mr. Iain Banks is a Scottish author with two personas. As Iain Banks he writes mainstream, if slightly edgy, novels. As Iain M. Banks he writes science fiction novels, including the Culture series, which deals with a vast and sprawling interstellar utopian civilization. The M is important here. Without it you know you’re getting a mainstream story. With it, you know you’re getting sci-fi. But not in the USA apparently.

While wandering around Newark Liberty airport in New Jersey, I came across what I thought was a new Iain M Bank novel in the Borders concession. So, M. Sci-fi. It even has the by now standard endorsement from William Gibson telling us that this is “science fiction of a peculiary gnarly energy and elegance“.
So, M. Sci-fi. Right? Apparently not quite.
Paul Miller tells me on Twitter that in the UK this is an Iain Banks novel. No M. Not sci-fi. A quick cross check between and shows that Paul’s right. So what’s going on here? I’ll have to read the book to try and work out what’s happening but for now at least, it appears that for Iain Banks’ middle initial it’s a case of plus ça change, plus c’est la même chose.

Posted via email from Gary’s Posterous

Deliciousness: more bacon, UK geek location, your PIN number, birds tweeting, Ohio as a piano, OMG and WTF and UNIX turns 40.

A semi regular, almost weekly, trawl through the latest stuff on the interwebs bookmarked on Delicious.