Asian restaurant location recommendation in the city of Nur-Sultan

Bekarys
Bekarys
Dec 30, 2020 · 6 min read

Link to the source code on GitHub

Introduction

Nur-Sultan is the capital city of Kazakhstan and one of the most developed cities of the country that attracts lots of tourists and businesses. Currently, the number of restaurants offering a variety of cuisines is increasing significantly throughout the city. In this project, the recommendation on where to open a restaurant will be given taking as an example a case of an Asian cuisine restaurant in Nur-Sultan. However, the process can be repeated for any other type of restaurant in any city.

Business problem

Some of the restaurants are being closed due to a bad choice of location or the lack of initial research. The location of a restaurant has a significant impact on the revenue, thus the analysis of the currently open restaurants in terms of the frequency, locations, distance to other restaurants, etc. is important. In this project, the number of possible locations within the city will be offered in terms of the vicinity to other restaurants.

Data

In this project, the locational data of different venues and candidate locations around the Nur-Sultan city will be used. First, the latitude and longitude range of Nur-Sultan city was identified which ranges from 51.07 to 51.22 and 71.37 to 71.54, respectively. Then, evenly spaced locations around the city center were generated in the identified range. The final rectangular grid that covers most of the city is shown in Fig. 1.

Image for post
Image for post
Figure 1. The rectangular grid of evenly spaced 270 locations around the city

Using the Foursquare API all venues around these 270 locations were identified. The data such as restaurant name, longitude, latitude and category were obtained from the Foursquare API and used for analysis. This data will be cleaned and each candidate location will be analyzed based on the following properties:

  • The number of other restaurants within a radius of 400 meters
  • The number of Asian restaurants within a radius of 400 meters

Data cleaning

Since the locational coordinates overlap, there were some duplicate venues, which were dropped. After dropping duplicate venues, we have 865 unique venues, but it includes all types of venues such as cinemas, supermarkets, concert halls, etc. However, we are interested only in restaurants, so only restaurants were sorted out from the dataframe and other nonrelated venue categories were dropped. Finally, our dataframe contains 442 restaurants, and depicted in Fig. 2.

Image for post
Image for post
Figure 2. The final dataframe containing information about all restaurants

Methodology

After all the data about the venues were gathered from Foursquare API and cleaned, they were visualized on a map using Folium library. Our main aim for this project was to recommend locations in the city that are popular among tourists but do not have Asian restaurants nearby. So, places that have more than two restaurants and do not have Asian restaurants at 400 m radius were identified.

In order to find such places, we separated Asian and non-Asian restaurants. All categories that are related to Asian were separated, these categories are Asian restaurants, Chinese restaurants, Japanese restaurants and Sushi restaurants. The location of a Sushi or Japanese restaurant near to our Asian restaurant might create competition and results in a reduced profit, thus they were included in the Asian restaurants category. In addition, for exploring their density and spread around the city frequency plots were generated, the percentage of Asian restaurants was calculated and heatmaps were visualized.

By analyzing each area and density of restaurants, several places that satisfy our two conditions (>2 restaurants and no Asian restaurants at 400 m) were identified. Using k-mean clustering those locations will be grouped into k general areas that our stakeholders might consider for opening there Asian restaurant.

Results

First, the frequency of each category was visualized using a bar chart in order to see how popular Asian restaurants are in the city. The resultant plot is shown in Fig. 3. All Asian and non-Asian restaurants were separated, and general statistical information was calculated. In general, 442 food venues were returned by the Foursquare API in the defined area, 52 (11.76%) of which are Asian restaurants.

Image for post
Image for post
Figure 3. Frequency of each food venue categories

To observe the distribution of restaurants across the city, the restaurants were visualized on a Nur-Sultan map. First plot on Fig. 4 shows each restaurant on a map by indicating Asian restaurants as a blue circle and other restaurants as a red circle. Fig 5 (a) shows a heatmap of all restaurants, whereas Fig 5 (b) show a heatmap of only Asian restaurants.

For further identification of potential locations, for each 270 potential locations number of restaurants in the radius of 400 meters and distance to the closest Asian restaurant was calculated. Of those 270 locations 33 have more than two restaurants and 257 have no Asian restaurants at the radius of 400 m. 22 locations satisfy both conditions. Then by visually observing all of these locations they were clustered into 5 locations. This was done in order to suggest a general area that is suitable for restaurant location, since 22 locations are mostly clustered in several areas.

Figure 4. Map of Nur-Sultan showing Asian (blue) and non-Asian (red) restaurants
Image for post
Image for post
Figure 5. Heatmap of all (a) and Asian (b) restaurants

Discussion

From Fig 3. it can be observed that Asian is the most popular cuisine in the city and widely spread around the city and present in almost all regions of the city. Also, from the heatmap of the restaurants (Fig. 5 (a)), restaurants are mostly located near Baiterek monument, near Presidential Park, EXPO and Naberezhnaya street. Asian restaurants are also present in all these locations, but by observing closely, pockets with no Asian restaurants nearby can be found.

Image for post
Image for post
Figure 6. Suitable locations (shown as blue dots) and 5 clusters shown on top of a heatmap of the restaurants

By observing the recommended locations and cluster centers, all cluster centers are located in places that have high restaurant density and are popular among tourists. For instance, the location near Nazarbayev University is close to offices and a shopping mall. Another one near Presidential Park has good food traffic and popular among tourists. Other three locations along K. Muhammedzhanova street, along Respublika prospect and at K. Satbayeva street have many living blocks nearby. As a resident of Nur-Sultan city, I can assure that all these locations are good for the potential Asian restaurant location. However, the purpose of this analysis was to suggest possible locations that do not have Asian restaurants nearby and have other restaurants near. These locations should only be considered only as a starting point for more detailed analysis which could eventually result in a location that has not only less competition, but also other factors taken into account.

Conclusion

In this project, places that have good food traffic, but do not have Asian restaurants at a distance of 400 meters were suggested for the stakeholders for narrowing down the search of optimal locations for an Asian restaurant. By generating the grid of possible locations, a list of all venues nearby was obtained. By cleaning the data, analyzing and visualizing it, potential locations that satisfy our conditions on the number of non-Asian and Asian restaurants were identified. Then these locations were clustered into major areas to be used by a stakeholder as a starting point for further analysis. The stakeholders might further analyze these areas in terms of closeness to other venues (parks, trading houses), accessibility, socio-economic situations of the area and more.

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data…

Sign up for Analytics Vidhya News Bytes

By Analytics Vidhya

Latest news from Analytics Vidhya on our Hackathons and some of our best articles! Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Bekarys

Written by

Bekarys

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Bekarys

Written by

Bekarys

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store