Which bits of the EU are closest to the UK?

This is a short and simple post, that is part 3 in a series:

  1. How far away is the most remote part of the UK?
  2. How far away is the closest bit of the EU?
  3. Which bits of the EU are the closest?

The code I wrote to calculate the distances for the previous article also kept track of which bits of the EU were the closest to some part of the UK. The output of this is a list of EU locations, and for each location there’s a count of how many parts of the UK (post codes) saw it as the closest bit of the EU.

In the map below I’ve plotted all the places, and colour-coded the markers based on the count next to each place:

  • Red = 1,000+
  • Green = 100 – 999
  • Blue = 10-99
  • Yellow = 1-9

On the mainland, the most common near places are near Cherbourg (the red blob on the North West France coast), Sangatte / Calais (the red blobs on the top of France) and Den Helder in the Netherlands (the code ignored the islands off the Netherlands coast). It’s interesting that if you go North from Den Helder, there are no markers until the Thyboron region of Denmark i.e. there are none in Germany. Also, there are none in Belgium.

The Eastern and Northern extremities of the Republic of Ireland are red. The notable stretch of yellow is on the Republic of Ireland / Northern Ireland border, highlighting the geographic and social intertwining of the two countries.

Maps and colours

You might have noticed that I’ve put random colours on the non-UK countries to show their boundaries. There’s an interesting bit of maths about how many colours you need to colour maps such that neighbouring countries don’t share colours. This extends to other areas, such as a compiler sharing machine registers among language-level variables, to create the illusion that the computer can support as many variables as required.

One of the inputs to this is the information about which variable is needed when, as variables come in and out of scope, which you can think of as being analogous to a map showing where countries start and end. The colours are then the registers that the compiler has at its disposal.


UPDATE 26th July 2020: added section on maps and colours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s