Attribute Date in GIS

As in a thematic map, GIS requires both spatial data and attribute data:  information attached to each object in a layer.  Within the program the attributes most often are in spreadsheet format.  This week we will look closely at the attribute data and the way they are used, stored, accessed and manipulated in GIS.

Copy the \attribute layer from the P: drive to your computer (c:\temp) before you begin
Start ArcMap and open the states layer
To view the table in ArcMap, right click on the layer name in the Table of Contents and "Open Attribute Table."
Each row represents an object -- in this case, a state.  Each column is a variable (all 1990 data from the census bureau)
Clicking on the left button selects the state, which will appear selected in the map view. Control Key will allow you to select many.
All records or selected records can be shown -- select the button at the bottom of the screen
Clicking on the column name will select that column.  Right-clicking will allow the following: To add a field to the attribute table, use Options, Add Field.   Fields are added and deleted outside an edit session.
To add a record or delete one, or change an attribute value by typing, you must start an edit session (use the edit toolbox icon from the toolbar).
To change the width of the displayed column, move the border between two column names.
Hide a field by dragging one edge of the column title button to the other edge.  Bring it back by double clicking.
Move fields by highlighting and dragging them.
Rename field from the table of contents (Properties menu)

***When editing or adding polygons or lines, ArcMap doesn't easily calculate area or length.  There are instructions how to do so on the ESRI page.

To export to a .dbf file (readable in most database programs) use Options, Export.  Then simply open or import this file into your database.
Create charts from your attribute table with Options, Charts.  The on-screen instructions are spare, so experiment with the settings.

To "connect" data from another database (e.g., an excel file) to the map and attribute table in the GIS you need a linking field -- a field with an identifying number or text string that matches the record from one database to a record from the other.

There are two ways to do this in ArcGIS.  In these instructions "target" is the existing spatial layer, "source" is the non-spatial database.

  1. Joining
    1. Joining "appends" the new data into the attribute table -- best when there is a one-to-one correspondence between target and source
    2. Until it's exported, however, it is only a soft link to the source data -- after exporting the new fields are actually a part of the layer.
      1. HOW TO: In ArcMap, open the table as if it were another layer.
      2. Then right-click on the target spatial layer in the Table of Contents, and choose Joins & Relates. Select Join.
      3. Identify the two layers and their common field, and hit join.
      4. Check the attribute table now to see if the join worked.  The new data should be appended to the right.
  2. Joining attribute data by location
    1. This tool moves attribute data from one layer to another
      1. For example zoning data (area) may be moved to scattered real estate points
      2. Or, average sale price of home (points) may become part of a neighborhood map's (area) attribute table
        1. be careful with this -- ALL the data of the source layer are transferred over to the target area, but in a new joined layer.
  3. Relating
    1. Relating is quite a bit more complicated.  It's appropriate when one record in a target spatial layer has many matches in the nonspatial table
    2. For example, if you have a database of beats (crime areas) and a non spatial table of all crimes, with beat number noted for each.
      1. HOW TO: Open the table in ArcMap as you did with join
      2. Right click the spatial layer's name and choose Joins & Relates.  Select Relate.
      3. Identify the databases and linking fields, as before, and then Relate.  The tables are related
      4. You will not see a change in the attribute table of the spatial layer, but
      5. If you choose one or several objects from that layer, look under Options in the Attribute table, select the related table, you will see the non-spatial table with the related fields highlighted.  You can analyze this as you do normal attribute tables in ArcGIS.
      6. You can also take this analysis the other way.  In the Related (non-spatial) database, select by attribute (find this option under "Options" in the attribute table view.
        1. following the example above, you might select all homicides in the non-spatial table, and then display all beats in which at least one homicide occurred.


You will be downloading some year 2000 data from the census bureau site, linking it to the state.shp layer, and then computing the percent change in a variable of your choice, with which you will make a choroplethic map.

  1. Download the data file for Illinois from the Census Bureau's American Fact Finder (this is the quick table window:
    1. Select States
    2. All States
    3. Next
    4. Choose your table
    5. Add, Show results
    6. Print/Download
    7. Download and Excel File
    8. It'll come in zipped, unzip it.
  2. Open the file in excel, rename the descriptive columns with SHORT descriptors
    1. normally you would certainly want to keep the coded variable name, but it's not necessary for this exercise
  3. delete the other title rows so you have ONE title row above the block of data
  4. Identify the linking field (in this case, for expedience, try state name)
  5. Highlight the title row and data block and save it as a Database III .dbf file.
  6. Open the .dbf file in excel or in ArcGIS to see that it worked.
  7. Open the attribute table of the ArcGIS State layer
  8. Correct the spelling of state name: New Hampshire
  9. Prepare to join the two
    1. IF you have matching fields (Unique fields, or linking fields), identify the files to join, and the matching fields.
  10. Join the two and open the joined attribute table
    1. the join is weak at this point -- the two .dbf files are separate.  Data, Export, to "hardwire" the attraibute table.
  11. Find the data from the year 1990 and the year 2000 that match.  For example, Hispanics in 1990 and in 2000.
  12. In ArcGIS, add a new field and in it, calculate percentage change.  The formula is ((Hispanic2000 - Hispanic1990)/Hispanic1990)*100
  13. Rename that field to "Percent Change 90-00 Hispanic," or something that describes your new field.
  14. Map it, using one of the cartographic techniques available.  Mind your cartographic skills!  Consider combining this with another theme.
    1. For example, choroplethically: Hispanic Percent Change --1990 - 2000" with scattered dot "Hispanic" 1 dot =1,000
  15. Publish your map with thorough annotation.  I want to know that you know what you have done.

  16. Here's an excellent example, and another.

©copyright Erick Howenstine 2001-2004