ConcelhosXXI – Administrative redistricting in Portugal

Discussion about administrative reform on a municipality level in Portugal has been over the past few years an active and taboo topic. Since Portugal joined EU in 1986 during the following decades the country has become more and more heterogeneous, the differences between the inland part of the country with the coastal areas has increased tremendously. Nowadays we can see municipalities in the mainland part with as many residents as a neighborhood from a municipality in the coastal area. One of the main effect of this situation is the total number of public workers in the country, specifically those working for municipalities, for the total resident population differs a lot between municipalities. Also the efficiency of how the resources are to be shared from central government to local authorities is affected has current municipal snapshots differs a lot between neighbor municipalities. The theoretical discussion about the administrative reform focus on the territorial reorganization, namely the aggregation of municipalities as an outcome. In a country like Portugal where country boundary as well internal administrative boundaries rarely change, this discussion is a very sensitive one and political effects are to be taken into account when presenting it to general population. Like in many countries in the world, where redistricting is performed on a regular basis to accommodate demographic changes in a given territory, the objective of this work is to give a clue on how Portuguese municipalities boundaries would be in a near future. The developed application is based on some rules in order to perform municipalities aggregation and all data is based on the last national census in 2011 and the official 2014 administrative boundaries data (CAOP). In order to reduce complexity to the model these where the rules defined:

Aggregation rules:

  • Municipalities should belong to the same parent administrative level (same district)
  • Municipalities to aggregate should be neighbors (touching frontiers)
  • Municipalities should not have a higher resident population than defined input parameter (param1)
  • Municipalities should not have a higher total area than defined input parameter (param2)
  • Municipalities should not have a higher percentage of resident municipality working population than defined input parameter (param3 – disabled)*

*This param was disabled for testing reasons.

Technical Specs:

A small Python application was built for this task, with GeoAlchemy and PostGIS as core libraries and wsgiservice as REST interface.


PopulationArea (km2)Total municipalities% Present

In the first row of the above table we used country wide median values to derive the input params (test1). On the other test (test2 and test3) examples we increased population and area numbers, with interesting results. The current total number of municipalities in Portugal is 308 and the last column gives an highlight on how much aggregation each test achieved according to the current total number of municipalities.

Below you can visualize on the map the changes occured with the previous tests. Maybe this is a glimpse of Portugal on a near future? Perhaps…

Click here to enlarge the map

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>