Thursday, July 11, 2024

Plotting Proportional Symbol/Points Size Map in QGIS - Case study of African Teams With The Highest AFCON Medals In History

 Let look at the top 10 African countries with the highest AFCON medals and use Proportional Symbol Map to visualize them.

For this mapping task, we need the map of African and the medals table as seen below.



The updated table as the time of writing (i.e. after the 2023 AFCON) is as follow;-




Steps

(1) Get the vector map of Africa and link it to the medals table. The newer versions QGIS comes with the world map as seen above, you can extract the map of Africa from there. Use the join attribute to link the map attribute to the medal table.


(2) Create a point layer using the Centroids algorithm function. This algorithm creates a new point layer, with points representing the centroid of the geometries in an input layer. The attributes associated to each point in the output layer are the same ones associated to the original features.


(3) The centroid point layer should have the linked medals table from step1 above. If not, you can make the join at this point. There are ten (10) on the medals table, so our focus should be on those 10 countries.

(4) There are two ways to make the  "Proportional Point Symbol" map in QGIS. The first is to use "Single Symbol" under 'Symbology'. The second method is to use "Graduated" under 'Symbology'.

The difference is in creating a 'Data-defined Size Legend' as a 'Collapsed Legend'. While it seamlessly worked when you used "Single Symbol", it doesn't work when you used "Graduated". Lets take a look at each method one after the other:-

Using Single Symbol

From the point layer Symbology tab, select "Single Symbol" and set the "Size" using 'Assistant...' 


Inside the  'Assistant...' dialog window, select the attribute field to be used for the 'Proportional Point Symbol' under the Input section and then set other Output section as seen below. The preview will be displayed on the right-hand side. Also this will enable you set 'Data-defined Size Legend' as a 'Collapsed Legend' from the "Advanced" button.




Now we can have a legend image that looks like the one below:-



Using Graduated

With this method, from the point layer Symbology tab, select "Graduated" and set the "Method" to 'Size' as seen below.


This will create the promotional points symbols, though you won't be able to set "Data-defined Size Legend" to 'Collapsed Legend". 

With this method, the legend image will look like the one below:-



That is it!