Exercise 5 – Relates and Joins
The objective of this exercise is to help you learn how to set up merging geography with databy joining an attribute file (containing age adjusted deaths from heart disease by counties) to PennsylvaniaCountyshapefile.
- Open ArcMap and Click the Add Data Tooland add PA_County.shp
- Right Click on the PA_County.shp in the TOC and Select Joins and Relates Join…
- You want the join to be PA_County.shp to heart.dbf file using a common attribute. In the Join Data Dialog:
Make sure that Join attributes from a table is selected.
1. Choose the field in this layer that the joint will be based on:
Select FIPS from the drop-down box
- Choose the table to join to this layer, or load the table from disk:
Click the folder icon and navigate to heart.dbf and Click to select it.
3. Choose the field in the table to base the join on:
Select FIPS from the drop-down box
Click the OK button.
You may see this pop-up:
Click No.
- Right Click on the PA_County layer in the TOC and Select Open Attribute Table.
Scroll to the far right of the table to see the newly joined fields.
Close the table.
- Right Click on the PA_County layer in the TOC and Select Properties…
- Click on the Symbology Tab. Select Quantities Graduated Color. Selectheart.AADRHD from the Value: drop-down box. Click OK button.
- Click on View Layout View
- Click on Insert Legend…
- In the Legend Wizard Dialog Box,Click on PA_County in the Legend Itemswindow on the right side. Then Click the Preview Button and then Click the Finish Button. This will add the legend to the layout and you can move it around and place it in an appropriate location.
- Next we will add a title to the map. Click on Insert Title and typeAge Adjusted Death Rates from Heart Disease
Your map should look something like this.
- The join only appears in this map document. To save the join for use in another map document, save the layer to a layer file using the Save Layer To File tool. Click on ArcToolbox icon to view ArcToolbox window. ExpandData Management Tools.ExpandLayers and Table Views thenDouble Click on Save to Layer File
In the Save To Layer File Dialog Box,Select PA_County in the Input Layer drop-down. Then type a name for the output file in an appropriate folder to store it.
- You can also save as a layer by right clicking on the name of the shapefile in the TOC:
1