Understanding the city to make it smart