# Pret and Eat in Central London

As per my last post, I was playing (and still is) with data about Pret and Eat locations in Central London. To get the locations, I first have to define what I mean by 'Central London'. To keep things simple, I decided to take an arbitrary rectangle:

(map from Google maps) So the latitue spans from 51.481157 to 51.531074, and the longitude from -0.219215 to -0.069970.

I then divided up these into squares of 400m (using info from http://www.movable-type.co.uk/scripts/latlong.html, 0.006degrees lng and 0.004 lat roughly define a square of 400m), then run google places api

```
var baseURL = `https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=${apiKey}`
var queryURL = `${baseURL}&location=${latLng}&radius=${radius}&name=${restaurantName}`
```

through this grid for 'EAT' or 'PRET A Manger', and saved the `geometry, place_id, name`

to my database. I also made a csv of EAT and Pret locations for convenience and also so I can poke at it in QGIS. So far, I've found that there are around 190 Prets vs 120 EATs in my search area

Constructing a voronoi around Pret locations, and showinng where the EATs are

there are actually quite a few polygons without EATs, but also quite a few, especially round the more central London bits (on the right) where there are > 1 EAT in one voronoi.

Unsurprisingly, if you construct voronoi around EAT locations you get a Pret in most of them.

The next questions I am asking is: how are distances between Pret and Eat distributed? And how far does it take to get to your nearest sandwich shop (well Pret/EAT)

A quick calculation of distance matrix in QGis gives me the following distribution:

(In QGis the default is that the distance matrix is given in decimal degrees. Converting it back to meters I again used the rough approximation from above)

It seems like in Central London you are likely to find a Pret within 100m or so of an EAT shop.Of course this is the 'as crow flies' distance so you might need to walk a bit further. But still, pretty close.

But that's for next time. Enough trivial thoughts for today. If you are interested enough to poke around at my code its here.