The Battle of Neighborhood-Chicago

Joseph
4 min readFeb 11, 2021

Capstone Project — The Battle of Neighborhoods

Chicago

Chicago is the third largest city in population in the United States after New York City and Los Angeles with an estimated population of 2.7 million in 2019. Chicago is also one of the US’s most densely populated major cities. It is tourist attraction city and a transportation hub. Moreover, Chicago has a large and ethnically diverse communities.

The city of Chicago is divided into 77 communities for statistical and planning purposes. Each community has a wide variety of ethnically groups. Moreover, each community contains a lot of diversified flavors of shops and restaurants.

Chicago 77 Communities

Problem

If an investor wants to open an American Casual Dining restaurant in one of Chicago communities, which is the best location for a such kind of restaurant?

Restaurant location should be in a place with high traffic of people and low competition from similar kind of restaurants. Also, car parking should be available nearby the restaurant.

Chicago is a big city and choosing the restaurant location will take a lot of time and effort. However, dividing the city into communities and clusters will give investors a better picture on where to open the restaurant. Moreover, after analyzing city clusters, investors can have a good idea what type of investment is suitable in each city cluster.

Data

The list of communities is taken from the following Wikipedia page.

https://en.wikipedia.org/wiki/Community_areas_in_Chicago

The communities’ coordinates are taken from MapQuest https://www.mapquest.com/ through geocoder of GPS visualizer website https://www.gpsvisualizer.com/geocoder/.

Coordinates data were stored in a csv file. Pandas data frame were created to store the data.

Then, FourSquare API utilized via the Request library to get the venues details of each community.

Methodology

Chicago communities list is taken from Wikipedia page. Beautiful soup is used to scrape the web page. Then, HTML data is converted to Pandas data frame.

The communities’ coordinates are taken from MapQuest https://www.mapquest.com/ through geocoder of GPS visualizer website https://www.gpsvisualizer.com/geocoder/.

I created a MapQuest developer account. Then, I created a MapQuest AppKey. I used the key to get the communities coordinates through GPS visualizer website as shown in the below image.

GPS Visualizer Website

The data extracted from GPS visualizer website were stored in a csv file. Pandas data frame was created to store the data. Then, Chicago map was created to show the location of the 77 communities plus the population of each community as shown in the below image.

Chicago Map

FourSquare API utilized via the Request library to get the top 200 venues details of each community within a radius of 700 meters. Venues by community were grouped by taking the mean of the frequency of occurrence of each category of venues retrieved from FourSquare. Pandas Data frame created to display the most common venues of each community.

Most Common Venues for Each Community

K-Means Clustering

K-means clustering is unsupervised machine learning algorithms which I used to cluster communities into 5 clusters. K-means will create clusters that have similarities in the most common venues.

Chicago Communities Clusters

Results

After clustering the communities into 5 clusters, we got the following details for each cluster:

  • Most of the communities fall in one cluster (Cluster 0), which have restaurants, bars and cafes as the most common venues.
  • Cluster 1 most common venues are Parks and beaches.
  • Cluster 2 has only one community with has a variety of common venues.
  • Cluster 3 most common venues are are parks and restaurants
  • - Cluster 4 most common venues are fast food restaurants.

Discussion

After analyzing each cluster and its most common venues, I found that Oakland community in cluster 1 is good place to open an American Casual Dining restaurant. Oakland population is 6645. It has a lot of tourist attraction places such as parks and beaches, so the traffic of people is very high. Also, very few Casual Dining restaurants are located nearby attraction places. Car parking will not be a problem especially in the south of Oakland.

Oakland

Moreover, Oakland is north of Kenwood community. Kenwood has a population of 17189. Also, there is few Casual Dining restaurants in Kenwood.

Kenwood

In conclusion, I find that the best place for the American Casual Dining restaurant is between south of Oakland community and north of Kenwood community, because of high traffic and availability of car parking. Moreover, opening a restaurant in this location will serve both communities of Oakland and Kenwood and will be in a good spot for tourists.

Here is a link to the Project files in Github

https://github.com/j20161437/Chicago-Neighborhoods-Capstone

References

https://en.wikipedia.org/wiki/Community_areas_in_Chicago

https://foursquare.com/

https://www.mapquest.com/

--

--