The Energy Cocoon

This analysis is part of a larger project envisioning a new energy policy for the city of Barcelona. In order to understand the energy consumption behaviors and patterns in the city, an extensive data analysis and research was carried out. This allowed us to identify areas of risk in comparison to income and building ages.

In Barcelona, roughly 10% of the 1.6 million inhabitants live under conditions of energy poverty. These people are cold at home, unable to cook food or use their oven.

Map Barcelona average income per household

 Map Barcelona, Eixample 4% households energy risk

Meanwhile, About 50% of energy is wasted due to lack of insulation and low building energy efficiency. Because 71% of buildings are older than 50 years.

Map Barcelona building age

Map Barcelona energy consumption

Comparing heating consumption to building age

This graph shows how energy consumption clearly varies between different building ages across Eixample.

The line in blue shows how the energy consumption can drastically reduce after applying building improvements and saving measures.

Chart energy consumption by building age (before/after savings)

Building Energy Consumption in L´Eixample

Map Barcelona, Eixample consumption per community

Building Energy Savings in L´Eixample

Map Barcelona, Eixample Average energy savings

Building Investment for Energy Savings in L´Eixample

Map Barcelona, Exiample average investment per community

Data Source and Processing

Source code:

Data Source:


It included a small internal library to abstract Matplotlib functions (source code: drawers) and the code to generate data visualizations.

It’s based on 3 main libraries:


The Energy Cocoon: Barcelona Energy Analysis is a project of IAAC, Institute for Advanced Architecture of Catalonia developed at Master in City & Technology in 2020/21 by student:  Alvaro Cerezo Carrizo, Tugdual Sarazin, Inigo Esteban, Leyla Saadi, Mario Jose  Gonzalez and faculty: Diego Pajarito.