USING ARCVIEW

IPM CRSP

VIRGINIA TECH - CARDI JAMAICA

INFORMATION SYSTEMS FOR COLLABORATIVE RESEARCH

GIS WORKSHOP

August 18 - 20, 1998

Larry Grossman

Department of Geography

Virginia Tech


NOTE: The materials on these pages--both in printed form and on the World Wide Web--are to be used only in association with the Virginia Tech IPM CRSP. Reproduction or use of these pages, in part or in full, for commercial purposes is strictly prohibited. Those wishing to reproduce or use these pages for non-profit, educational purposes should contact the author at LGROSSMN@VT.EDU for permission.


Acknowledgment: All coverages and part of the data in these GIS lessons are supplied by Glynis Ford of the Rural Physical Planning Division (RPPD), Ministry of Agriculture, Jamaica.

Step 12:Spatial Analysis IV: Working with Graphs

Graphs can enhance our ability to interpret spatial data. They provide a visual tool to compare patterns that we might otherwise miss if we were simply looking only at the database tables we have seen in ArcView. Graphs are also crucial components of making convincing presentations to others in government, business, and education.

Creating Graphs

Suppose that you are examining the impact of different pest control strategies--IPM strategy number 1, IPM strategy number 2, using no pesticides, applying Malathion, and applying Mocap. We want to use graphs to illustrate the impact of these strategies on the pest population over three different time periods.

We want to use graphs to illustrate the effectiveness of these strategies over time.

To do so, we need to work with the database tables that are in our GIS program. From these tables, we will create a bar-graph to help compare the relative effectiveness of the five strategies over the three time periods

First, we have to add a new theme, "Morepest.shp". After loading it, click on its check box in the Table of Contents to display it on the map. Make sure that all the other themes in the Table of Contents are not displayed (by removing the checks in the small boxes to the left of their names). Our map should look like this.

Go ahead and display the pest-control strategies (in the field "Strategy") on our map, as I have done. Change the name of this theme in the Table of Contents to "Pest Control Strategies."

Make the new theme, "Morepest.shp," active and click on the Open Theme Table button OPEN THEME TABLE located at the top of the screen below the menu.

The attribute table "Attributes of Morepest.shp" now appears. Notice that there are five rows of data in the table, one for each pest-control strategy.

In the attribute table, scroll to the right by dragging the small box along the scroll bar at the bottom to see the last four fields.

In the first time period, "Numpest1," which represents conditions before any pest-control strategies were used, the number of pests was uniform throughout the area. Thus, in the table for our new theme, Morepest.shp, the number of pests for each strategy in the first time period is listed as 100. The pest counts, however, varied significantly among the strategies during the second ("Numpest2") and third ("Numpest3") time periods.

Now click on the chart button at the top of the screen below the menu. The Chart Properties dialog box now appears.

Let us examine the dialog box. At the top is a small box with the name of our chart, "Chart 1." Here you can type in a new title for the chart. Type in the phrase "Impact of Pest Controls Over Time."

Just below the "Name" of the chart is the "Table" whose data we will be using to create our new chart; in this case, we are using data from "morepest.dbf".

Below on the left is the category "Fields," which contains a list of the fields in our table. In the middle are two buttons whose labels are dimmed because they are not active yet. On the right is the category "Groups" with an empty box below it. The basic idea is to select the fields that we want in our graph and add them to the box under the category "Groups."

Click on the field name "Numpest1" on the left under the heading "Fields" and notice that the button labelled Add is no longer dimmed, which means that we can now use it.

Click on the "Add" button. Now the field "Numpest1" is added in the box on the right under "Groups."

Now add the fields "Numpest2" and "Numpest3" to the box under "Groups" in the same way. You will have to use the scroll bar in the "Fields" list to find these fields.

Now look at the small box in the middle on the left of the Chart Properties dialog box with the heading "Label series using:". In its drop-down list (which now lists "None") select the field "Strategy" (which contains the types of pest-control strategies). This will enable us to label the graph with the names of the pest-control strategies.

The field "Strategy" now appears in the small box below the heading "Label series using."

Click the OK button at the top right in the dialog box and a bar graph automatically appears.

(Note: if you cannot see all the labels in the graph clearly, put your cursor in the corner of the border around the graph and drag the corner out to enlarge the graph.)

Right now we have the labels for the number of pests in the different time periods in the X axis and the pest-control strategies listed in the chart's legend. By default, ArcView places in the chart's legend the categories from the field chosen for "Label series using" in the "Chart Properties" dialog box. However, in this case it is more effective visually to reverse them, so click on the Series from Records/Fields button, which reverses the order of label placement in the chart.

We can now see clearly the effectiveness of the different strategies over time.

Note that there are other types of graphs that we could create as well, as indicated by the buttons at the top of the screen below the menu.

Which style of graph is most useful in illustrating data depends on the types of data that you are examining.

We also should add a title to our chart. Click on the Chart Element Properties button in the second row of buttons at the top of the window. Then click on the word "Title" above the five bar charts. This brings up the Chart Title Properties box.

Type in for the title "Impact of Pest Control Strategies" where the word "Title" is highlighted in black.

(Note: You can also change the location of the title in the graph by clicking in the Chart Title Properties box where you want the title to be placed.) Then click on the "OK" button.

The title now appears above the charts.

You can also change the appearances of the legend, X axis, and Y axis. Make sure that the "Chart Element Properties" button is depressed and click once on any element in the chart that you want to change. Make the changes in the dialog boxes that appear.

In addition, you can also create charts of aggregated data in tables produced when you use the Summarize tool . I have produced a graph below of the data that we summarized when we were working with tables at the end of the previous lesson.

You can also print charts by choosing from the menu at the top of the screen the item File and from the drop-down list select Print.

Adding Charts to Layouts

In addition, you can add charts to layouts before you print them. To do so, be sure that you do not close the window containing our chart "Impact of Pest Controls Over Time". Leave it open. To shift back to our map to create the layout, select Window from the menu at the top of the screen and View1 (or the name that you gave to your view) from the drop-down list.

Create a layout of our map. In doing so, change the title from "View1" to "Pest Control Strategies." Move the title to the left to make room for the chart.

Then, press (not just a click) on the View Frame button in the second row of buttons at the top below the menu. This action brings up a drop-down list of framing tool icons.

The framing tools enable you to add various ArcView elements to a layout.

Select the Chart Frame tool that looks somewhat like a graph.

Note that cross-hairs have appeared on your cursor. Outline the area on your layout where you want to place the graph by dragging your cursor to create a rectangle.

Release your mouse button and now the Chart Frame Properties dialog box appears.

In the section to the right of "Charts" click on the chart name you want to incorporate into the layout and then click on the OK button. The chart appears in the layout in the area you defined with your cursor.

Select the pointer button at the far left in the second row of buttons at the top. Then, click once near the corner of the layout and the handle bars around the chart will disappear.

Our layout is somewhat crowded in this case. We could reposition and resize the other elements using the pointer tool.

(Note: You could also add different Views to the same layout using this method, by selecting the View Frame button. Having different Views printed together is very effective in illustrating comparisons, such as of different pest populations over time in the same area.)

Incorporating Charts into Maps

We can also produce the same bar graphs (and pie graphs) so that they appear within our map. (Note: You can do so only if you have version 3.0 or higher of ArcView.)

Return to our map and make sure that the theme "Pest Control Strategies" is still active. Then double-click on the name of the theme in the Table of Contents to bring up the Legend Editor dialog box. In the drop-down list for "Legend Type" select Chart.

The Legend Editor dialog box should look like this.

On the left side of the dialog box under the heading "Fields" highlight the fields "Numpest1," "Numpest2," and "Numpest3" by clicking on the first field and then holding down the Shift key as you select the other two fields."

Then click on the Add button in the middle of the dialog box so that the three fields with their new color symbols appear on the right side of the dialog box under the heading "Fields."

(Note: If you do not like one of the colors, you can change it by double-clicking on it and using the color palette window to change it.)

Before applying the changes to our map, note that in the bottom left of the dialog box under "Chart Type" the symbol for pie graphs is selected (it looks pressed in). We want to produce a bar graph chart, so click on the symbol for bar graph charts to the left.

Now click on the Apply button in the bottom right of the dialog box and close the dialog box. We now see our new map with the five bar graphs located in the respective tracts that they represent. The legend for the pie graphs is in the Table of Contents on the left.

A problem has developed; because we are displaying the graphs in the theme "Pest Control Strategies," the original shadings that we had on the map previously to display the spatial distribution of the pest-control strategies has now disappeared, being replaced by a single color.

There are two strategies to solve the problem.

One solution that we can implement now is based on the lessons that we have learned. Double-click on the theme name "Pest Control Strategies" to bring up the Legend Editor dialog box again and notice that at the bottom of the dialog box is a small box beneath Background Symbol.

This box has the current background color that is on our map. Double-click on the box to change the fill pattern to clear (click on the top left box in the "Fill Palette" window). Apply the choice, and our map should look like this.

Then add the theme "Morepest.shp" a second time to the Table of Contents. Classify the tracts in the theme according to the data in the field "Strategy".

In the Table of Contents, drag the theme "Morepest.shp" so that is appears below the theme "Pest Control Strategies" and display them both on the map.

We can now see clearly on our map how the numbers of pests have changed over time in response to the different types of pest control strategies.

We can also add pie graph maps in the same way, by going back to Legend Editor dialog box and selecting the pie graph button at the bottom left of the dialog box. We would only do this if the types of data that we want to portray are appropriate for a pie graph.

A second solution would be to add another theme represented by points. In the theme, one point would be located inside each polygon. Each point would have associated with it the same data on the number of pests in the three different time periods in its attribute table. We could then use the point theme to display the graphs; in such cases, the graphs would be drawn directly on top of the points.

We can also incorporate charts with other aspects of ArcView, such as querying, to analyze spatial patterns.

[Return to beginning]

[GO TO STEP 13]