One of my favourite works of art is The Great Bear by Simon Patterson.

At first glance, it appears to be a normal London Tube map. But look closer…

Cool! But there is something about it which has always bothered me. Each Tube line represents a theme – therefore, a station at the intersection of multiple lines should be represented by someone who matches all of those themes.

For example, here’s Baron’s Court – the intersection of the Explorer line and the Saint line – represented by Saint Ursula.
She is just an saint – she has nothing to do with exploring. This artwork is wrong!

So, can we write something to query Wikidata to generate a more accurate artwork?
Because accuracy is my aesthetic.

The result is just four people. And that’s where the problem starts. Simon Patterson chose categories for the lines which often don’t have any intersections. There is no one who is an Italian Artist who is also a Saint and also a Footballer.

So, to create a more accurate artwork, we’ll need different categories.

Nodes

One of the first things we need to do is understand the Tube map as a graph – with stations as nodes and lines as edges.

Brief survey of the problem…

There a few anomalies in the data. It lists Edgware Road as two separate stations – even though it’s really one station.
The same problem is present on Hammersmith and Paddington. Cleaning data is “fun”…

The categories are also challenging. This is how many times the Bakerloo line intersects with the other lines

That is – the Bakerloo line touches every other line at least once. As do the Northern, Central, and Jubilee lines. Those lines will need to contain some very broad categories.

Back to Wikidata

So, we want to replace each station’s name with a human’s name. We need attributes which are wide-spread enough to get good coverage in the data – and quirky enough to be interesting. I’d also like to keep some of the original categories:

I suspect there’s a way to interrogate SPARQL to find a list of categories based on a graph – but I’m not clever enough to do that. I started off with an entirely arbitrary set of attributes:

Academy Award Winners

Left-handed people

Nobel Prize Winners

People born in London

Educated at UEA (the university where my wife and I first met)

Female Computer Scientists

Saints

Explorers

Journalists

Sinologues

Comedians

Here’s the query for Comedians who were educated at UEA and were born in London:

I’m beginning to see why the original artist was more liberal in his accuracy!

Sorting

I want the map to contain notable people. There are a couple of ways to assess the “notability” of a Wikidata subject. I’ve chosen to use “sitelinks” – that shows how many languages their article is available in. It’s a crude, but quick method.

Correcting for Bias

It says to return anyone without the sex/gender of “Male”. (Yes, I know things are a bit more complicated than that – but this is a good way to return women, intersex people, agender, transgender folk etc).

If no non-men were returned, I repeated the search but omitted the filter.

Because I used “Born in the UK” as a filter, there is probably a bias towards white people. And people who become Professors or members of the Royal Society may also be the product of a biased society. There are many other filters and categories I could have chosen – and I hope some of you will create maps for your own cultures and societies.

Putting it all together

Copyright

OK gang, turns out that copyright law is even trickier than computer code! I’ve spoken to Simon Patterson and he is happy for me to host a not-for-profit version of this piece of art which is heavily indebted to his original.

TfL has been litigious in the past when it comes to derivative maps. I tried contacting them several times, but didn’t receive any clear answers as to whether I could do this.

Details

Here are a few interesting close-ups of the map – they may be different from the final version.

Errata

The data in Wikidata may be incorrect or incomplete.

I originally didn’t restrict it to just humans! So a few weird entries snuck in. Using ?person wdt:P31 wd:Q5 . corrected that. But I’m wondering if anyone on the map is fictional…!

Due to timeouts and my crappy coding, I ran the code over several passes on different days. If you run the code, you might get different results.

I didn’t use people’s names in their original language, I had to back-fill them. I probably missed some. I should have used P1559.

Even after lots of jiggling of categories, one or two stations kept coming up blank. So I manually added in a few people. Can you spot who they are?

Some people’s names were too long for the allotted space, so I have swapped a few people around. Better code would try to keep name length as close to the original as possible.

There’s no (intentional) ordering. It might be nice to put people on the line in order of, say, year of birth.

Similarly, there’s almost no relation between the people and the places. Although I’ve contrived to put the author of Mary Poppins somewhere special!

The Hammersmith One font only has a basic set of characters – so non-European languages (and some accents) are in the default font.

The Elizabeth Line / CrossRail hasn’t opened yet. I suspect it will be much harder to produce a new map once it goes live. Similarly the DLR and Overground lines are excluded.

The SVG renders well in Firefox, and seems to work OK in Chrome. Please let me know of any glitches.

I’ve also added a couple of Easter Eggs. Enjoy finding them!

Thanks

Mainly to my wife, Liz, for being very patient with me while I swore at my code.

I am indebted to Simon Patterson for his incredible and inspirational artwork. When it was created in 1992, Wikipedia did not exist. Linked Data stores were in their infancy. It would have been close to impossible to create a semantically correct map. Nothing in my version is intended to take away from Patterson’s work and creativity.

Sorry to be pedantic but the two Edgware Road and Hammersmith stations aren’t really just one station.
Yes they have the same names but they are separate entities. They are all in separate buildings and you have to cross at least one road to get between them.
Sorry if this puts a spanner in your works.

Paul Kerensa did a manually-researched version for comedians a few years ago that was line-accurate (station on multiple lines had to describe all facets of the comedian or act). It’s still online at https://www.paulkerensa.com/gfx/tube_map3.gif

I appreciate the effort you’ve put in, but I have a major bugbear (similar to the one you had originally) as you have lots of people there who were born in the UK (eg – Angela Carter, Mary Wollstonecraft), but aren’t on the born in the UK line – which invalidates the whole point of that line. They should be on points that intersect.

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Support this blog

Enjoyed this blog post?

Buy me a birthday present

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.