Grill’d are a high-end hamburger restaurant that specialise in healthy burgers. They have grown from having one restaurant in 2004 to 147 restaurants by February 2021. That’s around 35% per annum growth for 17 years. They achieved that by selling franchises, which means their success has depended on being able to pick the right location for their next restaurant.
There are two challenges to this. First, do no harm. You don’t want a new location to cannibalise existing sales. And second, once we’ve ruled those places out, where should we open the next restaurant?
We’ll tackle the first problem today. Let’s make a map showing head office where not to open a new store, by colour-coding the map according to how far away any point is from an existing restaurant.
First, let’s find out where the existing restaurants are.
I scraped Sydney restaurant locations from the Grill’d website, and then geocoded it, which involves asking Google Cloud to figure out the latitude and longitude for the locations provided. The script for that can be found here.
Here’s a table of the Sydney restaurants.
There are 19 stores in Sydney. Let’s put them on a map. (Hover your mouse over a restaurant to see its address and phone number.)
From a quick scan, we can see that most restaurants are located around the CBD, although there are a few others scattered across the suburbs.
To colour-code the map according to distance from existing stores, we have to measure distance from existing stores to various other points on the map. So we’re going to need to do two things:
Cut Our Map Into Squares - Doing that will allow us to measure the distance from the middle of each square to each of our restaurants.
Change Co-ordinate Reference Systems - When measuring the distance between two points in an area as large as Sydney, the measurements get thrown off because of the curvature of the Earth. Geographers get around this by using clever maths to flatten the map at that location to make the measurement, in the same way that you might want to flatten a basketball to measure the distance between two points on it with a ruler.
Let’s start with a simple outline of Greater Sydney:
Now let’s redraw the map as if the world was squashed flat around
Sydney, which will allow us to measure distances properly. We can then
cut the map into 2km squares:
This allows us to measure the distance from the centre of each grid
square to the nearest restaurant.
For example, let’s take one random grid square somewhere in Sydney, say, in the south-west …
How far away is that square from all the Grill’d restaurants? Let’s
add them to the map.
Now we can measure the distance between our random grid square and
each restaurant. This will allow us to find the nearest restaurant to
our random square. (Turns out, the closest one is 14 km away.)
If we can do that for one grid square, we can do that for all grid squares to give us a heat map.
Click anywhere in the map to find out how far away that square is from the nearest Grill’d restaurant.
The map can show you at a glance which suburbs are close to a Grill’d (lighter squares), and which suburbs are missing out (darker squares). For instance, Liverpool is missing out. So is Hornsby. But Chatswood is not. In principle, we don’t want to open a store in Artarmon as it would cannibalise sales from the store in Chatswood next door.
There are a couple of directions this project could go next.
First, now that we’ve figured out where the next restaurant shouldn’t go, we could figure out where it should. Data science can help by figuring out which demographic factors predict burger sale. One way to do that is to survey people passing by a store, and noticing whether they go in or not. This answers the question “Of the people who could have been customers today, what are the characteristics of the people who actually were customers?” The survey questions can help us understand the demographics of the people, and statistical analysis can find out which demographic characteristics are important. Then we can look at ABS data to find out which places have people with those demographic characteristics.
Second, we could tweak the size of the circles. We could do this by studying how close two stores have to be to each other before sales are affected. We could figure this out by looking at whether our model loses predictive power as restaurants get closer to each other. For that we’d need sales data.
And that’s for another day. Right now, it’s time for lunch.