Mapping-Part III (ArcMap and GIS)

This tutorial was written by Katherine Walden (Digital Liberal Arts Specialist, Grinnell College). The tutorial framework was created by Sarah Purcell (L.F. Parker Professor of History, Grinnell College). Tutorial instructions were co-authored by Martin Toney and Sophia Gates Stern, student workers in the Grinnell College’s Data Analysis and Social Inquiry Lab.

This tutorial was reviewed by Gina Donovan (Instructional Technologist) at Grinnell College, and edited by Lauren Frankel, a student worker in Grinnell College’s Data Analysis and Social Inquiry Lab.

This tutorial uses data generated by Cameron Blevins and posted on his personal site.

Creative Commons License
ArcGIS Tutorial is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.


ArcGIS is an industry-standard tool developed by geographers in the 1970s. As digital historians have pursued more complex and large-scale spatial analysis projects, ArcGIS is a tool frequently used to visualize and analyze spatial data. The ArcGIS Online platform (not covered in this tutorial but featured in many digital mapping projects) allows data analyzed and visualized in ArcGIS to be interactive and publicly-accessible. We will continue working with Cameron Blevins’s postal data for this tutorial.


Data:

1-Navigate to http://vivero.sites.grinnell.edu/files/ in a web browser.

2-This folder will contain a compressed folder (cb_2016_us_state_5m) and CSV file (1871_PostmasterSalary_Data.csv)

3-Copy both files to the Desktop.

4-Right click on the cb_2016_us_state_5m folder and extract the files.

5- Explore the file extensions, and open the CSV file to review the structure of the postal data.

A note on file types:

ArcGIS draws data on a map using shape files (.shp). A Shapefile is actually comprised of a package of individual files, but ArcGIS reads all of those files together as a Shapefile. Once in ArcGIS, Shapefiles become part of layers. ArcGIS can read other file types (CSV, GeoJson, KML), but the program needs to turn that data into a Shapefile in order to save, analyze, and export it.

Starting ArcMap and Importing Data:

6-To open ArcMap, go to Start, then type “ArcMap” into the search bar. Click on the globe icon that pops up to start the program.

7-Click on the Blank Map icon, and the program will open a blank ArcGIS map project. Save this project as “GIS_Tutorial” or another descriptive name of your choosing.

Importing Shapefiles into ArcMap:

 

8-Click on the Catalog button on the right-hand side of the window to open ArcCatalog, ArcMap’s program for connecting to files on your computer. ArcCatalogue can be run independently or within ArcMap, and locates files on your computer using folder connections.

9-Click on the “Connect to Folder” button near the top of the Catalogue window. Navigate to the Desktop where your cb_2016_us_state_5m folder is located. Click on the folder and select OK. The folder will now appear in your catalogue window.

10-Click on the “+” symbol next to the folder, which will expand to show the files included in the folder.

11-Locate the cb_2016_us_state_5m.shp file, then drag it into the large blank canvas in the middle of the main window. You should now see a U.S. state map drawn in the main canvas.

12-Save the project by clicking the floppy disc icon in the top-left.


13-Go back to the Catalog window, and add another folder connection to your Desktop, where the 1871_PostmasterSalary_Data.csv file is located. Drag the CSV file to the left-hand side of the ArcMap window, under Table of Contents and Layers.

14-Save the map project.

 

Another note on file types:

ArcGIS loads shapefiles and uses them to create layers. Within the Table of Contents, you will see the shapefiles and data that have been added to the project.

Adding data points to the map:

15-Right now, the cb_2016 shape file is drawing shape outlines, but the 1871_PostmasterSalary_Data CSV file does not have any spatial data to display.

16-Right click on the CSV file in the Table of Contents and select Display XY Data… from the dropdown menu.


17-On the pop-up screen, double check that Longitude is selected in the X field and Latitude is selected in the Y field. No value is needed for the Z field.

18-Click OK, and click OK again after the Object-ID Field error pops up.


19-The points from the CSV file have been added to your map as an Events layer (see image above) but needed to be saved as a Shapefile.

20-Right click on the Events layer and select Data->Export Data. A dialogue box will pop up prompting you to choose the export features and coordinate system.

21-Leave the Export as the default and select “the data frame” for the coordinate system.

22-Rename the output feature class to Postal_GIS.shp and click OK. A window will pop up asking if you want to display the exported data as a layer–click Yes. A Postal_GIS layer should now appear in your Table of Contents.

23-The checkboxes next to layer names allow you to decide which layers are drawn on your map. Right click on the Postal_GIS.csv Events layer and the Postal_GIS.csv file and select remove to remove these layers from your project.

24-Save the project.

A note on navigating ArcMap:

By this point, you may want to explore your map in more detail. The “+” symbol on the main page allows you to zoom in, and the “-” icon is a zoom-out option. The “hand” lets you drag the map around, and the i icon lets you see the dated represented by a specific point.

Customizing your display:

25-Right now, the geographic information is being drawn on the map according to ArcMap’s default settings. The Symbology property allows us to customize how data displays on the map.

26-Right click on the Postal_GIS layer and select Properties from the dropdown menu. Click on the Symbology tab, and select Quantities->Graduated colors under the Show menu on the left-hand side of the Symbology window.

27-Categories would recolor map points by a specific data field, and Quantities colors map points by calculating quantities in the data.

28-In the Value field, select PM_Salary from the dropdown. ArcMap will use the values in the PM_Salary field to determine numeric ranges.

29-The Color Ramp dropdown gives you additional options for coloring your data points.

By default, ArcMap calculates the ranges using Jenks or Natural Breaks. Click the Classify icon to choose other ways of calculating these intervals.

30-Leave the other options at their defaults and click OK. Notice map points have changed color based on ranges in the postmaster’s salary. The Table of Contents now includes a legend under the Postal_GIS layer that specifies the salary range for each color.

31-Save your project.

Additional display options:
  • We are using the cb_shape file to draw the U.S. map with state boundaries for our data points. We could also use a basemap in ArcMap to display this background. In the Table of Contents, uncheck the cb_shape file. Click on the Add Data icon and select Add a Basemap to see ArcMap’s default basemap options. Select a basemap and compare your experience navigating the two different maps. What would be the advantages and disadvantages of using one of ArcMap’s basemaps versus using a shapefile to draw the background?
  • You were instructed to color your points based on postmaster salary ranges. What happens when you go back to Properties->Symbology and select a different value (under Fields) or select a different option under Show? What aspects of the data are emphasized (or become unclear) based on how you display points on the map?
Using the ArcToolbox:

In addition to visualizing map points, ArcMap includes a wide range of analysis tools, located in the ArcToolbox. We will use a spatial analysis tool to look at the density of points in our Postal_GIS shape file, calculated as a magnitude per unit area of points. The neighborhood radius defines the area around each cell from which the magnitude will be calculated.

Even though map layers are based on shapefiles, those files can contain very different types of spatial data. The cb_shapefile that includes state and county boundaries is showing polygon data, while the Postal_GIS layer is showing point data. Like we see with the postal data, combining points and polygons can be useful for analysis. ArcMap just requires each layer or shapefile to represent one type of spatial data. You could have points and polygons within a map project–just not in the same shapefile or layer.

ArcMap also gives you the option of displaying raster data. Raster layers consist of data that varies continuously or gradually. Data about elevation, geography, weather trends, and similar phenomena are mapped using raster data and raster lays. In the next section of the tutorial, we will use a spatial analysis tool to create a raster layer based on the Postal_GIS points layer.

Mapping Clusters:

32-Select the ArcToolbox, and click the dropdown for Spatial Analyst. Click on Point Density.

33-If the tool doesn’t open, click on the Customize dropdown at the main ArcMap menu, select extensions, and be sure spatial analyst is checked.


34-Select Postal_GIS for Input point features. Leave Population field as NONE for now. Change the name of the output layer to Postal_Den and leave the other options as defaults. Click OK.

35-A new layer should appear in your table of contents. If the new layer is covered by other layers, we need to change the drawing order of layers to make the density layer visible.

36-Click on the Drawing Order View icon in the Table of Contents to select the drawing order view.

37-Click and drag the Postal_Den layer to be between the cb_shapefile and Postal_GIS layer. You should see a colored square between the U.S. map layer and the points.

38-The reason we’re seeing the large solid-color square is because the lowest range of density values in the layer is still displaying with a solid color, rather than a lighter shade or more transparent color option.

39-Right click on the Postal_Den layer and select Properties from the dropdown.

40-Select Symbology and see the numeric ranges assigned to each color under Symbol.

41-Double click on the color box for the first range (0.00-9.88) and select No color. This option makes the first range transparent so the smaller values are not distorting the map layers.


42-Zoom in on a particular high-density cluster to see the individual points that contributed to the density analysis. This first density calculation was based on the number of map points.

43-We will add another raster layer by calculating where the point density for higher-paying postmaster positions.

44-Reopen the point density tool.

45-Use the same Postal_GIS layer, but select PM_Salary (rather than population field) from the dropdown.

46-Rename the output to Salary_Den.

47-Customize the layer’s display like we did with the original density calculation. You can also select a different color ramp under Properties->Symbology.

Using ArcToolbox to calculate spatial statistics:

In addition to creating new spatial visualizations of our data, ArcMap can also calculate spatial statistics for our data. Spatial statistics can be used to predict or highlight causal relationship between the distribution of points and their attributes. For example, spatial statistics indicate a correlation between the location of houses and the incomes of home residents. We will use the spatial statistic tools to see if there is a significant spatial relationship for postmaster salaries.

48-Reopen ArcToolbox and select Analyzing Patterns within Spatial Statistics. Select Spatial Autocorrelation (Morans I).


49-For Input Feature Class, select Postal_GIS layer from the dropdown.

50-For Input Field select PM_Salary.

51-Check the Generate Report button.

52-Next is the Conceptualization of Spatial Relationships dropdown, which gives us several options to define how the relationship degrades with distance–how the spatial correlation between two points becomes weaker as the distance between them increases. Select Inverse Distance, which works well for point data since the relationship degrades as (1/distance).

53-Leave the other fields as defaults and select OK.

54-You will see a blue rectangular pop-up in the bottom right corner of the screen. A checkmark means the analysis was completed successfully, and a caution sign means errors occurred during the analysis.

55-To open the analysis report, click on the Geoprocessing->Results to see the analysis results.

56-Click on the Report File html file, which will open in a browser window. What does the report say about the randomness of the data? To what degree is it clustered, random, or dispersed? What could those trends say about the distribution of postmaster salaries across western states?

57-Rerun the Spatial Autocorrelation analysis, using Fixed Distance Band instead of Inverse Distance for the conceptualization of the spatial relationship. The Fixed Distance Band uses a fixed distance and calculates a correlation value of 0 to 1 based on that fixed distance.

58-Open this analysis’s Report File to see how the results changed based on how ArcMap conceptualized the spatial relationship. What changed in the analysis results? How would you describe the data’s spatial correlation?


Tutorial reflection questions:

  • How is using a tool like ArcGIS for spatial analysis different than Neatline or Google Maps?
  • What features or aspects of the data were you able to analyze and visualize in ArcGIS that you hadn’t thought about before?
  • Thinking about your Vivero Fellows project, what types of data or data sources could you analyze and visualize using ArcGIS?
  • What are the limitations or challenges of a tool like ArcGIS for spatial analysis?