12

I'm trying to visualize crimes based on if the crime happened during the day or night time. I've tried using the point displacement tool but I'm not satisfied with the results because the readability for certain scale levels is too low and the results also overlap:

enter image description here

So instead I followed Anita Graser's guide and tried using the point clustering-tool but I can't think of a way to separate day/night crimes without duplicating the layer and setting different offsets:

enter image description here

Ultimately I want to show the clusters including the exact amount of crimes separated by day and/night without having overlapping feature symbology. So I tried to accomplish this for one category by using the below expression but the results are not correct, the total count is not aggregating correctly:

CASE 
     WHEN "day_night" = "day" THEN @cluster_size
END

Using point cluster symbology in one layer, how can I re-write the expression above to correctly count the numbers of day/nigh crimes separately and visualize it without overlaps?

6
  • Why are you opposed to duplicating the layer? Would you be willing to use virtual layers?
    – csk
    Mar 14, 2018 at 16:53
  • I'm not opposed to duplicating the layer, that's how my latest work-around is set up. I'm opposed to having to do manual point displacement since duplicating them (one for day and one for night) = overlaps. But qgis could handle the point displacement for me if I could use day/night from one label?! Or I'm I missing something really basic here?
    – johlund
    Mar 14, 2018 at 23:32
  • Are you using the categorized renderer setting?
    – csk
    Mar 15, 2018 at 14:11
  • 2
    I just tested the categorized setting, and I see that it clumps all categories together into one cluster. That seems like a flaw in the tool. It would be nice to at least have the option of separate clusters for different categories.
    – csk
    Mar 15, 2018 at 14:20
  • 2
    I'm pretty good with expressions, and the difficulty I see is this: Where do you put an expression to create separate clusters in one layer. I would need to know more about the internal workings of the point cluster renderer to even know where to start. I would suggest that you contact North Road (info at north-road dot com), since they're the ones who developed this feature in QGIS.
    – csk
    Mar 19, 2018 at 20:20

1 Answer 1

2

You could try using diagrams:

enter image description here

or:

enter image description here

For more details check the QGIS Docs | Diagrams Properties.

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.