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.
sorting, ascending or descending
(min/max/avg/sum/st.dev/variance) for selected variables
summary of values in one field for all records for each value in another
for example, one might total the congregation (an attribute called #people)
in synagogs, temples, and churches separately (these are three values of
a point attribute called "building4worship"), for selected places of worship
-- say, within the borders of Chicago.
this will allow overwriting a column with a formula which refers to other
columns or itself.
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
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.
Joining "appends" the new data into the attribute table -- best when there
is a one-to-one correspondence between target and source
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.
HOW TO: In ArcMap, open the table as if it were another layer.
Then right-click on the target spatial layer in the Table of Contents,
and choose Joins & Relates. Select Join.
Identify the two layers and their common field, and hit join.
Check the attribute table now to see if the join worked. The new
data should be appended to the right.
Joining attribute data by location
This tool moves attribute data from one layer to another
For example zoning data (area) may be moved to scattered real estate points
Or, average sale price of home (points) may become part of a neighborhood
map's (area) attribute table
be careful with this -- ALL the data of the source layer are transferred
over to the target area, but in a new joined layer.
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
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.
HOW TO: Open the table in ArcMap as you did with join
Right click the spatial layer's name and choose Joins & Relates.
Identify the databases and linking fields, as before, and then Relate.
The tables are related
You will not see a change in the attribute table of the spatial layer,
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.
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.
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
Download the data file for Illinois from the Census Bureau's American
Fact Finder (this is the quick table window:
Choose your table
Add, Show results
Download and Excel File
It'll come in zipped, unzip it.
Open the file in excel, rename the descriptive columns with SHORT descriptors
normally you would
want to keep the coded variable name, but it's not necessary for this exercise
delete the other title rows so you have ONE title row above the block of
Identify the linking field (in this case, for expedience, try state name)
Highlight the title row and data block and save it as a Database III .dbf
Open the .dbf file in excel or in ArcGIS to see that it worked.
Open the attribute table of the ArcGIS State layer
Correct the spelling of state name: New Hampshire
Prepare to join the two
IF you have matching fields (Unique fields, or linking fields), identify
the files to join, and the matching fields.
Join the two and open the joined attribute table
the join is weak at this point -- the two .dbf
files are separate. Data, Export, to "hardwire" the attraibute table.
Find the data from the year 1990 and the year 2000 that match. For
example, Hispanics in 1990 and in 2000.
In ArcGIS, add a new field and in it, calculate percentage change.
The formula is ((Hispanic2000 - Hispanic1990)/Hispanic1990)*100
Rename that field to "Percent Change 90-00 Hispanic," or something that
describes your new field.
Map it, using one of the cartographic techniques available. Mind
your cartographic skills! Consider combining this with another theme.
For example, choroplethically: Hispanic Percent
Change --1990 - 2000" with scattered dot "Hispanic" 1 dot =1,000
Publish your map with thorough annotation. I want to know
that you know what you have done.
an excellent example, and another.
©copyright Erick Howenstine