# How do I calculate and map an area-weighted average in ArcView 3.2?

Once you have your data ready to use in ArcView, you'll need to open the table containing the data you want to map. For our example, we'll use the comp table and we'll average one of the water table depth fields, wtdeph. For a better explanation of what an area-weighted average is and how to calculate it in theory, refer to this answer.

With the comp table open, click on Start Editing in the Table menu. Note that all the field headers change from italics to normal type. Now click on Add Field... in the Edit menu. The following dialog box appears,

giving you the chance to give your new field a name, specify the type of data that will be in the field, and control the width of the field. Now highlight the new field and click on the calculator button .

The calculator allows you to calculate the values for your new field. The formula you see multiplies the Wtdeph field by the percentage that the component occupies of the whole mapunit. Now we need to summarize two fields so that we can do another calculation. A longer explanation of the summarizing procedure is given in this answer. Select the Musym field and click on the Summarize button .

In the summarize dialog box we will create two fields, one a summation of the component percentages and one a summation of the calculation field we just made. Note that when working with quantitative fields like Comppct and Wt_mult, there are many ways to summarize.

In our new table, we will need to perform another calculation so Start Editing it and Add Field... Make sure that the new field is the number type and has a couple of decimal places. Now highlight the new blank field and click the Calculate button. This time you want to divide the sum of the Wt_deph's by the sum of the component percentages. See if you can get the right formula without looking at the illustration below.

In order to map the newly calculated field, we must join the current table to the table for our view. Choose Stop Editing from the Table menu and then highlight the Musym field. Now open the table for a view . Highlight the Musym field in this table as well and then click the Join Tables button. Now you can create a map based on the calculated values. You can see the results below: