Each single feature of a theme on our map is linked to a single row of data in a table for that theme.
To show you this relationship, be sure that the theme "Shambas.shp" is active and displayed in our View. Now click on the Select Feature tool in the second row of buttons at the top of the screen.

Select the parcel that I have selected below, which is in yellow.

Click on the Open Theme Table button at the top of the screen below the menu.

The "Attributes of Shambas.shp" table will appear.

Let us examine the table window. Notice that the menu and set of buttons at the top of the screen differ somewhat from those available in the View window.
Notice that at the head of each column in the table is the field name. We can find more fields to the right hidden from view now by scrolling to the right using the scroll bar at the bottom of the screen.Each row in the table represents an individual feature on the map. In this case, each row of data in this table is associated with a particular parcel.
The row of data for the feature that we highlighted in yellow on our map will also appear highlighted in yellow in this table. Right now, however, we do not see it. Why?
Notice that in the upper left of the window, it indicates that 1 of 77 records has been selected.

To promote the selected feature, click on the Promote button at the top of the screen below the menu.


To remove the yellow highlighting in the row indicating that the feature has been selected, go to the buttons at the top of the screen below the menu and click on the Clear Selected Features button.


The Table Properties dialog box appears.

Here we can change the title of the table and determine which fields will be visible in the table by placing a check mark in the "Visible" column next to the "Field" column. Sometimes we do not need to see all fields in a table. For example, we might not need to see both fields "Sqyards" and "Acres." To analyze data in a field, the field has to be visible in the table.
Also note the column "Alias." We can change the way a name appears in a table by putting in an alias for it. The default name for a column heading in a table is the field name. But sometimes field names are abbreviations or codes; in such cases, it may be useful to have a more descriptive title reflecting the contents of the field. Click on the OK button to close the Table Properties dialog box.For example, if in our table we have one "field" with data on number of plants in a parcel and another "field" with data on parcel areas, we can divide number of plants by parcel area to create a new field--plant density--which can then be mapped. We could then examine the spatial relations between plant density and pest populations. Similarly, we can calculate total animal populations in a new field by summing the individual fields for the populations of cattle, sheep, and goats.
Uncheck the box next to the field "Shambas.shp" in the Table of Contents so that it is no longer displayed in our View.Check the box next to the field "Lews_livestock.shp" in the Table of Contents, make the theme active, and zoom to the active theme. Change the shape of the markers in the map for "Lews_livestock.shp" from triangles to small circles (points).

These points represent the location of households owning livestock is a study being conducted by the Department of Rangeland Ecology & Management, Texas A & M University.
We are going to sum the populations of cattle, sheep, and goats for each household and place the results in a new field. To do so, we need to know how to perform basic mathematical operations on the fields in our tables. We can then map the new fields to examine their spatial relationships with other variables.
Open the "Attributes of Lews_livestock.shp" table. Scroll to the right of the table using the scroll bar at the bottom of the window. Find the fields "Cattle," "Goats," and "Sheep."

These fields have the number of each type of livestock held by each household.
We want to sum the number of cattle, sheep, and goats to create a new field (variable) called "Livestock". We first have to create a new field in which to place the summed figures.
Tables in ArcView are different from those in Excel. In ArcView, you must first be in "editing mode" before making any changes to the table. You cannot simply scroll to the right to add another column of data, as you can in Excel. You have to tell ArcView that you want to add a field after you are in editing mode.First, we need to enter "editing mode."
Before entering "editing mode," we have to change the attributes of the ".dbf" file for our theme. Because the files in this workshop come from a CD-ROM, they are "Read-only" files, which we cannot edit yet. We need to change the files' attributes before editing them. Open Windows Explorer and find the directory "ipm-crsp." Open the directory. From the menu at the top of Windows Explorer, select Edit and then Select All from the drop-down list. Now select from the menu at the top of Windows Explorer File and then Properties from the drop-down list. At the bottom of the Properties window in the "Attributes" section, uncheck the box next to "Read-only." Click on the Apply button. Close the Properties window and Windows Explorer. We can now enter editing mode to edit this table and the other tables.From the menu at the top of the screen, select Table and then from its drop-down list, select Start Editing.

Nothing seems to happen after making the selection, except one subtle difference is that the font of the field (column) headings changed from Italics font when we are not editing to Normal font when we are editing. We can now start editing the table.
(Note: If you want to begin editing a table but cannot select "Start Editing" in the drop-down list, the problem is likely that the attributes for the files associated with your theme are "Read Only." In such cases, you need to remove the "Read Only" attributes from the files associated with your theme.)
Select Edit from the menu at the top of the screen and then select Add Field from the drop-down list.

A small Field Definition dialog box appears.

Erase "NewField1" in the small box to the right of the category "Name:" and type in the name for our new field--"Livestock"--that we want to create.

Note that below the "Name:" category is the category "Type:". There is a box with a drop-down list to the right of the category "Type:". The current choice is "Number" which is appropriate for our variable that we are creating. But there are other choices as well.

If we wanted to create a new field containing a category, such as soil type or pesticide used, we would select "String" from the drop-down list.
Below the category "Type:" you need to specify the "Width" of a column if it is going to contain more than 16 characters.
Next, you can also select the number of "Decimal Places" for the new field. ArcView, by default, does not include decimal places in a new field. If your calculations will produce results with decimal places (such as "2.35 acres"), you need to specify the number of decimal places that you want displayed by entering the number in the Field Definition dialog box.After clicking on the OK button in the Field Definition dialog box, the new field, "Livestock," appears in the last column at the right end of our table.

(Note: We can later change the location of this, or any other column, in our table by placing our cursor on the field name at the top of the column and then dragging it to where we want it placed in the table.)
Now we want to calculate the sum of the three types of livestock for each record and place the results in our new field.
From the menu at the top of the screen, select Field and then from its drop-down list, choose Calculate.

The Field Calculator dialog box now appears.

Let us examine the dialog box. On the top left is a list of all the "Fields" in our table. We will be combining the values from three of these fields to create our new variable, "Livestock." On the top right is a list with the heading "Requests." From this list, we can choose various mathematical operators to create an equation that will produce the new field. (In the section in the middle is the type of field, in this case a number). In the bottom left is a blank box with the heading "[Livestock]=". Here ArcView wants to know what fields we will be using and how they will be combined to produce the results for our new field, "Livestock."
First, use the scroll-down bar in the "Fields" category in the top left of the dialog box to find the field "[Cattle]." Double-click on "[Cattle]" and it will appear in the window below the heading "[Livestock]=".

Now from the list below the heading "Requests" on the right of the dialog box, double-click on the plus "+" sign, which then causes it to also appear in the box below the heading "[Livestock]=".

Return to the list below "Fields" and double-click on "[Goats]" which then appears in the box below the heading "[Livestock]=" to the right of the plus "+" sign. Go back to the "Requests" list and double-click on the plus "+" sign again, which appears in the equation in the box below the heading "[Livestock]=". Then return to the list under the heading "Fields" and double-click on our next field, "[Sheep]," which is also added to the equation.
The equation should now look like this:

In essence, our equation indicates that our new field, "[Livestock]," is equal to the sum of the values in the fields for cattle, goats, and sheep.
Click on the OK button on the right of the dialog box and the sum for the livestock population for each record will appear in our new field, "Livestock".

To save our changes, we need to exit from "editing mode." To exit from "editing mode" select from the menu at the top of the screen Table and then from its drop-down list, select Stop Editing.

The Stop Editing box appears.

Click Yes to "Save Edits" (saving the changes that we have made to the attributes table, including creating the new field).
Note that when we stop editing the attributes table, the font of the headings of the columns changes back to italics again.
We can now map our new field.
Close the table and double-click on the theme name "Lews_livestock.shp" in the Table of Contents. This brings up the Legend Editor dialog box. Create a graduated symbol map of our new field "Livestock" which we can now find in the drop-down list for the category "Classification Field."
Our map should look like this:

We could then try to relate livestock holdings to the distribution of both environmental and socio-economic patterns. We could also examine the different impacts that pest populations have on livestock populations in different environmental zones based on vegetation, rainfall, elevation, etc. In addition, we could also monitor changes in livestock holdings over time and place such maps in our Layouts.
There are many variables that we could create in our database table. For example, if we had data on pest populations over time for different years, we could easily calculate rates of growth and then map them. But note that if you want to create a new field for rates of growth, it is important to specify that you want decimal places in the "Field Definition" dialog box.
There are other things that we can do in our table. One is to arrange the values for all livestock holdings (or for any other field) in ascending order (from lowest to highest values) or descending order (from highest to lowest values) based on the data in the field. This will enable us to quickly identify which features (households in this case) have the highest and lowest scores in relation to a particular field and to find where they are located on the map.
First, open the table for "Lews_livestock.shp" and locate the column "Livestock" on the far right of the table. Be sure that the cell in which the column heading "Livestock" is located appears darker than those of the other column headings. This tells ArcView that we want to work with this field. (If it is not darker, click once on the name of the field in the column heading to make it darker.)
Then go to the buttons at the top of the screen below the menu and click on the Descending Order button.

ArcView will rearrange the records according to their values, from highest to lowest for "Livestock".

Similarly, we can change the order of the values in the "Livestock" field by clicking on the Ascending Order button.

ArcView rearranges the list to show the lowest values first for this field.

We could then see where the households with the highest or lowest values in relation to livestock holdings are located on our map by selecting them in the Table. Remember that when a row of data is highlighted in yellow in a table, the corresponding feature on the map is also highlighted in yellow.
When working with tables, you choose the Select button, which looks like an arrow, to select records.

(The Select button is normally selected when we open a table.)
Select (highlight in yellow) the records with the three highest livestock holdings. To select more than one record at a time, hold down the Shift key while selecting each one.
Now close the table.
Next, check the box next to the theme "District Names" at the bottom of the Table of Contents so that it is displayed in our View. We can see where our selected livestock holdings are located in relation to the Districts.

(Remember that any features that are selected--whether points, lines, or polygons--can be converted into and saved as a separate shapefile for further analysis.)
Open the attributes table for "Lews-livestock.shp" again and clear the yellow highlighting from the selected rows.
Then go to the menu at the top of the screen and select Field and from the drop-down list choose Statistics...

A box with statistics then appears for that field.

Note the various statistics available.
Click on the OK button to close the window. Also, close the attributes table.Uncheck the box next to the theme "Lews_livestock.shp" in the Table of Contents so that it is no longer displayed in our View. Your View should now only display the theme "District Names".
Check the box next to the theme "Newpest.shp" in the Table of Contents to display it, make it active, and zoom to the active theme. This theme has the data on pest counts in our pest traps. Our map should be a graduated symbol map
Also, display the theme "Iganga-river_50000.shp."Your View should look like this:

As in the previous Step, we are interested in selecting those pest traps on our map that are within 50 meters from the rivers. Make sure that the theme "Newpest.shp" is active.
Select from the menu at the top of the screen Theme and then Select by Theme... from the drop-down list.

The Select by Theme dialog box now appears.
First, go to the second drop-down list "the selected features of." Click on the down arrow and choose "Iganga-river_50000.shp" from the list. This indicates that distances will be measured from where the rivers are located.
In the first drop-down list, "Select features of active themes that" choose Are Within Distance of. Because "Newpest.shp" is the active theme, ArcView will find the points of this theme that are within a specified distance from the rivers.
At the bottom of the dialog box, erase the zero and type in 50 for "Selection distance."
Your dialog box should look like this:

Click on the New Set button at the right of the dialog box. The pest traps that are within 50 meters of a river are selected and appear in yellow on the map.

We asked in Step 11 whether the 50 meter distance from rivers has an impact on pest populations. That is, do those pest traps that are within 50 meters of a river have higher pest counts than do those farther away?
Open the attributes table for "Newpest.shp".

The rows of data that correspond to the selected pest traps in our map are also highlighted in yellow.
Click on the column heading "Pests_num" (which has the data on pest counts) to make it darker so that any calculations will be performed on the values in this field.

Obtain statistics on the selected rows in this field by going to the menu at the top of the screen and select Field and from the drop-down list choose Statistics...
A box with statistics for the selected records in the field "Pests_num" appears.

We can see that the mean number of pests is 54 for pest traps within 50 meters from a river.
Click on the OK button to close the window.
We can now obtain comparable statistics on all non-selected records--which will be pest traps farther than 50 meters from a river--by clicking on the Switch Selection button at the top of the screen. This tool tells Arcview to deselect the items currently selected and select all the other items.
Click on this button. All the other records--for pest traps farther than 50 meters from a river--are now selected.

Obtain statistics in the new selected rows in this field by going to the menu at the top of the screen and select Field and from the drop-down list choose Statistics...
A box with statistics for the newly selected records--pest traps farther than 50 meters from a river--in the field "Pests_num" now appears.

We can see that the mean is 28, much lower than that for pest traps within 50 meters from a river.
While you will want to perform more complex calculations to determine if the differences are statistically significant, you have learned some useful basic functions for comparisons in ArcView.
Click on the OK button to close the window.
Remove the yellow highlighting from the rows.Close the attributes table. Uncheck the boxes next to the themes "District Names," "Newpest.shp," and "Iganga-river_50000.shp" in the Table of Contents so that they are no longer displayed in our View.
Check the box next to the theme "Shambas.shp". Make it active and zoom to the active theme. The theme is displayed in our View.

Open the attributes table for "Shambas.shp."

The field for "Maincrops" has the names of each of the four main crop complexes. These names, or "values," appear more than once.
We can summarize the data by main crop complex and then make a variety of calculations, such as determining the average and total area devoted to each main crop complex. "Acres" is the field with the information about the size of each land parcel.We want to determine the total area in acres devoted to each of the four main crop complexes.
To summarize data for a field, you first have to click on the heading of the field to make its cell darker. Click on the field name "Maincrops" to make its cell darker.

Then click on the Summarize button at the top of the screen below the menu.

This brings up the Summary Table Definition dialog box.

Notice that at the top of the dialog box there is the Save As button. Click on this button if you want to save the summary table that we will create in a different directory than that specified in the box to the right. We can leave the directory as "ipm-crsp."
In the box to the right of the Save As button, we can also give a new name to our summary table that we will create. Change the default title from "sum1.dbf" to "total-acres.dbf."

There are two small boxes on the left with drop-down lists. The first box is labeled "Field" and the second is labeled "Summarize by."
Select "Acres" from the "Field" drop-down list.

This tells ArcView that we want to find out something about the areas (in acres) devoted to each of the four main crop complexes.
Select "Sum" from the drop-down list for "Summarize by."

This tells ArcView that we want to find the sum of the areas in acres for each main crop complex. (Note: There are other choices as well, such as obtaining averages.)
Your dialog box should look like this:

Then click on the Add button in the middle of the dialog box. Notice that in the blank box on the right "Sum_Acres" has appeared.

This statement means that for each main crop complex ArcView will provide the sum of the area in acres.
Now click on the OK button in the dialog box and a new, smaller table (with our new title) is created that lists each main crop complex, the number of parcels containing the main crop complex (under the heading "Count"), and the sum of the area for each main crop complex in acres.

We can see the primary importance of the "bean-maize" complex clearly revealed in the summary table.
We performed just one summary analysis in the Summary Table Definition dialog box. You can perform several summary analyses in the same dialog box, as I have done below:
The resulting summary table will contain both sets of information:

Whereas the total area devoted to "bean-maize" is much larger than is that for "bean-banana," we see that the average parcel size for the two main crop complexes is very similar.
We can create charts of such summary tables, as we will learn in the next Step.Close your summary table "total-acres.dbf" and the table "Attributes of Shambas.shp."