ArcMap Instructions

 


Intro to ArcMap | Adding Data | Attribute Tables | Joining Tables | Mapping New Items | Selection Methods | Editing Attributes | Creating a Layout


 

1.  Introduction to ArcMap

 

You can start ArcMap in two ways: 1) by double clicking on the "Campaign.mxd" file in the folder where you placed the files for this assignment; or 2) by locating and starting ArcMap from the Windows Start menu and then using the File | Open command and then moving the folder with the "Campaign.mxd" file and selecting it.

 

You should see a map like this:

strongholds

 

The ArcMAP Interface

 

The Toolbars  

Toolbars can be moved around in ArcMap.  If the toolbar you need is missing, go to: View | Toolbars OR right-click on a gray area at the top, right corner of the screen.  A list of toolbars will pop up, you can select the one you need from here.         

   

Standard Toolbar

Layout Toolbar

        
 

 

Drawing Toolbar

Saving Your Work

ArcMap files are saved as .mxd  files.  This are like "bookmark" files that keep a record of where you are in your work. In ArcMap this includes keeping track of all the map files you are using, symbols, text, and other elements you have added to your map. Note that the actual data, the shapefiles and database files, are independent of this project.  These files must be saved to your disk as well.

To save your work, choose File | Save As.  Give your project an appropriate name, and save multiple copies of your work as you go.


2.  Attribute Tables

To view the attribute/data table associated with the states layer, right-click the states layer in the left corner of your screen. 

open attributes

 

 

Choose Open Attribute Table from the menu.  You will see a table open in a new window, like this.

 

Closely examine the contents of this table. It contains a variety of demographic information for each state. 

 

Next we will add the database file electiondata-1988-2008.xlsx to the ArcMap project.  Use the Add Data add data button to navigate to this file.  Once added to the project, we will see the table icon appear in the list of data layers on the left-hand side of the screen.  Notice that you are now viewing the data sources (or directory) of layers rather than how the layers are displayed.  Toggle between the two tabs at the bottom of the data layer menu (bottom left corner) to see the difference. 

 

To view the contents of the electiondata-1988-2008.xlsx  file, right-click the layer name next to the table icon and choose Open from the menu.

Closely examine the contents of this table as well.  It contains election data dating back to 1988..

 


 

 

It is important to remember the difference between an attribute table and a database file.  Both terms describe tables, yet they are stored in different formats.  An attribute table is data associated with a shapefile or the geographic information necessary to display the map features.  An attribute table will always contain fields that describe the shape (such as point, line, or polygon) or spatial coordinates of features.  A database file does not necessarily contain this spatial information, and is not associated with a shapefile by default. 

 

An attribute table may also contain other data, such as demographic or census data, or it may not.  It may be up to you to gather the information you need for your analysis.  If you wish to add information to the attribute table, you may do so using a database file.  You may have worked with database files previously using Microsoft Excel.  A database file may contain any variety of information that you wish to display and query using the GIS.  In order to associate this data with the attribute table (or the shapefile/geographic information), you must join the database file TO the attribute table.  Once a join has been performed, the information in the database file is now linked to the shapefile.  You can then perform queries and map features based on the "new" attributes, or the data added from the database file. 

 

 


 

3.  Joining Tables

For this project, we want to combine the election data in the electiondata-1988-2008.xlsx  file to the attribute table associated with the shapefile states layer.  In order to perform the join, we must first identify a common field between the two tables.  In other words, we must have one column of information in the attribute table that is EXACTLY the same in the database file.  This is necessary for the data to be correctly associated with each feature, or row.  Sometimes a numerical code is used for this common field, such as FIPS code.  For this join, we will use a common field called STATE_NAME

To join these tables, right-click the states data layer and select Joins and Relates | Join... from the menu. 

You will see a menu that requires three types of information: 1) a variable in the attribute file that matches one in the database file; 2) the location of the database file; and 3) the variable in the database file used to match the attribute file.

picking spreadsheet

Since you are using an Excel workbook, the dialog box will also ask about the particular sheet of the workbook you'll be using--"electiondata$"

Using the following settings to make the join:.

Choose OK to finish the join.

Now reopen the states attribute table.  You will notice that the election data from the database file has now been added to the states attribute table.  Look at the column names for further verification.  You will see that columns originating from the attribute table are headed by states.xxxx (followed by the name of the field/column) and columns from the database file are headed electiondata-1988-2008.xxxx.  This helps you keep track of which file is being used to provide data for your map.

If you made a mistake during the join, this is no problem.  Simply right-click the states layer, and choose Joins and Relates | Remove Joins | electiondata$.  This will undo the join, and you can try again.


4.  Mapping the Data

Now that we have election statistics associated with the shapefile, we can explore ways of displaying this data using the states map.  To change the symbology, right-click the states data layer and choose Properties.  Next, select the Symbology tab. 

As you can see, all of the features (states) are currently being represented using the same symbol.  You may click on the symbol to change it.  You may also represent the features using other methods such as: unique values (under categories) and graduated colors (under quantities).  You will learn about symbology selection and proper classification methods in class.  Here it is simply noted that these options are available using this menu. 

Notice that under the Value and Normalization fields, all of the data in the joined tables (attribute + electiondata) is available to you.

Example:  Mapping Population Density

Population density is defined by the total population of a unit divided by the unit area.  In this case, a variable in the file has this information. This can be used to create a graduated color map.  Examine the following settings:

Hint:  Normalization also means "divide."

Here is the resulting population density map:

 

Does the map appear as you would expect?

Notice the legend that now appears under the states data layer (and also in the layout).  Each category is represented by its own symbol.  Symbols and labels may be changed in the data layer window.  Left-click once on the label (it will highlight), pause, then click one more time.  A cursor will appear, and you can edit how the category is labeled.  For example: 1) use Low, Moderate, High or a meaningful word to describe the data instead of numeric values; 2) round numbers to a consistent decimal place or eliminate decimals all together. 

Labels may also be changed in the Properties | Symbology menu.  One click on the label will allow you to edit the text.  This will be important when you are ready to make the final layout of your map.


5.  Selection Methods

Selection tools allow you to isolate features of interest within the dataset.  You may choose to explore different spatial or statistical relationships within your selection, or simply choose to represent a selection using different symbols.  Features may be selected one of three ways using ArcMap:  1) Interactive Selection (using your mouse as a pointer);  2) Select by Attribute (or query attributes); and 3) Select by Location. 

At the top of the screen you will see the Selection menu.  

Interactive Selection

When using the Interactive Selection Method, the first step is to set the selection method.  Depending on the method you choose, a double click of the mouse will either create a new selection, add to the current selection, remove from the current selection, or select from within the current selection. 

After choosing a method, use the Select Feature tool  found in the toolbar and double left-click on a feature of interest.  In this example, you will see that a state is highlighted, or outlined in cyan. 

Note:  The ArcMap Selection tool is set on "Create New Selection" by default.  If you wish to quickly add to a selection, or select more than one feature at a time, hold down the shift key while pressing your mouse button.  You may select as many features as you like using this method.  If you release the shift key and click again, you will lose the selection. 

Select by Attributes

This method allows you to select features based on a desired attribute or range of attribute values.  The Select by Attributes menu allows you to perform the query two ways.  The first is using the SQL calculator. 

For this example, I decided to use the Select by Attributes tool to identify my democratic strongholds.  For my strategy, I define a democratic stronghold as a state that has had a democratic popular vote victory in the last three elections.  To query for this information, I used the SQL calculator as shown below.  The selected states shown in the map on the right match this criteria.

query dialog

Once I press "Apply" the selected states are highlighted.

 

Select by Location

This method of selection is useful when you want to identify features within a defined spatial relationship.  For this project, you will probably not select features based on location, but it is a very handy ArcMap tool that is worth knowing about.  Take a bit of time to explore the options in this menu. 

Saving a Selection as a Layer File

 

Once you have created a selection you want to keep, the next step is to create a layer or a shapefile from the selected features.  This makes the selection more permanent.  You can then modify the symbology, turn the data on and off as needed, or add it to a different ArcMap (.mxd) file.

 

To create a layer file, right-click the states data layer after you have finished your selection.  Choose Selection | Create Layer from Selected Features.

A new layer file will be added to the data layer window.  You can change the symbology and the layer placement as you wish.  This is only a temporary setting, however.  If you wish to make this layer more permanent, right-click the new layer and choose Save As Layer File.  Select an appropriate location to store the file, and click OK.

 

To create a shapefile, right-click the states data layer after you have finished your selection and choose Data | Export Data.  In the menu, choose to export the selected features using the same coordinate system as the layer's source data.  Select an appropriate location to store the file, and click OK

 

What is the difference between a shapefile (.shp) and a layer file (.lyr)?

A shapefile is a geographic map, containing all the spatial information needed to display this data.  A layer file is comprised of data linked to places on the shapefile (or the states.shp).  Both files types will work for this project. 

 


 

6.  Editing Attributes
 

Adding a Field

 

To add a new field/column to an attribute table, first open the table (right-click the states layer and choose Open Attribute Table).  Press the Options button on the left and choose Add Field

add field

 

The next menu has you type a name for the new field and choose a data type and precision (place values).  Make sure that you enter this information correctly; it cannot be changed after the field is created. 

 

Example:

 

 

 

Calculating Values

 

To calculate values for a field, it is best to start an editing session.  An editing session allows you to modify the shapefile (including its attribute) and save the changes. 

 

To start an editing session, first open the toolbar (View | Toolbars and check Editor).  Use the Editor drop down menu and select Start Editing.

Make sure the target layer is set to states

 

 

 

Now right-click the heading of your new field and select Calculate Values.  You can use this SQL calculator to assign the new values to the field.  Your instructor will give you ideas on how to calculate data for this project.

 

To edit attributes in an existing field, click on a cell and type over the text.  If you like what you have changed, save your edits by going to the Editor drop down menu, and select Save Edits.  When you have finished making changes to the table, choose Stop Editing, also from this menu.  It is important to remember to start and stop editing sessions as needed.  Some ArcMap functions will not be available to you if you are in an editing session, and changes to the shapefile can only safely be made during an editing session.  Use the Editor toolbar to verify your settings if you have trouble.

 

Note:  You may not Add Field during an editing session.  The option will be grayed out.  Stop Editing to perform this function.

 

If you wish to delete a field, right-click on a field heading and choose Delete Field.  It will give you a warning message that this step cannot be undone.  Click YES if you are sure you want to continue.

 


 

7.  Editing your Layout

If you are in Data View, switch to Layout View using this toolbar:  (bottom left). 

The map will appear on a layout page with the same settings as in the Data View (or the globe, the arrows mean "refresh").  You may make changes to the map and go back and forth between these views as you wish.  Remember to use the Layout Toolbar (see Intro to ArcMap section) when zooming around in Layout View.

 

You can edit any element of your layout. Double click on the element you wish to change and then follow the menus.

You can also use the Drawing Tools to add objects to the layout (Customize | Tools | Draw ).  These functions are very similar to Micros oft Word.

 

For precision alignment, use the Snap to Grid feature.  Go to Customize | ArcMap Options  Make the grid spacing smaller, and check Snap elements to | Grid.

 

grid settings

 

 

After you have added the map elements to the layout, you may make changes to them.  Double-click on any map element to modify the font, line sizing, legend settings, or scale bar/north arrow selection.  Experiment with different settings (sizes, colors, and positioning) to ensure that your layout has good visual balance.

 

And don't forget to include the cartographer's name!


 

Intro to ArcMap | Attribute Tables | Joining Tables | Mapping New Items | Selection Methods | Editing Attributes | Creating a Layout |


Last revised 2011.9.9. KEF