I am having a problem calculating the percentage of certain raster values inside buffers.
I have 1 raster layer with pixel values and 1 vector layer with 40 points. The 40 points are people living in a certain city. All the 40 people are divided over 4 cities, meaning some points are overlapping.
I want to calculate the percentage of each value of the total count in each buffer.
I tried to add field called percentage than use the formula: (100*count)/totalcount, but sadly enough the field calculation failed. How should I do this? I tried also to dissolve all the buffers on their city location but i think i don't want this because it gives me 4 buffers with information only including city name.
The attribute tables on the left from the 20kmbuffer.shp and right the raster values inside those buffers. I already added two fields called percentage (for the total percentage of the values within all the buffers and the field Buffer percentage for the percentage for each value in each buffer.