Recommendation system to start a restaurant business in London
Tags: Machine Learning, K Means, Unsupervised Learning, Data Science, Udacity Nanodegree

I. Introduction

A. Description & Discussion of the Background

London is a megacity, the capital of the United Kingdom, and one of the oldest of the world’s great cities, with its history spanning nearly two millennia. By far Britain’s largest metropolis, it is also the country’s economic, transportation, and cultural center. The population of London had already exceeded one million by 1800 and it reached 9 million in 2018. London and the UK’s population has one of the most diverse groups of origin countries in the world. Also, London is one of the world’s leading tourism destinations with 21 million international visitors in 2018.

In recent years the restaurant industry in the United Kingdom and specifically London has undergone a period of growth. Consumer expenditure on restaurants and cafes reached close to £ 88 billion in 2017. The number of enterprises has been steadily increasing, contributing £ 17.9 billion to the British Economy.

Considering London’s diversity and ethnicity it is evident that starting a restaurant business would earn you more money comparatively than most of the other businesses. Although, with more profitable business there comes the most competition. This article can serve as one of the guides to start a restaurant business based on a particular cuisine like Indian, Italian, American, etc., by providing a specific location. The number of restaurants in a specific location categorized based on cuisine and population distribution based on ethnicity and culture are some of the features considered for analysis.

B. Problem Description

A restaurant is a business which prepares and serves food and drink to customers in return for money, either paid before the meal, after the meal or with an open account. London is famous for its excellent cuisine. Its food culture includes an array of international cuisines influenced by the city’s immigrant history.

So, it is evident that to survive in such a competitive market it is very important to strategically plan. Various factors need to be studied in order to decide on location such as;

1. London Population and demographics

2. Who are the competitors in that location?

3. The cuisine served / Menu of the competitors

4. Are there any venues like Tourist attractions, Entertainment zones, Parks, etc., nearby where the floating population is high.

5. Segmentation of the Borough

6. Untapped markets

7. Saturated markets etc.

And the list goes on…

Even though well-funded XYZ Company Ltd. needs to choose the correct location to start its first venture. If this is successful, they can replicate the same in other locations. The first move is very important, thereby the choice of location is very important.

Target Audience:

To recommend the correct location, XYZ Company Ltd has appointed me to lead the Data Science team. The objective is to locate and recommend to the management which neighborhood of London will be the best choice to start a restaurant based on cuisine. The management also expects to understand the rationale of the recommendations made.

Success Criteria:

The success criteria of the project will be a good recommendation of neighborhood choice to XYZ Company Ltd based on the Lack of such restaurants considering cuisine as a factor in that location.

II. DATA

To build a recommendation model, following datasets and information are considered for analysis;

Scrapped Wikipedia using BeautifulSoup, to extract information about 32 London boroughs also known as local authority districts. Also, considered local areas or neighborhoods for each borough for detailed analysis. I used Foursquare API to get information about available restaurants for a given neighborhood and borough in London. The API also provided information about restaurant styles based on cuisine. Employed data provided by the British Government from data.london.gov.uk to get more insights about London boroughs. The data provided knowledge about the population density, immigrants’ country of origin, and many more.

III. METHODOLOGY

Business Understanding:

Our main goal is to get the optimum location for a new restaurant business in London for XYZ Company based on cuisine.

A. EXPLORATORY DATA ANALYSIS

London is mainly divided into 32 boroughs also known as local authority districts with 526 neighborhoods. Copy and folium libraries to create a map to visualize neighborhoods of London.

All the blue markers on the map above are for neighborhoods. It is evident that the city is more congested at the center and widespread in the outskirts.

B. PROBLEM APPROACH AND USING K-MEANS CLUSTERING

The process starts with scrapping the Wikipedia web page containing information about London boroughs and neighborhoods present in each borough using the library BeautifulSoup. During the process Pandas, the data frame is constructed with two rows having boroughs and corresponding neighborhood information.

The neighborhoods in the resulting data frame have to be plotted on a map using a folium library. In order to do so, latitude and longitude value for each neighborhood is determined using the geopy library. After getting latitude and longitude values, it is merged with the original data frame containing neighborhood and borough information appropriately. Finally, each neighborhood is plotted on the folium map. A neighborhood with undetermined latitude and longitude values by geopy are excluded from evaluation. Also, the resulting values create four outliers and they are dealt with using corresponding longitude values.

The extreme left location to be considered for the study is Longford, Hillington with a longitude value of ‘-0.490805’. Similarly, the extreme right is North Ockendon, Havering with a longitude value of ‘0.293698’. So, any longitude value less than ‘-0.5’ and greater than ‘0.3’ will not be considered for evaluation.

Now Foursquare API is used to explore the neighborhoods and segment them. First, the data frame with all the venue information provided by foursquare for the given latitude and longitude values. Foursquare API returns 12237 results with 423 unique categories.

Now, only restaurants are extracted from the venue category list. The resulting data frame has 87 unique categories of cuisines available in London. Next, one hot encoding is performed on the resulting data frame for each neighborhood. The results have 2657 unique restaurants in London with 87 different styles of cuisines.

Rows are grouped by neighborhood to determine the frequency of occurrence of each restaurant. A new data frame is created with each row assigned for the neighborhood and its corresponding top ten common restaurants based on cuisine.

Finally, k-means clustering is performed on the data frame to check the pattern for each neighborhood and get the information about the top ten common restaurants for each neighborhood. Before fitting the data frame best value of k for k-means clustering is determined by based on silhouette_score from sklearn.metrics. It is observed from the graph below that, k = 8 would yield better results for the computation using k-means clustering.

Finally, k-means clustering is performed on the following data frame with k = 8, to determine the pattern of the top 10 restaurants based on cuisine in every neighborhood.

III. RESULTS

Neighborhood K-Means clustering based on the mean occurrence of venue category:

All 8 clusters follow unique patterns for the top ten common restaurants for a particular neighborhood. The detail shows the number of neighborhoods assigned to each cluster. Cluster 2 has the highest neighborhoods of 2306 and cluster 1 has the least with 16.

The clustered map is shown below;

IV. DISCUSSION

The results can be approached in two ways;

1. If XYZ company want to open a restaurant in a preferred location and irrespective of cuisine, refer to that neighborhood in a specific cluster and chose cuisine with the least common restaurant for better profits

2. If XYZ company wants to open a restaurant with a preferred cuisine and irrespective of location, refer to the cluster with the least number of restaurants with that specific cuisine and select one among the neighborhoods based on the company’s preference.

V. CONCLUSION

This analysis is performed on limited data. This may be right or may be wrong. But if a good amount of data is available there is scope to come up with better results. If there are a lot of restaurants probably there is a lot of demand. London has so many restaurants, yet certain neighborhood or borough doesn’t have a specific cuisine restaurant available.

As per the neighborhood or restaurant type mentioned like Indian Restaurant, analysis can be checked. A venue with the lowest risk and competition can be identified.