Where houses sell for less: A battle between Milan neighbourhoods
By: Cristiano Insola
Tags: Milan, Data Science, Housing, Cluster Analysis, Data Visualization

The Metropolitan City of Milan is the leading Italian city in the industrial sector and the real economic power of Italy.

Famous for fashion and design, with more than one million people, it’s one of the most populous cities and the second most visited city in Italy, second only to Rome.

I collected more than 3k places in Milan to discover a pattern between what a neighbourhood makes available and its house selling price. Our goal is to find the best neighbourhood in the city depending on one or more requirements.

For example:

What is the neighbourhood with more shops?

What is the quieter neighbourhood?

Where do I eat better?

Where houses sell for less?

Where do I find the most nightlife?

Where is the best place to open a new B&B?

In 2019 Milan confirmed itself as the third most expensive city in Italy and today it is the most European city in Italy. This is for sure because of the public administration investments in neighborhoods transformation and international advertising related to events of all kinds.

However, as you can imagine, not every neighborhood is equal. Until 1999 Milan was divided into 20 areas, which now are only 9 (“Municipio”). As you can see from the map below, every area contains many neighborhoods with their own different culture.

People in Milan live their own life spending their times in multiple activities all around the city. We are going to classify every neighborhood based on which activities are preponderant in every area. We will compare their peculiarities to house prices and construction or restorations activities in order to provide a model for all the people who want to move in Milan or who want to better know the differences between Milan neighborhoods.

Objective and limitations of the discussion

In this article we will:

Show you some insights about the city in general Display some choropleth maps which will help you visually understand how we have clustered every neighborhood

Because there are more than 80 neighborhoods, we won’t go into many details about a specific one. If you want to go deeper I have provided the access to the project repository where you can find all the details you need.

Data sources

For this research we decided to start from the data provided by the data archive of Milan.

Number of venues analyzed per neighborhood

We obtained the NIL map of Milan (in Italy a NIL map is the local identity map area) representing areas we can identify as neighborhoods.

This classification was introduced by the Milan PTG (plan of government of the territory) as a collection of scopes linked together by infrastructures and services.

They are the 88 places of urban vitality we are interested in. This data is granular enough to be used in our investigation. Anyway, as you will see, the information we found differs a lot from a neighborhood to the next one causing some error in our analysis.

You can find the entire database here: https://dati.comune.milano.it/dataset/ds61_infogeo_nil_localizzazione_

Starting from this data we have aggregated many other sources:

List of practices presented for construction activities — we used this data to understand which area is undergoing major transformations (https://dati.comune.milano.it/dataset/ds676_pratiche_edilizie_online_sportello_unico_per_ledilizia) List of bus stops — we used this data to understand infrastructure connections inside the city (https://dati.comune.milano.it/dataset/ds528_trasporto-pubblico-locale-entro-i-confini-comunali-2008-2013) A List of venues and commercial activities we obtained from Foursquare API — we used this data to better understand social interactions inside every neighborhood. This dataset consists on more than 3k venues. House prices and rent costs — we web-scraped this information from https://www.immobiliare.it/mercato-immobiliare/lombardia/milano/. We used this data as an indicator of perceived quality.

Building sites and restoration sites in Milan: as you can see the north east of the city is the most growing.

Methodology

As I wrote before, I started from the neighborhoods maps of Milan. I started looking for the surface of every neighborhood to have a better idea of the size of every neighborhood.

The first thing I decided to do is showing the transport density for every neighborhood. As expected the city center is the one with more links. Bigger neighborhoods suffer the lack of bus stops: they usually are placed on the periphery of the city, mainly covered by parks and gardens.

I decided to represent the interesting findings with a choropleth map to help me and you better visualize the data.

City center have more bus stops but the east side of the city have more links in proportion than other peripheral neighborhood

I used the information I gained as the input for a clustering algorithm (K-means) to find a pattern between different neighborhood. My objective was to classify every neighborhood for the predominance of the activities on its surface. To do that I looked for the top five most common venues for every neighborhoods and that I clustered the information in some labelled neighborhood groups.

I decided to have at least five clusters groups (cultural activities, shopping activities, restaurant, sport centers, spare time preferences). Every group is split in a different number of clusters I found using the elbow method.

Every cluster has a different house price trend and benefits of a different city transformation scenario. What I noted is that:

Restaurants clustering suffers for the magnitude of Italian or Pizza restaurants: we found only four clusters and all of them have Italian or Pizza as main category. I dropped al the Healthcare clustering information I found because of the lack of data. Foursquare API returned, for example, only 8 pharmacies as a sample: I couldn’t use this data. As you can see in the Data Cleaning section, it was very hard to split categories inside the Spare Time macro category. Some categorizations are quite equivocal but I to leave the results visible despite some doubts.

After this consideration it is interesting to see the regression plot between every category.

Please note the amount of venues compared to the sell price of the neighborhood. As you can see restaurants, food place, nightlife, sport and health and care venues are more democratic than shopping and culture venues where the maximum amount of venues is located where houses sell for more.