Testing the theory that 'the closer to the station the worse the food tastes' at a kebab shop



In tourist areas and downtown areas, restaurants are concentrated in convenient locations near train stations, but it is often said that '

restaurants near train stations are bad .' Programmer James Pei , who was curious to see if this was true, conducted his own investigation.

'The closer to the train station, the worse the kebab' - A 'Study' - James Pae
https://www.jmspae.se/write-ups/kebabs-train-stations/

Pei came across a thread posted on the French version of Reddit titled ' Can anyone prove that the closer you are to the station, the worse the kebab tastes? ' This thread attracted a lot of attention, and many people agreed with the hypothesis that 'the closer you are to the station, the worse the kebab tastes' based on their own experiences, but some criticized it.

Pei, who had just quit his job due to burnout, used his spare time to test the hypothesis that the closer to the station the worse the kebab tastes. Pei tested his hypothesis in Paris, France, and gave the following two reasons for this.

1. The original author of the hypothesis posted it in French.
2. Paris has multiple train and metro stations and countless kebab places.

First, Pay downloaded geospatial data from OpenStreetMap , an open source map data site, and then used OSMnx, a Python package that can model, project, visualize and analyze real-world road networks and other geospatial shapes, to download the navigation network. Since public transportation is the norm in France, Pay thought it would make sense to focus on areas within walking distance.



Stations in Paris are marked with an airplane icon.



Next, they used Google's '

Places API ' to determine which restaurants served delicious kebabs and which restaurants served bad kebabs, referring to reviews of kebab shops. There was also an idea to use Yelp reviews instead of Google, but Yelp's API was horribly expensive. There was also the option of using a scraper, but Pei explained that 'I didn't feel like building a scraper.' However, even if they used the Places API, there were several problems, such as no way to search within polygons and the library's autocomplete not working.

Nevertheless, they used the Places API to retrieve information on kebab restaurants in Paris. At first, 322 results were displayed, but when they actually searched for 'kebab' on Google Maps, many more kebab restaurants were displayed. So they implemented paging and succeeded in retrieving information on 400 kebab restaurants.



Next, the distance information between the kebab shop and the nearest station was obtained. Since searching this information one by one would take too much time, Pei used

GeoPandas , an open source project that makes it easy to manipulate geospatial data in Python, to obtain the distance information.

Using these data, the following figure summarizes the 'distance between the kebab shop and the nearest station' (horizontal axis) and 'reviews on Google Maps' (vertical axis). Pei pointed out that there is a positive correlation because the Pearson product moment correlation coefficient is very high at '0.091'.



Next, the results of removing the outliers from the data are as follows. The correlation coefficient increases to 0.098, but there is still very little correlation.



Furthermore, the data excluding subway stations is as follows. The correlation coefficient is '0.001'.



In response to these results, Pei wrote, 'While there are small indications that the hypothesis may be correct, the correlations are simply too weak.' 'Interestingly, there seem to be several good kebab shops near Paris train stations.'

In addition, Mr. Pei asks himself, 'Are Google Maps reviews appropriate as an objective indicator of the deliciousness of kebabs?' In the first place, Google Maps reviews are based on the user's subjective evaluation, and are influenced by various factors such as not only the quality of the food but also the attitude of the staff and the cleanliness of the store, so 'If I have time, I would like to publish a more advanced version of this survey.'

'I hope to receive a Nobel Peace Prize for my research and some job offers,' Pei wrote.

in Note, Posted by logu_ii