Skip to Main Content

ArcMap Desktop Introduction: Adding attribute data (join; spatial join)

Join based on common attribute values

You can add you own data in various tabular formats (.dbf .xls .csv or other delimited text) to the attributes of a geographic layer (e.g., polygon, line, or point).  You need to have a locational variable in your own data and one in the target GIS layer that have matching values so that the program can match up the rows correctly (e.g., match a county name to a county name).  Online help: overview; how to join

Right-Click method: Perform a join by right clicking in the Table of Contents on the name of the layer that you want to add data to and look for the Joins & Relates option.  This opens the Join Data dialog box.  Choose the option to join based on attributes.

  • Such a join will add all the columns of your tabular data to the attributes of the geographic layer (shapefile, etc.) in the map project.
  • This method will not alter the attribute table (the .dbf table) of the geographic layer in the underlying file:  it's an on-the-fly link to your data.  A useful alternative is the Join Field tool (described below).

Tool method: See the online help regarding the tools in the Joins toolset.

  • One of these, the Add Join tool, works the same as right-clicking the layer name, but may be more robust for work with larger datasets.
  • The Join Field tool allows you to choose which fields of your data to add as columns to the attribute data, and also will permanently edit the attributes of the geographic layer (NOT just an on-the-fly link to your data in the map document).

Numeric versus text fields: Special care must be taken with the variable definitions, especially when numerals are being used as codes, which should be text (string) variables (e.g., Zip Codes, ANSI codes).  Excel is notoriously awkward about defining and saving such fields correctly, and it's easy to strip leading zeros.  String values must join to string values, and numeric to numeric.   You can use the Table to Table tool to to control the field definition when you export the Excel or other tabular data into a file geodatabase table or .dbf table.

Join based on common spatial location

This also adds more columns to a target layer's attribute table, but:

  • The added data comes from the attributes of another geographic layer, not from purely tabular data.
  • The join is based on the location of features in the layers, rather than on common values in an attribute field.
  • The result will be a new layer (i.e., a new shapefile) that includes the newly expanded attribute table. It doesn't alter the attributes of the original layer that you're joining to.
  • You might typically use this to determine the location of each point in a layer and associate each with the attributes (including geographic identifiers) of a geographic polygon (e.g., a census tract, whose attributes would include the number of the tract).

Right-Click method: Perform a join by right clicking in the Table of Contents on the name of the layer that you want to add data to and look for the Joins & Relates option.  This opens the Join Data dialog box. Choose the option to join based on location. Online help.

Spatial Join tool: There is also a tool method that may be more robust for work with larger datasets. Online help.

Subject Guide

Profile Photo
Mark Thomas
Contact:
233C Perkins Library
919-660-5853
Website