GIS Intro for Medical Geography
Objectives
By the end of this tutorial, you should understand:
The Yale Map CollectionAt Sterling Memorial Library
130 Wall Street, Room 707 / Stacey Maples – GIS Assistant
203-432-8269 /
Geog_And_Epid2.Doc / Page 1 of 22
- How to Open spatial data in ArcMap
- How to create a spatial data layer from tabular coordinates
- How to subset data by spatial overlay
- How to Join tabular data with spatial boundary files
- How to apply symbology based on data values
- Where to find spatial data for you projects
- The difference between viewing and managing spatial data in Windows Explorer & ArcCatalog
- How to navigate in the Data & Layout Views of ArcMap
- How to create basic map layouts with essential map elements
- How to export your map layout s to jpg & pdf formats for sharing your work with others
- How do measure distance from many features to many features using raster
- How to create counts of one set of features within another
The Yale Map Collection
At Sterling Memorial Library
130 Wall Street, Room 707 / Stacey Maples – GIS Assistant
203-432-8269 /
Geog_And_Epid2.Doc / Page 1 of 22
Getting Ready for the Tutorial
Sign Up for the GIS-L Listserv
The Yale University GIS-L Listserv is an internal University message system, devoted to GIS use and issues at Yale. The list is the primary source for updates on software and license server issues, data acquisitions and workshop announcements. All GIS users are encourages to sign up for the list. The GIS-L list is very lightly used, so that you will not be overwhelmed with messages that are not relevant to you.
- In your Web Browser, Go To the Map Collection Website, at
- Under the Quick Links section on the right,, Click on the “Sign up for the Yale GIS-L Mailing List” link to go to the GIS-L registration page.
- Enter your Email Address and Choose a Password.
Note: We suggest that you not select the Daily Digest feature.
- Click on the Subscribe Button to finish.
You should receive a confirmation email shortly afterward, with instruction on how to use the GIS-L list.
Download the Data
The datasets used in this tutorial are available for download on the Map Collection Website. Feel free to download and use these tutorial materials, as you wish, and to pass them along to interested colleagues.
- Return to the Map Collection Homepage, in your Web Browser.
- Under the Quick Links Section on the right, Click on the “Download Gis Workshop Materials” link.
- Find the “Data” Link for the ArcGIS 9.2 “GIS Intro for Medical Geography” and Right-Click on the Link.
- In Firefox, Select “Save Link As,” in Internet Explorer,Select “Save Target As…”
- Depending on your browser and setup, you may be offered a Browse Window, to select the folder into which you want the downloaded file placed. If so, Browse to a Folder on your hard drive that you have write permission for. For this tutorial, we will assume that you are using the C:\temp folder of the machine you are working on.
- Clicking on the Create New Folder Button, Create a New Folder, using your initials as the name of the folder, so that you end up with a full path something like: C:\temp\your_initials\
- Save the Downloaded File to this New Folder.
Unzip the Data
You should now have a file called “01-Introduction to ArGIS_92.zip” in your new folder. It is now necessary to decompress, or unzip, the tutorial data for use. Note that in Microsoft Windows XP and Vista, it is possible to “Explore” a compressed file, as if it were a folder. ArcMap does not support this type of browsing, so it is necessary to actually unzip the file for use. This part of the tutorial assumes that you are using Windows’ built in Compressed File support.
- Browse into the Folder where you saved theMed_Geog.zip file.
- Right-Click on the File and Select “Extract All…”
- ClickNext to arrive at the window shown at the right.
- Under “File Will Be Extracted To This Directory:” Remove the Med_Geog\ part of the Path Name (this is redundant, as the zip file contains a directory structure of its own).
- ClickNext to Extract the File.
- Once the extraction has completed, you can Uncheck “View Extracted Files” and ClickFinish.
Explore the Data in Windows Explorer
Now you will take a look at the data you have extracted, using Windows Explorer. This part of the tutorial is designed to familiarize you with the difference between how Windows recognized common spatial dataset filetypes, and how ArcGIS recognizes them.
- Browse into the extracted C:\temp\your_initials\Med_Geog\Data\Shapefile Folder Folder.
You should now see a number of different files, some of which have the same filename, but with different extensions (Windows doesn’t always show file extensions for known filetypes, such as dbf, or shp, in some cases).
- If necessary, Click on the Name Field Header in the Explorer Window to Sort the files By Name.
What is critical to recognize about the contents of this folder is that all of the files with the same filename are actually part of a single “shapefile.” The shapefile is ESRI proprietary vector data format. The fact that it is called a shapefile can cause some confusion, since it is actually a collection of files.
Explore the Data in ArcCatalog
Now you will take a look at the same data using the ArcGIS version of Windows Explorer, which is designed to interact with these types of spatial data filetypes.
- Go To Start>Programs>ArcGIS> and Launch the ArcCatalog program.
- Using the “Catalog Tree” Panel, at the left side of the Arccatalog application window, Browse to your C:\temp\your_initials\Med_Geog\Data\Shapefile Folder.
- Make Sure that the “Contents” Tab at the top of the “Catalog Display” on the right side of the ArcCatalog Application Window is active.
Note the difference in how ArcCatalog and Windows display shapefiles. ArcCatalog ‘knows’ that a shapefile is actually a collection of files, as so it only shows you a single file, where Windows Explorer showed all of the files. You should always use ArcCatalog for Moving, Deleting, Copying, etc… any spatial data files, for this reason. Using ArcCatalog for these tasks prevents critical parts of the spatial data files from being ‘left out’ and rendered useless.
You should now see something like what is shown above. Take a few seconds to familiarize yourself with the ArcMap interface.
- The Main Menu should be familiar to anyone who uses Microsoft Windows software. It is where you perform basic file and document editing functions.
- The Table of Contents is the area where your data layers will be listed and where you can interact with and alter the properties of individual layers.
- The Add Data Button is located on the “Standard” Toolbar and opens a dialog box that allows new layers to be added to the Table of Contents and Map Document. It should not be confused with the Open Document button, which is located on the same toolbar, but is not unique to ArcMap.
- The Map Display is the area where your map data will be displayed.
- The “Tools” Toolbar contains a series of tools that operate on the data displayed in the Map Document Window.
- The View Toolbar changes between the Data View and Layout View of the Map Document.
Adding Data to the ArcMap Interface
- Use the Add Data Button to Open a Browse Window and Browse to your C:\temp\your_initials\Med_Geog\Data\Shapefile Folder.
- Hold down the CTRL Key and Select the three shapefiles, as shown on the right.
- Click Add.
You should now see that three layers have been added to you Table of Contents Panel.
- The Point file is a layer that describes the location of Non-Ferrous Mining operations in the U.S..
- The Line file describes the location of Hydrological features (Rivers, Streams & Lakeshores) in the State of Missouri.
- The Polygon file describes the CountyBoundaries of the State of Missouri.
Navigation in ArcMap’s Data View
- Select the Zoom InTool from the Tools Toolbar.
- Drag a Box across the State of Missouriin the Map Display Panel to ZoomInto the Data View.
- Click on the Back To Previous Extent Button to Return to the Previous Map Display View.
- Click on the Fixed Zoom Out Button to Zoom Out of your Map Display at fixed intervals.
- Select the Pan Tool from the Tools Toolbar and use it to Move your Map Display.
- Click on the Full Extent Button to Zoom Out to the extent of the Layer in your Map Document with the largest extent.
- Right-Click on the tgr29001cty00_Merge Layer and Select “Zoom To Layer” from the Context Menu.
- Finally, on the Main Menu, Go To View>Bookmarks>Create to Create a Bookmark, called Main View, of the current extent of your Map Display.
Data Preparation and Creation
Setting an Appropriate Projection
- Right-click on the “Layers” layer at the top of the Table of Contents Panel and select Properties.
- Click on the Coordinate System Tab.
- Click through the Hierarchy of coordinate systems to the Predefined>Projected Coordinate Systems>State Plane>NAD 1983>NAD 1983 StatePlane MissouriCentral FIPS 2402.prj.
- Click OK to apply the State Plane coordinate projection.
Subset using Selection by Location
- On the Main Menu, Got to Selection>Select by Location.
- In the Select by Location Dialog, set the options as follows:
- I want to: select features from
- the following layer: minop6x020
- that: intersect
- the features in this layer: tgr29001cty00Merge
- Click OK to close the window and apply the selection.
Note that the points from the minop6x020 Layer that are within the State of Missouri are now selected, which is indicated by the fact that they are highlighted blue.
- Right-click on the minop6x020 Layer in the Table of Contents Panel and go to Data>Export Data.
- Leave the “Export: Selected Layers” setting as is.
- Change the “Coordinate System” Setting to “the data frame.”
- Browse to the C:\temp\your_initials\Med_Geog\Data\Shapefile Folder and save the exported file as MO_Mines.shp.
- Click OK.
- When prompted, click Yes to add the layer to the Map Document.
- Right-Click on the original minop6x020 Layer and Remove it.
Working with and Converting Tabular Data
Adding Tabular Data to the Map Document
- Use the Add Data Button to Open a Browse Window and Browse to your C:\temp\your_initials\Med_Geog\Data\Tabular Folder.
- Note that there are several tabular datasets, including two Excel Files. ArcMap treats Excel files as if they are Folders, since they can contain many ‘worksheets’. Double-click on the TRIS_LEAD_Release_sites_lbs.xls file to “browse” into it.
- Select the 'stfa-releases$' worksheet and click Add.
Note that the Table of Contents Panel view changes to show that you have added a layer that currently has no explicit geometry.
- Right-click on the 'stfa-releases$' Table and Open it.
Displaying XY Coordinates from a Table
Note that there are two fields that contain Lat/Lon coordinates. These fields can be used to create a spatial data layer.
- Close the Table.
- Right-click on the 'stfa-releases$' Table again and this item select ‘Display XY Data’
- In the resulting window, Click on the Edit Button.
- Click on the Select Button and Browse to the Geographic Coordinate Systems>World>WGS 1984.prj Projection and click Add.
- Click OK.
- Click OK again to Display the XY Data.
- You will be warned that the data you are displaying does not have an Object ID field, Click OK to continue.
You should now see that an array of points have been added to your Map Document, as well as an Events Layer, in the Table of Contents Panel. Note that this layer is only, at this point, a ‘Display’ of points, based on the coordinates in the table. To measure anything relative to these locations, it is necessary to convert this display to an actual shapefile.
- Right-click on the 'stfa-releases$' Events Layer in the Table of Contents Panel and Select Data>Export Data.
- Click on “the data frame’ for the coordinate system option.
- Browse to the C:\temp\your_initials\Med_Geog\Data\Shapefile Folder and save the export file as MO_Lead_Releases.shp. Click Add.
- Click OK and ‘Yes’ when prompted to add the exported layer to your Map Document.
- Right-Click on the ‘stfa-releases$' Events Layer and Remove it.
- Click on the Display Tab at the bottom of the Table of Contents Panel.
- Right-click on the MO_Lead_Release Layer and Open the Attribute Table.
Joining Tabular Data to Boundary Files
Examining the Data and Identifying a Keyfield
- Use the Add Data Button to Open a Browse Window and Browse to your C:\temp\your_initials\Med_Geog\Data\Tabular Folder.
- Browse into the MO_Lead_CountyLevelSummary_2005.xls Excel file by Double-Clicking on it.
- Select the Clean$$ Worksheet and Click Add to add it to the Map Document.
- Right-Click on the Clean$$ Table and Open it.
Note the data contained in this Table includes counts of children under 6 with elevated blood lead levels, as well as other parameters relevant to the testing. Also, there is a field called ‘CNTYFPS’ which has the countyFips Codes for each County record in the dataset.
- Right-Click on the tgr29001cty00_Merge layer and Open it Attribute Table.
Note that this Boundary File Layer also has a FIPS Code field called ‘FIPSSTCO’, but that it is a concatenation of the State & County FIPS Codes. We need to alter the field in one to the tables in order to use this field as a ‘keyfield’ to join the two datasets with. The Clean$$ table will be the easier to alter.
Creating and Calculating a New Field
- Excel Files are not editable in ArcMap, so we must either use Excel to edit, or export the table to a format that can be edited in ArcMap.
- Click on the Options Button at the bottom of the Clean$$ Table and Select Export.
- Save the table as Clean.dbf, in the C:\temp\your_initials\Med_Geog\Data\Tabular Folder.
- Remove the Clean$$ Table from the Map Document.
- Open the Clean Table from the Table of Contents Panel.
- Click on the Options Button at the bottom of the Clean Table and Select Add Field.
- Name the new field ‘FIPSSTCO’; of type: Text; and with a Length of 10.
- Click OK.
- Scroll to the right to find the newly added ‘FIPSSTCO’ field.
- Right-click on the ‘FIPSSTCO’ field header and select “Field Calculator.”
- In the argument window, enter the argument: “29” & [CNTYFPS]
- Click OK to calculate the field.
You should now have a field whose values match those in the boundary file, tgr29001cty00_Merge.
Joining Tabular Data to a Boundary File
- Right-click on the tgr29001cty00_Merge Layer and select Joins and Relates>Joins.
- Select Join Attributes from a Table.
- Select ‘FIPSSTCO’ in drop-down 1.
- Select ‘Clean’ in drop-down 2.
- Select ‘FIPSSTCO’ in drop-down 3.
- Click OK.
- Click OK when prompted to Index the Join.
- Open the Attribute table of the tgr29001cty00_Merge Layer and note that the fieldnames are now prefixed with the name of the dataset from which they have been joined.
Just as with the Events layer, you must export the joined datasets to a new layer in order to calculate any new parameters within the attribute table.
- Close the Attribute Table of tgr29001cty00_Merge Layer.
- Right-click on the tgr29001cty00_Merge Layer and Select Data>Export Data.
- Change the coordinate system setting to “the data frame.”
- Browse to the C:\temp\your_initials\Med_Geog\Data\Shapefile Folder and save the export as MO_Child_Lead_Ex.shp.
- Click Add.
- Click OK to Export the dataset.
- Click Yes when prompted to add the layer to the Map Document.
- Remove the Clean Table and the tgr29001cty00_Merge Layer.
Applying Symbology to Visually Examine Data
- Right-click on the MO_Child_Lead_Ex Layer and Open the Properties.
- Click on the Symbology Tab.
- Click on the Quantities item under the Show Panel.
- Select ‘CONFIRMED’ as the Value Field.
- Select ‘NUMTESTED’ as the Normalization Field.
- Click OK to Apply the Symbology.
Measuring with ArcMap
Counting the Number of Lead Release Sites in a County
- Right-click on the MO_Child_Lead_EX Layer and Select Joins and Relates>Joins.
- Change the first drop-down to “Join data from another layer based on spatial location.”
- Select MO_Lead_Releases as the “Join Layer”.
- Browse to the C:\temp\your_initials\Med_Geog\Data\Shapefile Folder and save the output as MO_Child_Lead_Ex_with_Count.shp.
- Click OK.
- Open the Attribute Table of the resulting layer and note that the numeric fields from the MO_Lead_Releases Layer have been added summarized by addition for all of the points within each county. Some of these fields are nonsense, but some may reflect information that is relevant to the question of the relationship between Lead Release and Child Lead Exposure. Note that the Sum_Dummy field contains the number of release sites in each County.
Copying Symbology