5

I am relatively new to QGIS.

I am looking at the percentage of an population that has geographical access to healthcare. Therefore I have one shapefile with village boundaries including population number of each village. Another shapefile is all Healthcare facilities in the area buffered with 5km zones. I now want to calculate the percentage of the village area that is covered by the Healthcare facility buffers and multiply this by the my population numbers.

I did manage to create an intersect shapefile of the two formal shapefiles that created correct new polygons of intersection per village. I now, however, do not know how to sum the areas (Area_1) of all these buffer polygons which are coded equally in the attributable table (under P_06_ID) and divide this by the total village area (AREA). And then multiply this number by the population (Population).

enter image description here

enter image description here


The command does indeed calculate the percentage of the population that overlaps with that specific polygon. However it still does not sum the different polygons.

output after command

So what I now want to do is to sum those numbers with the same parish ID automatically (I do have around 500 parishes). So in this example sum PopPerc from cell 699- 709.

Any suggestions?

1 Answer 1

4

I believe you would have to create a new column and input the command to calculate what you are wanting. You could try the following:

case when "DNAME_2006" IN ('MASINDI') THEN ("Area_1" / "AREA") * "Population" END

enter image description here

UPDATE:

Unfortunately, I don't think you can do a simple SUM using the Field Calculator. However, there are a couple of other methods you could use (which are practically the same):

  • Vector > Analysis Tools > Basic statistics

First open the attribute table, select whatever fields you want calculated and open the Basic statistics function. Select your layer, check the Use only selected features option and set the target field (in your case, "PopPerc"). Click OK and you will get the statistics including the SUM value.

Basic statistics

  • Install the Statist plugin

This is very similar to the above method except now you can toggle between windows which you couldn't do with the above method (you had to close the Basic statistics function to change the selected fields). Personally I prefer this method because of the fact that you can quickly toggle, select various fields and run it immediately. The same setup applies here with selecting the layers, fields etc.

Statist plugin

And you can get pretty graphs!

0

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.