[GIS] Showing categories in QGIS

labelingqgisstyle

I have a .csv file pointing at coordinates. It is a large file that is edited often.

In it, I have three groups of data (say A, B, and C).

Within each group there are a number of Names, and each name has ten sets of coordinates. I would like to keep all of this data in one spreadsheet.

How can I set the categorization in QGIS to show each Name with it's own colour from only Group A?

I hope to create three layers, one for each group, all pointing to the same .csv file.

I think I need to do this in the Expression dialog box but can't seem to work it out.

For example:

NAME,GROUP,Easting,Northing
Orange,A,,
Orange,A,,
Orange,A,,
Orange,A,,
Orange,A,,
Orange,A,,
Red,B,,
Red,B,,
Red,B,,
Red,B,,
Blue,C,,
Blue,C,,
Blue,C,,
Blue,C,,
Blue,C,,
Blue,C,,
Blue,C,,
Blue,C,,
Green,B,,
Green,B,,
Green,B,,
Green,B,,
Green,B,,
Green,B,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,
Violet,C,,

Best Answer

I think Joseph's answer is very helpful but that it does not meet all of your hopes.

You wrote in your question:

I hope to create three layers, one for each group, all pointing to the same .csv file.

So this is the way you can do that:

Add your csv data to QGIS 3 times - Rename each layer according to GROUP

Set appropriate filter to your layers - iterate steps 1 and 2 for all layers with different GROUP argument.

  1. Right click on layer name choose Filter

    enter image description here

  2. Filter your layer to a subset by GROUP

    enter image description here

  3. Create rule based style for first layer, for each NAME (detailed steps in Joseph's answer)

    enter image description here

  4. Copy - paste style over the rest of layers

    enter image description here

Save your work as QGIS project file so as you'll save the reference to .csv and layers subsets and styling. So there will be no problem after updates in csv file.

Related Question