Finding a restaurant best place in Paris
By: Sebastien Sime
Tags: API, Web Scraping, Data Science Projects, Clustering Analysis, Machine Learning

Finding a restaurant best place in Paris

Searching where a business can bring a service or a product to the end users, is an important question each undertaker or business owner has to face sooner or later. Particularly in the case of a restaurant or a bar we may wonder about the best possible place to open. The answer to that apparently simple question require taking into account many parameters regarding what is called the marketing mix (i.e. parameters related to the product \ service, the place, the price and promotion).

In addition, everyone can access nowadays any kind of information only using internet but, the amount of data and time just looking for the right information and performing some comparisons could be not negligible. Only considering Paris (and not the whole “île-de-France” region which is on a more important territory) with its twenty (20) boroughs of four (4) neighbourhoods each, with many possible venues for a restaurant.

To ease the process for an undertaker who wants to open a restaurant in Paris, I used a data science method can then be used in combination to a defined set of parameters to advice the owner on possible locations or strategies.

In this post, I will use Foursquare location data combined with a machine learning algorithm to provide insights on potential location in Paris.

2. Tools, Methodology and Data

2.1. Tools & methodology

I principally used internet and the Foursquare API as main sources. The used datasets were either directly downloaded from open repository or web-scraped from web pages. I used Python as the main language to do all this. Finally, I used the Folium library to build Paris visualizations.

To perform our analysis, we have chosen to address four majors (4) parameters as analysis axis:

The general reputation and accessibility of Paris boroughs.

The global environment in terms of famous venues in Paris neighbourhood.

Level of restaurants competition in each neighbourhood.

But before dealing with the above parameters, it is important to have a broad view of Paris.

2.2. Data Sources

The following data will be used:

Web page providing the rank of the city of Paris compared to others French cities with more than 10000 people. The data was web-scarped from REF [1].

2. Web page providing data about general neighbourhood’s notations. The data was web-scraped from REF [2].

3. Data providing, Latitude, Longitude of Paris’ neighbourhoods downloaded from REF [3].

4. The recommended existing venues in each neighbourhoods downloaded using the Foursquare API.

2.3. Data Workflow

I used the ELT philosophy as I first Extracted the data, Loaded it into to my Jupyter notebook and Transform it finally.

After transformations, yous can see below the list of data frames’ heads:

Extract of most enjoyable French cities with more than 10000 people: (for Paris description)

This data frame provide general information about major cities and their respective notations.

Extract of general Paris boroughs notations: (for boroughs description)

This data frame provide notations (out of 10) of some parameters. The notations have been given by a sample of French people and summarized on the used web-page.

Since the data was well formatted, a clustering analysis with the KMeans algorithm has been used to categorize the dataset.

Extract of Paris neighbourhoods location data frame:

This data frame provide inputs (using latitude and longitude) for the Foursquare API calls.

Extract of Foursquare recommended Paris neighbourhoods’ venues data frame: (for neighbourhoods description)

We can see that we will be dealing with more than 5000 venues.

Since we are interested in venues categories, we had to transform the above category feature (hot-encoding) in order to use the “KMeans” clustering algorithm. Below we can see the transformed data frame:

3. Results

3.1. Paris little description

According to our data, Paris is not the most enjoyable French city to live in. The city is ranked 722th behind others French major cities like Marseille or Nice.

This statement is totally in contrast with the high population density (about 20934 people per square kilometre) and the fact that there are many companies headquarters (confirmed with83% of employment rate) in Paris.

3.2. Paris Boroughs description

Using two as the optimal clusters number (computed with the Elbow method), the Paris’ boroughs can be divided into two groups:

A group with good reputation (i.e. good security and environment notations) boroughs in green on the picture below.

A less good reputation group in light yellow on the picture below.

3.3. Paris neighbourhoods description

The clustering analysis performed with the Foursquare categories, provided three clusters, with each point representing one neighbourhood on the map below.

The cluster description is as it follows:

Neighbourhood cluster 0 ( In red ): high density for restaurants (French, Italian) and hotels

): high density for restaurants (French, Italian) and hotels Neighbourhood cluster 1 ( purple ): medium density fort restaurants and hotels

): medium density fort restaurants and hotels Neighbourhood cluster 2 (in light green): low density (mostly Asian, French and Italian restaurants)

There is about 693 French restaurants in Paris (which represent about 38% of all restaurants in Paris in the returned 82 restaurants categories).

The composition of each cluster, provided below, show that French restaurant is still the first venue category in clusters 0 and 1.

Focusing only on restaurants in each cluster:

Cluster 0:

Cluster 1:

Cluster 2:

In cluster 2 below, Asian restaurants represent the first restaurant category (about 62%), followed by French (about 30%) and Italian.

4. Discussion

Famous recommended venues are mainly shops, hotels, cafés, bars and plazas. If we superimpose all the clusters on the same map (see below), we can see that right at the middle of Paris (i.e. on the neighbourhood cluster n°2 in light green) there is the lowest French restaurants density but the highest Asian restaurants.

The boroughs accessibility is not really an issue since the mass transit coverage appear to be rather good all over Paris. But regarding the boroughs, the security and environmental considerations are divisive.

There is a shop concentration in the most secure borough clusters. The shop density is rather high in these boroughs. Nevertheless, shops density in boroughs with less reputation appear to be rather medium.

Shops appear to be much concentrated around the Paris centre. The competition at the centre of Paris is then more important and especially for French, Italian and finally Asian specialties.

Regarding the restaurants, dominant categories are French, Italian and Asian. In Asian restaurant category I gathered all Asian specialties which are more diversified (Japanese, Chinese, etc.).

So, finding the restaurant best place depends on business owner preferences. Looking at the last Paris map, different options or strategies are possible. As examples:

A strategy could be to go into higher shop density neighbourhoods with aggressive prices trying to compete or with a not well represented restaurant specialties like may be Caribbean \ African or even Mexican.

Another way could be to develop a new restaurant concept in lower shop density neighbourhood (like right in the middle of Paris).

The 12th (Reuilly) and the 16th (Passy) Paris boroughs appear to be large enough with a rather medium shop density. So these neighbourhoods could represent good opportunities.

Finally, we have seen that in each neighbourhoods clusters there are plazas that could be used (if allowed by the town hall) for a food truck approach or a similar concept.

5. Conclusion

Our objective was to find the best place to open a restaurant in Paris. So first, we had to choose a set of parameters to define what a best place could be. As main parameters, we selected the general reputation (as a combination of security, the accessibility, quality of life and others) and the level of competition. Of course these are not all the relevant parameters, even if the latter should be among the first to be considered before going further.

Having the selected parameters in mind, we extracted data from web pages on internet (directly downloading dataset or web-scraping web pages) mainly about Paris itself, Paris boroughs notations and Paris neighbourhoods’ locations. After cleaning, we used the collected data to build clustering analyses with the KMeans algorithm as a Paris descriptive approach.

The analyses allowed to divide Paris boroughs according to the reputation and Paris neighbourhoods according to the shop density. The location data combined with the latter Paris subdivisions allowed to represent all of the clusters on a Paris map for visualisations.

Our results was to show how Paris could be divided and to draft some strategies for potential business owners according to the identified clusters. Globally, everything depends on the marketing mix the business owner wants to apply: he could be aggressive with prices in high density neighbourhoods, be a niche player targeting not enough represented specialties or try a cutting strategy to differentiate the offer.

However, this study is only the beginning, as there are a lot more parameters to define a best place and then to address the problematic. To continue the work, we could gather more information about shops in each neighbourhoods. We could also (with a Foursquare Paid account) collect more information about restaurants (tips, ratings and more) to be more specific about the strategy and obviously know more about potential shops clients and competitors. An important aspect that we didn’t mentioned is the Paris demography, as it is essential to know more about potential clients to work on marketing positioning.

But every study needs an ends for a new beginning. So, I thank you for your attention and hope I have given you valuable insights for your idea to come true.

References