Hi all!
I have a question regarding calculating estimates using hundreds (sometimes thousands) of lines of data. Here is what I'm trying to do.
I want to gather the weighted average of biomass in mexico. I have a data table that is formed through spatial data (so each line of data is from a different pixel - or combination of pixels because many pixels have the same data information). Each pixel/data line has the following information: pixel #, region, pixel count, forest area, forest biomass. What O did was: create a pivot table to get the sum of the pixels in each region (there are 150). the next part is the part where i'm lost.
I want to know the percentage of data within each country region (because what I want to do is to get the weighted average of biomass in each country). So, what I did was create a column with this calculation: [=B4/($L$4)]. Where B4, is the number of pixels, L4 is the total number of pixels in region (calculated by creating the pivot table). the problem is, because there are 150 regions, i'm inputting this in manually - I change the calculation based on the region. I've actually gotten pretty fast, but I worry about errors because I do this manually.
I'm not sure if I explained it well or clearly enough, but if someone has any thoughts or advice I would greatly appreciate it. I need to quite a few of these calculations so having a more systematic approach would be very helpful.
Thanks!
Bookmarks