I'm trying to create a labeled heat-map of incidents. Currently, I can label every town in the state -- which clutters up my map -- or I can have no labels at all. My boss would like me to instead label only the towns where we have an incident recorded. I've been trying to puzzle out a solution using conditional labeling, but I'm not very familiar with programming. I'm wondering if this is a) possible at all and b) if possible, how would I tell QGIS to only display the labels of certain towns?
You can do this easily in QGIS, what you need to do is use Rule-Based Labeling.
In the filter you can simply list down the cities you want to label (Not the best way) or you can use an attribute to identify the cities where an incident was reported and label them.
Select the town layer in your project. Turn on editing mode, add a text column to the attribute table called "Incident?" Now select all the towns you want labeled, and change the value in "Incident?" to 'yes'
Set up rule-based labeling on your Towns layer using this as the filter:
"Incident?" = 'yes'