0% found this document useful (0 votes)
19 views

Attribute Data II

This document provides instructions for manipulating and analyzing attribute data in ArcGIS. It describes how to edit attribute tables, calculate new fields, sort and filter records, perform statistical summaries, and export table data. The exercises demonstrate resizing and reordering fields, editing records to correct errors, calculating total costs based on area and cost/ha, summarizing data by land use type, and exporting suitable records to a new table for further analysis outside of ArcGIS.

Uploaded by

sukardi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Attribute Data II

This document provides instructions for manipulating and analyzing attribute data in ArcGIS. It describes how to edit attribute tables, calculate new fields, sort and filter records, perform statistical summaries, and export table data. The exercises demonstrate resizing and reordering fields, editing records to correct errors, calculating total costs based on area and cost/ha, summarizing data by land use type, and exporting suitable records to a new table for further analysis outside of ArcGIS.

Uploaded by

sukardi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Biology 483: Applications of GIS

Fall 2002

Attribute Data II Page 105

APPLICATIONS OF GEOGRAPHIC INFORMATION SYSTEMS (GIS):


ATTRIBUTE DATA II
Tables in ArcMAP are dynamic and therefore changes that you make in the table or in the
source data take effect immediately. However, you can only edit the data in a table if you have
permission. If you create the data (e.g., create a table) or if you copy data from somewhere else
into folders that you own, then you will be the owner and you will be able to edit the data. If you
are not the owner of the data, you can edit it only if the owner has set the permissions to allow
you to write to the data file.
MANIPULATING TABLES
? Open the project attrib.mxd (in your j:\GIS\attribdata folder).
? Display the Land_use layer only.
Often tables need to be edited to (1) facilitate viewing, (2) because of inaccurate data, or (3)
because of the need to update data.
? Open the Attributes of Land_use polygon table.
Resizing and repositioning fields (see also Attribute Data I).
The width of the fields can be increased or decreased as necessary. Change the field width
by placing the pointer at the boundary between two fields. When the double arrow appears, hold
down the LMB and drag the pointer to the right or left as desired. (This changes the width of the
field to the left of the pointer.)
Experiment with changing the widths of fields within the Attributes of Land_use polygon table.
The order that fields are displayed can be changed by clicking on the column you want to
move. Then hold down the LMB on the field name that you want to reposition, dragging the
field and then releasing the mouse pointer when you have arrived at the desired location for the
field. This feature is particularly useful in large tables to line up columns that you want to view
together. Reordering of fields is maintained in the project, but it is not reflected in the original
source table (i.e., not a dynamic feature).
? Reposition the field Lu-name so that it is immediately to the left of the field Cost/ha.
Sorting records.
Records can be sorted in either ascending or descending order based on a selected field.
Sort Attributes of Land_use polygon table by increasing Cost/ha (cost per hectare) by rightclicking in the field name and selecting Sort Ascending in the drop down menu.

Biology 483: Applications of GIS


Fall 2002

Attribute Data II Page 106

Is cost per hectare related to land use type? Compare the two fields (i.e., scrolling through
the values) after sorting records.
Reposition and resize the Attributes of Land_use polygon table in the lower left of the screen for
the next exercise.
Editing records.
? Open the table landsuit.dbf.
Certain land uses are considered suitable for development purposes, whereas others are not.
Suitability is based on a number of criteria including cost to develop and environmental
conditions. Suppose that you discovered that the database contains an error and the landsuit.dbf
file should read:
Lu_code
100
200
300
400
500
700

Suitabil
Not suitable
Not suitable
Suitable
Suitable
Not suitable
Suitable

? Correct the landsuit.dbf table by using the Edit tool in the following manner:
1. Open the landsuit.dbf table and select "Start Editing" from Table Menu.
2. Edit the table (i.e., replace cell values) to match the values given above. Be sure to
hit the <Enter key after making changes to a cell value before continuing with next
step.
3. When done, save and finish editing by selecting "Save Edits" and "Stop Editing" from
Editor toolbar.

Recall that the landsuit.dbf table had been joined to the Attributes of Land_use polygon
table in the previous exercise. Examine the Attributes of Land_use polygon table to determine
whether the changes just made to the landsuit.dbf table are automatically reflected in the
Attributes of Land_use polygon table.
? Close the landsuit.dbf table only.
? Edit the ASCII file landuse.txt change Agriculture to Crops.
? Return to attrib.mxd and examine Attributes of Land_use polygon table.

Biology 483: Applications of GIS


Fall 2002

Attribute Data II Page 107

Note that Crops has now replaced Agriculture in the Lu-name field. Look at the display in
the View window - what's happened? Open the Symbology Properties for Land_use layer and
reclassify on Lu-name using Unique Value.
? Save your document.
? Close all tables before continuing.
SIMPLE ANALYSES USING DATA IN TABLES
Although limited in scope, there are a number of simple descriptive statistics and
calculations you can do with data stored in ArcMAP tables. If the statistics go beyond the
capabilities of the ArcGIS software, you can export the table (all of the table or only selected
fields and records) from ArcMAP and do your analyses in a statistics package of your choice
(see EXPORTING DATA FROM A TABLE).
? Display only the Land_use layer.
What steps would you take to answer the following question:
What is the average cost (in dollars) for purchasing parcels (i.e., polygons) of land of
different land use types?
Hints:
Open the Attributes of Land_use polygon table. What are the fields?
Does the table contain the field that you need to answer this question? If yes, what field is
it? If no, what data do you need to calculate or add?
Calculating fields.
You will now create a new field, called Total_cost, in which you will calculate the cost
for each record as the area in hectares times the cost per hectare.
? Open the Attributes of Land_use polygon table and select "Add Field" from the Options
drop down menu.
Add a new field to the table named Total_cost, which is a float with width of 12
(precision or length of field) and 2 decimal places (add 2 next to scale in field properties).
? Start Editing from the Editor toolbar.
? Right click on Total_cost and select Calculate Values.
Write a logical expression that computes the total cost in dollars for each record.
The field Area is in square meters and Cost/ha is in hectares (1 hectare = 100 meters x
100 meters = 10,000 square meters). Click "OK" when done.

Biology 483: Applications of GIS


Fall 2002

Attribute Data II Page 108

The Total_cost field in the table should now contain the appropriate cost values.
? Stop Editing the Attributes of Land_use polygon table.
? Display Total_cost field using the Symbology Properties.
Use a Graduated Color Legend Type.
? Display the Roads theme.
Assuming you must buy entire parcels and can not subdivide them, where is development
most costly? If parcels could be divided, where would development be most costly?
Calculate can perform a variety of operations including arithmetic expressions, combining
string (character) data contained in different fields, and replacing string data with new values.
Summarize data in a table.
At times you might want to summarize data contained within a field. You can do this for all
records in the table or for only selected records. Results from summary operations are stored in a
new table.
You will now create a summary table entitled sum_cost.dbf that contains the total costs in dollars
for polygons of different land uses contained within the Land_use polygon layer.
? Open the Attributes of Land_use polygon table if it is not already open.
? Select the field Lu-name as the grouping variable (i.e., highlight this field).
? Right click on field name and select Summarize.
A Summarize window pops up.
1. In the first line of this window enter the field name to
make the summary (Lu_name)
2. Select Total_cost as the Field for which you want
summary information.
3. Check Sum, Average, Variance, Minimum,
and Maximum as desired statistics.
4. Specify sum_cost.dbf as the output table and save it in
your j:\GIS\attribdata folder.
5. Click "OK" when done.
A new table is created called sum_cost.dbf that contains 6
records that correspond to the six land use categories. This table contains the statistical
data asked for in step 3.
? Add table to the document and open to view the statistics.

Biology 483: Applications of GIS


Fall 2002

Attribute Data II Page 109

Another option to calculate some basic statistics is to select "Statistics" after right-clicking the
field name.
A window pops up that provides some
basic statistical information. These data,
however, are not stored in the same way as
when you created a summary table. Does
the sum value match any values from the
summary table sum_cost.dbf? (Reopen this
table if it is not already open.)
Why not?
Select only forest polygons in the Land_use theme (use Select by Attributes from the Options
menu in the table) and repeat the procedure to obtain statistics for the selected forest polygons.
Does this value match one of the records in the summary table? It should!
EXPORTING DATA FROM A TABLE
Data can be exported into a dBASE file, Personal Geodatabase file (e.g., INFO file), or a
text file using the "Export" command from the Table Options menu. To export only certain
fields, make only these fields visible. To export only certain records, select those records (e.g.,
by highlighting individually or by using the Select by Attributes option).
Exported data can then be used as tables in text documents (e.g., WordPerfect or WORD
documents), to create charts in other graphics programs (e.g., CricketGraph, SigmaPlot), or for
statistical analyses in other software programs (e.g., SAS, SYSTAT, Statistix, SPSS, etc.).
You will now export a table called cost.dbf that contains three fields (Area, Cost/ha, Total_cost)
and only land use records that are suitable for development from the Attributes of Land_use
polygon table.
? Select only records that are "Suitable for Development" in the Attributes of Land_use table.
? Make only the fields Area, Lu-name, Cost/ha, Total_cost visible in the Attributes of Land_use

polygon table (Hint: Go to Table Properties window by right clicking on table name in TOC).
The table should have only four columns.
? Select Data, "Export" after right-clicking on the table name (or Open table and select

Export from the Options menu).


A new window pops up where you can specify export format, file name, and directory
where you want the file to be exported. (Click on folder icon to navigate to location
where file is to be exported and to select from among file types).
? Specify the export format (dBASE), then the appropriate destination (your
j:\GIS\attribdata folder) and then the name (cost.dbf). Other export format options include

Biology 483: Applications of GIS


Fall 2002

Attribute Data II Page 110

Personal Geodatabase (INFO) or delimited-text (ASCII format).


? Save the project and exit ArcView.

Exporting tables is a very useful tool, since it allows you to transfer data from ArcMAP
to other software packages. For example, imagine you have been asked to develop a predictive
model that explains the number of bird (mammal or plant) species contained within countries
from your last assignment. How might you go about developing such a model? Which of the
data from your last assignment (i.e., which fields) might help predict (or explain) the number of
species within a country? (Don't be too concerned if you do not know about the type of statistical
model needed; it requires some background knowledge in multivariate statistics.) However, from
a technical standpoint, how can you prepare the data that you need from your assign1.mxd
project so that it can be exported for statistical analysis? Many of you will need to master this
skill for your final independent project.
Exercises:
1. Calculate a new field called Sqrt_Length in the Attributes of Road arc table that is the square
root of the Length.
2. Create a summary table of Length from the Attributes of Road arc table with Road_type as the
grouping variable. The table should include Sum_Length, Min_Length and Max_Length.
3. Export a text file from the Attributes of Road arc table that contains Road_type and Length.

You might also like