Introduction to ArcMap: Layers, Attribute Tables & Choropleth Map Creation This class exercise will introduce you to some basic functions of ArcMap along with terminology used in GIS. Specifically this manual will be used to answer the following questions: - How to open ArcMap - What is a layer and how to add them to a map - What is an attribute table and how to navigate basic uses - How to join a database to a layer, so you can visually display the data - How to display data on a map with symbology - How to create a choropleth map The data for this exercise is located on the Blackboard site in Data folder (Peru data.zip). Download this file to your GIS Selective folder, and unzip it to Peru subfolder. The data were downloaded from http://www.colorado.edu/geography/gcraft/warmup/cholera/cholera_f.html Opening a New Map in ArcMap: 1.) Open ArcMap by either double clicking the shortcut , or clicking on Start>All Programs>ArcGIS 9.3>ArcMap. a. Whenever you open ArcMap it will prompt a window to appear and ask if you would like to open a new map or an already existing map. For this exercise choose to open a new empty map. What is a Layer in GIS: A layer is the visual representation of a geographic dataset in any digital map environment. Conceptually, a layer is a slice or stratum of the geographic reality in a particular area, and is more or less equivalent to a legend item on a paper map. On a road map, for example, roads, national parks, political boundaries and rivers are examples of 1 different layers (from the ESRI GIS online dictionary). In ArcGIS those geographic datasets are found in a wide variety of formats, such as coverage, feature class, and raster image. For this class we will be working only with feature class data, called shapefiles. The following definitions have been taken from the ESRI online GIS dictionary (http://support.esri.com/index.cfm?fa=knowledgebase.gisDictionary.gateway). Shapefiles = “A vector data storage format for storing the location, shape, and attributes of geographic features." (ESRI Online Dictionary). A shapefile is stored in a set of related files and contains one feature class. Shapefiles will be the most commonly created and used type of data during this semester. There are three types of shapefiles we will be working with in this exercise: Line, Point and Polygon. a. Line = A map feature that has length but not area at a given scale, b. such as a river on a world map or a street on a city map. = A map feature that has neither length nor area at a given Point c. scale, such as a city on a world map or a building on a city map. = A map feature that bounds an area at a given scale, such as Polygon a country on a world map or a district on a city map. Adding Layers to ArcMap: 1.) Opening the Add Data Window a. At the top of ArcMap you will see that there are a number of toolbars, clicking on the Add Layers button is one way you can prompt the Add Data window to appear. b. Another way to open the Add Data window is to click on File at the top and scroll down to Add Data… 2.) Adding Layers a. At the top of the Add Data window there is a drop down box titled Look in: click on the dropdown tab and direct it to where the data for this 2 exercise is located C:\GIS Selective\Peru\. Note (Your data path may be different from the one described here). b. There should be seven different shapefiles and one table in dBF format that appear when you are looking in the Peru folder. There are: i. CITIES.shp ii. CNTRYLIN.shp iii. COUNTRIE.shp iv. DEPARTME.shp v. LAKE.shp vi. RIVERS.shp vii. ROADS.shp viii. EPIDEMIC.dbf c. Click on CITIES.shp and then click the Add button. This will add the layer to your map. i. You will notice that your ArcMap screen is broken into two sections: on the left is Table of Content where you will see the name of the layer that you added along with a colored point designating that the data you added was a point shapefile. ii. On the right side on your map screen you map will now contain a number of points spread out over the map. d. On the left side of your map double click the point to bring up the Symbol Selector Screen. You will notice that you can change the symbol, size and color of the point. e. Under Options click on the Color: drop down box and change the color of the point to red. 3.) Add the Rest of the Layers a. Repeat steps 1 and 2 adding all the other six shapefile layers and the single dbf. You can hold CTRL key down and highlight all the files you want to 3 add to your map at once. Practice opening the symbol locator and selecting a specific color for each shapefile. Your map should now look similar to the following (allowing for different colors): Navigating and Using the Attribute Table: Attribute Table = “A database or tabular file containing information about a set of geographic features, usually arranged so that each row represents a feature and each column represents one feature attribute” (ESRI Online Dictionary). 1.) Opening an Attribute Table a. On the Left side of your Map, Right Click on DEPARTME and scroll down to Open Attribute Table. 4 b. Take a few minutes to examine and search the features of the Attribute table. Note that the Name field contains the names of the Departments in Peru, and that ID contains a numeric ID for each department. 2.) Selecting in the Attribute Table a. Selecting certain features (=rows) in the attribute table is an important tool that allows you to see the location of these features on the map. These selected features can be turned into their own separate layer. There are two ways to make a selection in the Attribute Table: (We will select the Department of CALLAO as an example) i. You can select the Department of Callao by scrolling down to it and clicking on the gray part of the line on the left side of the attribute table. 1. After Selecting move the attribute table by clicking the blue boundary at the top and dragging it. This way you can see the highlighted outline of the CALLAO area. 2. When done viewing, clear your selection At the top menu bar: SelectionClear Selected Features ii. Another way to select an attribute is through the Select by Attributes window. This will become necessary to know how to navigate when working with larger datasets. 1. At the bottom of the attribute Table click the Options button. 2. Scroll up to Select by Attributes. 3. This will open the Select by Attribute Window. You will write an expression in SQL (Structured Query Language) to select the Department of Callao. a. For the Method dropdown box click Create a new selection. b. Double click “Name” c. Under the math functions click “=” d. Click the Get Unique Values e. Double click “CALLAO” f. At the bottom click Apply g. Click Close Your Window should look like the following: 5 When done Clear the Selected features 3.) Calculating Summary Statistics a. Scroll the attribute table to right so that you can see the Area field. b. Right Click the top of the Area field and Scroll down to Statistics… c. This will open up a Graphical window that contains descriptive statistics on that field. 6 d. You can use the drop down box to examine the descriptive statistics of other variables in the attribute table. Labeling features on the map Double click on the DEPARTME layer and select Labels tab. Chose the field from the attribute table that you want to use for labeling (remember that Names has the names). You window should look like this: Click OK. At this point you only indicated what the features should be labeled with. To activate the labeling, right click on the name of the layer and choose to Label features. After this you should see the names of the Departments on the map. Joining a Table to a Layer: Joining = “Appending the fields of one table to those of another through an attribute or field common to both tables. A join is usually used to attach more attributes to the attribute table of a geographic layer.” (ESRI online dictionary). When working on various GIS projects you will find that research data does not usually come in already created shapefiles, but instead requires the user to 1.) Find a suitable boundary map layer to describe the data within, 2.) Make sure that the boundary layer has a unique identifier that can be associated with the database, and 3.) Create the link between the layer and database. To illustrate how this process is done we will work with 1991 Cholera epidemic data from Peru. The first step of this process has already been done for you since we have a map of Peru, so we will move onto the second step. 1.) Choosing a Map with a Unique Identifier a. Open the EPIDEMIC table that has been added to your map. 7 i. If you do not see the EPIDEMIC table in your Layer View window on the left side of the map, Click the Source tab at the bottom. This table contains the following data on Cholera epidemic in Peru in 1991: Name IDCode CASES91 HOSPITZD91 DEAD91 TPOP89: THOSPBDS88 DISTCOAST PDECCASE91 RURALPOP93 POTABLEWAT DOCTORS93 PCTRURALSE DEPARTMENT NAME UNIQUE IDENTIFIER NUMBER OF CHOLERA CASES REPORTED IN 1991 NUMBER OF CHOLERA CASES HOSPITALIZED IN 1991 NUMBER OF DEATHS DIAGNOSED AS CHOLERA, 1991 TOTAL POPULATION IN 1989 TOTAL HOSPITAL BEDS IN 1988 DISTANCE FROM PACIFIC COAST TO CENTROID OF DEPARTMENT, CHECK UNITS AGAINST PAPER MAP PERCENT OF PEOPLE W HO DIED OF CHOLERA AFTER INFECTION RURAL POPULATION IN 1993 NUMBER OF PEOPLE IN RURAL AREAS WITH ACCESS TO CLEAN WATER TOTAL NUMBER OF DOCTORS IN 1993 PERCENT OF RURAL POPULATION THAT HAS ACCESS TO SANITARY SEWER 8 b. Review the fields in the EPIDEMIC database file. Which field contains a unique identifier that could be used in connecting to a map? c. Keeping the EPIDEMIC table open, open the attribute tables of the layers individually to look for a unique value that could be matched to an EPIDEMIC field. i. Out of the six layers which two have a matching unique identifier? What are their field headings? 2.) Conducting a Join a. Right Click the DEPARTME.shp file and scroll down to Joins and Relates, select Join… b. This will open the Join Data window which allows you to join existing tables to the attribute table of the selected shapefile. You will notice that the window follows a logical sequence of questions to fill in the dropdown boxes. i. For Drop down box titled What do you want to join to this layer: Join Attributes from a Table ii. For Drop down box titled Choose the field in this layer that the join will be based on: click the ID. iii. For Drop down box titled Choose the table to join to this layer, or load the table from disk: select EPIDEMIC. iv. Make sure to click on the Show the attribute tables layer in this list. v. For Drop down box titled Choose the field in the table to base the join on: select IDCode. vi. Make sure to click the Keep only Matching records vii. Why might we not want to use name? viii. Click OK 9 ix. Click OK 3.) Open up the DEPARTME.shp Attribute Table to check to see if the fields from EPIDEMIC table have been added. Creating a Choropleth Map Choropleth Map = “A thematic map in which areas are colored or shaded to represent the density of a particular phenomenon or to symbolize classes within it.” (ESRI Online Dictionary). One of the primary functions of using ArcGIS is to created descriptive maps that can be used to illustrate spatial distribution of a variable. We will create a choropleth map showing the number of deaths diagnosed as cholera for each region. 1.) Using Symbology to Display a Variable a. Right click on DEPARTME.shp and scroll down to properties. b. In the Layer properties window, click on the Symbology tab. i. In the left side box titled Show: click Quantities to expand the options beneath. ii. Click on Graduated colors. iii. In the Fields box use the Value: dropdown box to select EPIDEMIC.DEAD91. 10 iv. Click OK Your Map should now look like the following (Allowing for Color Variations): Practice Your GIS Skills Learned Today: 1.) Create map illustrating the rates of cholera infection and a map of rates of cholera death. You would have to use the Normalization option in Symbology tab to divide the number of cases by the total population (for the rates of cholera infection map). Your window should look like this: Examine the maps and answer the following question. Where were the rates of cholera infection the highest and what factors might account for this pattern? Use similar normalization to create the rates of cholera death map. 11 What field did you use in Normalization fir this map? Where were the rates of cholera death the highest and what factors might account for this distribution? 2.) Once completed creating your maps you will need to place them in the layout view with a legend and title. a. At the top of ArcMap click View and scroll down to select Layout View. b. Finally you will need to add a title and legend. At the top of ArcMap click Insert and Scroll down to Title, repeat the same for adding a legend. c. When you insert the Legend the Legend Wizard window will appear. i. The Legend Wizard follows a logical pattern select the necessary items moving to the next item. 12 d. Once you have added the Legend and Title you can click on them to move them around the map so that they are positioned to your liking. 3.) When you have completed the maps with a title and Legend, you can either print the maps to hand in, or export to a JPEG for digital submission. 13 Further Reading (from http://www.colorado.edu/geography/gcraft/warmup/cholera/cholera_f.html) Centers for Disease Control, Enteric Disease Branch, Division of Bacterial and Mycotic Diseases. 1992. Update: Cholera -- Western Hemisphere, 1991. Journal of the American Medical Association. Vol. 267 no. 10: 1320. Mata, Leonardo. "Cholera El Tor in Latin America, 1991-1993" in Disease in Evolution, Global Changes and Emergence of Infectious Diseases, Mary E. Wilson, Richard Levins, Andrew Spielman (editors). The New York Academy of Sciences, New York. pp. 55-68. Frerichs, Ralph R., 2000. Dr. John Snow: a Historical Giant in Epidemiology. (http://www.ph.ucla.edu/epi/snow.html) Glass, Roger I., et al. 1991. Cholera in Africa: Lessons on Transmission and Control for Latin America. The Lancet. Vol. 338, Sept 28, 791-795. Reyna, Carlos and Antonio Zapata. 1991. Crónica sobre el cólera en el Perú. Desco: Centro de Estudios y Promoción del Desarrollo. Seas, C., J. Miranda, A. I. Gil, R. Leon-Barua, J. Patz, A. Huq, R. R. Colwell, and R. B. Sack. 2000. New Insights on the Emergence of Cholera in Latin America During 1991: The Peruvian Experience. American Journal of Tropical Medicine and Hygiene 62 (4): 513-517. Tauxe, Robert V. and Paul A. Blake. 1992. Epidemic Cholera in Latin America. Journal of the American Medical Association. Vol. 267 no. 10: 1388-1390. Webb, Richard and Graciela Fernández Baca de Valdez. 1990[?]. Peru en numeros, 1990. Cuánto S.A. Webb, Richard and Graciela Fernández Baca de Valdez. 1992. Peru en numeros, 1992. Cuánto S.A. Wolford, Kathryn. 1991. Peru in the Time of Cholera. The Christian Century. October 23, 1991. 14