FREC 480 -- GIS in Natural Resource Management
ArcView Thematic Mapping and Table Edits
next
previous

By now, having had a rapid sequence of intros to ArcView, HTML, UNIX and digital images, you're probably wondering how you're going to master all this stuff.  From here on, this course focuses entirely on GIS.  You'll need to develop some competence with Web design in the UNIX environment in order to develop acceptable projects, but the first assignment isn't due for two more weeks, so you have plenty of time for this.

Editing Tables

The first ArcView lecture introduced Tables in ArcView.  Tables are typically dBase format database files, although ArcView can also read ASCII text tables, and can also handle tables in ESRI's INFO database format (INFO is the clumsy database engine for ESRI's high-end Arc/INFO GIS--avoid it!).  Tables contain records that typically correspond to individual geographic features in a theme, and fields in which data elements are stored for each record. Fields are defined as numeric, string, Boolean or  date.  Numeric fields support math and logic operations; string, Boolean and date fields support logic operations.  String fields are case-insensitive: "a" and "A" are treated as the same character.  Boolean fields may only contain "True" or "False" values.  Date fields contain dates in YYYYMMDD format.

You can derive statistics for any selected field in a Table with Field--Statistics.

Note: be careful about strings masquerading as numbers.  Zip codes, for example, should be stored as strings rather than numbers in order to preserve leading 0 characters.  An ascending sort of the string array {3, 5, 10, 15, 22, 33, 105}will yield {10, 105, 15, 22, 3, 33, 5}--an alphabetic sort.

A Theme Attribute Table contains fields linked to geographic features in an ArcView theme (shapefile, grid, etc.).  via a feature ID field.  You can edit an open Theme Table pretty straightforwardly, creating new fields or records and inserting field values via the Calculate utility in the Field menu, or by hand.:  Select Start Editing from the Table menu.  Add Field and Add Record are in the Edit menu.

For example, let's create a thematic map of 1997 population density in the US by state.   To start, add the States.shp shapefile as a Theme in a View window.  With the States theme active, use Theme--Table or click the Theme Table button  to activate the Attribute Table for the States.shp.

Now we need to create the 1997 population density field in the Theme Attribute Table.   Select Table--Start Editing to open the Table for editing, then Edit--Add Field to create the new field that will hold the data.  In the example below, the new field is a 9-digit numeric field named "97popden" appended to the table on the right.  Note that the "97popden" field is active (highlighted), so that actions performed through the Field menu will apply to that field.  (To select any other field for editing, just click on it's name in the table.)

To replace the blanks with calculated 1997 population densities for each state, use Field--Calculate (the  button) to construct the database expression as shown below:  Just double-click on the appropriate Fields and Requests in the Field Calculator tool to create the appropriate expression, then "OK."

After clicking "OK" you should see the "97popden" field filled with calculated values.

Now create the thematic map from this field.  Activate the View window, double click on "States.shp" in the Theme list to activate the Legend Editor.  Select a "Graduated Color" legend type, since you'll be mapping a continuous variable.  Select "97popden" as the Classification Field.  With a continuous variable, you can "Classify" the features into any number of categories, and by various methods: equal area, equal interval, natural breaks, quantile, or standard deviation.  You can edit category ranges manually as well.  Select any Color Ramp you like, and then double click on any symbol to edit fill style, fill color, outline color, etc.   You can select and edit all the symbols in the Legend Editor by holding the Shift key down and clicking them all, or simply sweeping them with the mouse.  You can edit the Value and Label entries.

Once you have the features classified the way you wish, "Apply" the legend to the View.  Replace the shapefile name with a proper title in the Theme--Properties dialog window.   Title the View window in View--Properties.

Labeling a Map

ArcView's feature labeling options can be somewhat confusing.  To label the the above map, I sorted the states by area, selected the largest 40 or so from the Attribute Table, and then autolabeled them with View--Auto-Label, using the state name abbreviation field.  ArcView sticks the same size labels in regardless of the size of the View window.  I resized all the labels simultaneously, then repositioned some labels individually.

Making good thematic maps is an art.  Try to keep it simple and use intuitively obvious color schemes (e.g., cool-to-hot).  Be careful about depending too much on color.  People sometimes make black-and-white xerox copies of color maps, and if someone's copy of your map looks awful, it will still have your name on it, not theirs!  Most monochromatic color schemes will come out okay in black-and-white.  The easiest way to master ArcView's thematic mapping capabilities  is to experiment with the options.

Theme--Properties

At some point you should get familiar with the various dialog windows accessed via the Theme--Properties.

More about Tables

One of ArcView's real strengths is its efficient handling of tabular data associated with geographic features.  Each Theme in your project typically has an associated Theme Attribute Table.  In addition, ArcView handles can manage joins and links of other dBase-format files to Theme Attribute Tables.  To join additional data in a source Table to a destination Theme Attribute Table (or any other table), add the source Table to the project, select a field to match on, activate the destinatoin table and select its match field, and execute the join with the Join button .  You will then see the fields from the source table appended to the end of the destination table.

Note: Sometimes you will want to do a Table join but the Join button is dimmed out.  There are several possible reasons for this:

You can edit the destination table's own fields, but you can't edit its joined fields.  Edit those in the source table.

A join works fine when there is a one-to-one correspondence between records in the source and target files, or when there are many records in the target table for each record in the source table (e.g., you are joining state-level data to the Counties Theme Attribute Table).  A join doesn't actually merge the tables; the Project maintains the correspondence between them.  So you can't edit joined fields in a target table; you would have to edit those fields in the source table. If you do want a permanent copy of the combined table, use Table--Export to create the copy.

In cases when you have multiple records in a source table corresponding to each record in a target table, a join will simply append the first corresponding record in the source table to each record in the target table.  But you have two more practical options.

  1. You can create a summary table from the source table.  Select a field to summarize on: the summary table will have one record for each value in that field.  Click the Summarize button , name the summary table, pick the fields you want summarized and pick the summarize method for each field (for numeric fields these are: average, sum, min, max, std. dev., variance, first, last or count).  Now you can do a one-to-one join of the summary table to the target table.
  2. Alternately, you can link the source table to the target table.  You won't see the source table's fields appended to the target table, but if you select a record in the target table, all records in the source table linked to it will be selected as well.
Table Edits

To edit a table cell by cell, use the Table Edit tool  .  You can add new fields or new records to any table as desired.

You can't change field types in a Table, but you can interpret one type of data as another type.  Suppose you had entered a lot of zip codes into a numeric field "zipcode", and then realized some zip codes are missing a leading zero.  You could create a new string field "zipchar" and then use the Calculate expression (zipcode).AsString to fill the "zipchar" field with zipcodes.  Then you could Query for (zipcode)<10000 to select all records where the zipcode is missing a leading  zero, and then recalculate the "zipchar" field for those records with the expression "0"+(zipcode).AsString .  The expression (zipcode).AsString  is typical of ArcView's typical object.requst OOP syntax.

To sort a Table by some field, select the field and click the Sort Ascending button  or the Sort Descending button .

To reorganize the order of fields in a Table, using the mouse to drag field names to the left or right.  To resize a field, drag the right edge of the field name.

To hide or rename a field, uncheck the Visibility box or specify an alias for it in the Theme--Properties dialog window.

Selecting Features

It is often useful to select a set of geographic features and associated Theme attribute records in order to perform some edit or analysis of them.  Charts display data for the selected features in a Theme.  The Table Calculator operates on the selected records.  Theme--Auto-Label labels the selected features in a View.

By default, selections in a View and Table are highlighted in yellow.  You can choose a different highlighting color through the Project--Properties dialog box.  Note that If you print or export a View's map display with highlighted selections as a graphic file, or include it in a Layout, it will display with the highlighting.  If you print a Table with highlighting, or include it in a Layout, the selected records will also be highlighted in the printout or Layout.

ArcView supports various feature selection methods.  Creative combinations of these can accomplish even highly complex selections.

To select features manually, use the Pointer tool  to select features from the View or records from the Theme Attribute Table window.  To select multiple features, hold down the Shift key as you use the mouse.  To select a cluster of features in a View, drag a box over them with the View Select Features tool .  You will see the selected features highlighted in the View, and their corresponding records highlighed in the Theme Attribute Table.  To group the selected records to the top of the Theme Attribute Table, use Table--Promote or the Promote button .  It is often easier to perform a sort on some field in order to group the features you want to select; then you can hold the Shift key down and select a group of records with a sweep of the mouse.

To select all features in a Theme that touch a drawn graphic element (line, circle, rectangle or polygon) draw the element on the View with one of the tools in the Draw tool pull-down menu  and then use the Select Features Using Graphic button  .

To select features by mathematical or logical condition, use Theme--Query or the Query Builder button .  Be careful about matching parentheses in your expressions.  You can use requests such as AsNumber, AsString, AsBoolean and AsDate to interpret data of one type as another type (see "Table Edits" section above). * and ? can be used as multi-character and single-character wildcards in string queries.

To select features by spatial relationship to other features, use Theme--Select by Theme  This utility lets you select features in the active Theme(s) that --

-- the selected (or all) features in a specified Theme.  (You can even select features in a Theme by their spatial relationship to other features in the same Theme.)

Query Builder and Select By Theme both let you create a new set of selected features, add newly-selected features to an existing selection, or selecting a subset of features from an existing selection (i.e., de-selecting the features not in the subset).

To copy or convert the selected (or all) features in the active Theme to a new shapefile, use Theme--Convert to Shapefile.

To reverse the selection within a Theme, de-selecting what was selected and selecting what was not selected, use
Edit--Switch Selection or the Switch Selection button  from the Tables menu.

To de-select all features in a Theme, use Select None button