All writing

Data Visualisation

I started mapping London's AI companies. Then I built a miniature London.

A good excuse to play with PixiJS and map London's AI companies.

  • TypeScript
  • PixiJS
  • Geospatial Engineering

“London is so back!”

I’d been following #Londonmaxxing on X and reading about AI companies opening offices across London. I wanted to know where they were actually based, right down to the street and the building.

Putting them on a map seemed like a good excuse to play with PixiJS and try a different kind of data visualisation. I thought I’d put a few pins on it. I ended up building a miniature London I could poke around in.

Building a little London

I wanted it to feel like London. I get my bearings from the Thames when I’m looking at the whole city. Zoom in a bit and you start to pick out parks, railway lines and buildings you know, like the Tea Building in Shoreditch.

I took the building footprints from OpenStreetMap and used the recorded heights where I had them (I estimated the rest). I had fun turning those outlines into little isometric buildings in PixiJS. It was nice to see bits of London I knew taking shape.

Isometric view of Old Street and Shoreditch, with Bunhill Fields, Shoreditch Town Hall and the Tea Building labelled.

Trains and buses

Once I had the buildings, I wanted to get a few things moving. I added little trains and buses. They’re small enough that you might miss them at first.

I had to get the trains to follow the real tracks and the buses to stick to the roads, without either taking a shortcut through a building. I wanted the trains to disappear when they went under a covered bit of railway and pop out again at the other end. Getting that to work was fun.

A pale yellow train on the tracks just outside the roof of Waterloo station.

Finding where companies actually work

A company’s registered office might be somewhere its engineers never go. A press release might give you an address the company hasn’t moved to yet, and sometimes all you have is a postcode and a mention of London.

I used Tavily to search the web and pull out relevant text, Geoapify to turn addresses into coordinates, and a language model running locally through MLX to help make sense of what came back. I check the sources myself and decide what goes on the map.

Companies move and new ones open offices, so I need to be able to go back to an address, see where I got it and update it when things change. I wrote about my attempts to automate some of that research in Harness engineering: Automating London AI Atlas.

I'm still adding companies and improving the map. Have a wander around London AI Atlas (works great on mobile too ;))