I have metropolitan areas and I want to calculate average values (GDP, Population, etc) per year. I have another layer with NUTS areas with theses values, from 1970 to 2012.

So far, I know the operation "join attributes by location" to calculate for example the average of GDP per inhabitant or the sum of the population, but I have to repeat the operation for each year.

Is there a way to do it automatically ? Or even better, to get the percentage of the area for each NUTS polygon layer ? Like metropolitan area MA1 is 40% NUTS N1, 55% N2 and 5% N3, so I would be able to calculate the averages and the sums.

I am a beginner with QGIS. I apologize if the question has been already answered, I have not found anything so far about that.

1 Answer 1


For a beginner I would suggest that you first try to find a solution through the normal GUI. I would break it down in the following steps to be repeated for each time slice:

  1. you need to split overlapping polygons
  2. update attribute values based on polygon overlap
  3. Calculate areas of new polygons and calculate percentage of the original main polygon.
  4. repeat.

Look here and here for some info on how to do the first two steps. Here you can find more info on the field calculator for step 3. Once you have the workflow down, you're ready to start automating, e.g. using the Python console which probably has the lowest learning curve. To get started with that see the PyQGIS Dev Cookbook

  • Thank you Vincent ! I will check the links you provided. I definitely need to automatize the process because it's 42 years and 6 variables, so 252 iterations !
    – Franperr
    Aug 18, 2017 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.