Capstone Project - The Battle of Neighborhoods
1
A
description of the problem and a discussion of the background
We are planning to build a luxury
hotel in Barcelona, and we want to know which neighbourhood is the best.
Barcelona was the 20th-most-visited
city in the world by international visitors and the fifth most visited city in
Europe after London, Paris, Istanbul and Rome, with 5.5 million
international visitors in 2011. By 2015, both Prague and Milan had more
international visitors. With its Rambles, Barcelona is ranked the
most popular city to visit in Spain.
Barcelona as internationally renowned a tourist
destination, with numerous recreational areas, one of the best beaches in the
world, mild and warm climate, historical monuments, including eight
UNESCO World Heritage Sites, and developed tourist infrastructure.
Barcelona is divided into 10
districts. These are administrated by a councillor designated by the main city
council, and each of them have some powers relating to issues such as urbanism
or infrastructure in their area. The current division of the city into
different districts was approved in 1984. In 2009, in Barcelona started using a
new division of 73 neighbourhoods (the 10 districts are still in use), a
division that was done for a better service from the City Council.
Some of these districts have a
previous history as independent municipalities which were integrated into the
city of Barcelona during the late 19th century and the first half of the 20th
century, such as Sarrià, Les Corts, Sant Andreu de Palomar, Gràcia or Sant
Martí de Provençals. However, other municipalities which are contiguous to
Barcelona (such as L'Hospitalet de Llobregat, Badalona, Sant Adrià de Besòs or
Montcada i Reixac) have remained separate towns to this day and are part of the
much larger metropolitan area of Barcelona.
We want to use an index of the
family income (RFD) and the quantity of the hotels by neighbourhood to create
clusters and see which one fits better with our goal.
2
A
description of the data and how it will be used to solve the problem.
For this project we are going to use
different datasets:
·
Barcelona’s
last published income index by Neighbourhood (2017)
o
Description:
RFD (Renta Familiar Disponible per cápita) is the amount of income available to
resident families for consumption and savings, once the depreciation or
consumption of fixed capital in family economic operations and direct taxes and
contributions paid to Social Security have been deducted. Eurostat recommends
the use of the RFD as the main regional economic aggregate.
·
Barcelona
Hotels Foursquare
o
Source:
Foursquare API
o
Description:
Using the Foursquare API we’ll get all the hotels in Barcelona.
·
Barcelona
Hotels Open Data
o
Description:
We’ve looked for another hotel’s source because we felt Foursquare API wasn’t
complete enough. This data set includes an accurate description of every hotel
in the city
3
Methodology
For this
project we’ve use Open Data sources to know the family incomes by neighbourhood
in Barcelona and for having a complete hotel’s list (to compare with Foursquare
API) and the Foursquare API to find the hotels in Barcelona city.
We have
done three different clusters to approach
3.1 Data Preparation
There is a Open
Data Project in Barcelona so we use it to find the list of Barcelona Neighbourhood’s
with its Name, Code, District, Population and incomes (RFD).
After some
manipulation the first 5 rows are like this.
This data
set doesn’t have the coordinates so we used Nominatim to Geocode the Neighbourhoods.
For the
Hotels List we used two Data sources to compare. Here there is the preparation
of the open data list.
After some
manipulation we’ll have a new data frame with the hotels amount by
neighbourhood.
3.2 Using Foursquare API
We have to
use Foursquare because it’s a Project requirement so we prepared the Request with
the required data.
Afther some
manipulation, the result is:
3.3 Clustering
We have
used three different approaches for clustering. All with kmean function but
with different data
- With
RFD Index, Population and Coordinates
- With
RFD Index and Coordinates
- With
RFD and the number of hotels
3.4 Data visualization
Barcelona
with the 73 neighbourhoods
First
Cluster
Second
Cluster
Third
cluster
4
Results
After some
analysis we have found that the third cluster is the best who fits with our
proposal, because it offers us a list of neighbourhoods with high income index
and a low number of hotels.
There is
the list of neighbourhoods that are in the Cluster number 3
5
Discussion
There is a
list of observations for a future research:
- Postal
codes are not very useful in Spain because you can’t link it with the neighbourhoods.
- Foursquare
API is not very useful in Spain because it hasn’t the venues with the required accuracy.
6
Conclusion
This was a Capstone
Project so the risk of a bad interpretation is low compared with the required
investment to build a luxury hotel in Barcelona.
We would avoid
the use of the Foursquare API for a professional job if there is another data
source available.
Comentarios
Publicar un comentario