[GIS] How to visualize this country data in Qgis

qgis

I have a csv table, with data in this format: "name","country". Country code is in the same format as the world map SHP file attribute table (both are in the ISO standard). I learned how to join the tables together, but I want to colorize countries based on how many people are from each country.

Example:

  • "john","LVA"
  • "peter","OMN"
  • "martin","PRI"
  • "janis","LVA"

In this case Latvia should be darker than the two other countries (because two people are from LVA). I know how to colorize things based on a number that's bigger than other numbers, but how to achieve it without the numbers in the table? I only have raw list of names. Is this possible with Qgis only?

Best Answer

You should not join tables together: it will cause multiplication of the same geometries (countries). Add a column to the .shp with countries and store number of people there. (But it seems that you should count numbers of people in other software - I don't see 'count' option in field calculator.) Then colourise your map using this field.

If the table with names and nationalities is constantly updated, then you should think about using spatial database for dynamical update of your map. You may store there table with countries and table with names and use view (that will count people and join this number with countries) to produce your map layer.

Related Question