# Exercise 2 - Mapping linkages with shortest-path subset centrality This exercise is similar to Exercise 1, except that we will use shortest-path subset centrality and review the types of file formats necessary for that function. Please refer to the manual for a description of the analysis method, which is an algorithm termed shortest- or least-cost path. (Note that 'cost' in this metric's name is energetic cost in terms of habitat permeability, not monetary cost as in the previous exercise). This algorithm requires a single input layer, representing habitat suitability. The method identifies the set of least-cost paths between two areas. In this example as in the previous one, wolf habitat suitability is derived from data on land cover, productivity, slope, roads, and human population. 1) Hexmaps Tab – Instead of creating a new hxn file, we will use a copy (located in the directory ‘Exercise_2’) of the habitat5.hxn file created in Exercise 1. There is also a subdirectory named OtherFiles that contains copies of all the files we will generate during the analysis process. Please refer to these if your attempt to create these files is unsuccessful. 2) Graphs Tab – Refer to p. 18 of the Toolkit manual for a description of the Graphs Tab. We will create the edgelist input file we will use in the subsequent connectivity analysis. Press the + tab above the upper box and add the file habitat5.hxn to the upper box (Hexmap Source File). Set graph type as Edgelist - Distance (Betweenness). Set the Output file name as hab5dist.txt Leave checked ‘No Data Value -9999’. Press Run. Examine the file hab5dist.txt in a text editor. Note how the edges are created and attributed. 3) Connectivity Tab - Refer to p. 21 of the Toolkit manual for a description of the Connectivity Tab. A subset file is needed that lists the hexagons (nodes) between which flow is mapped. This is typically created using an ArcMap composition which displays the shapefile, by identifying the hex_id values of hexagons at the endpoints of the linkage path. We have created a subset file beforehand, a textfile named sourcetarget.txt. Open sourcetarget.txt in a text editor to see the format required for the subset file. In the Connectivity Tab, set the Function as ‘Shortest-Path Betweenness Centrality Subset’. Browse and locate the graph file, hab5dist.txt. Change input file type to ‘Source and Target data’. Browse and select sourcetarget2.txt as the input file for the first field. Browse and select sourcetarget2.txt as the input file for the second field. Open this file in a text editor and note the difference in format from the subset file 'sourcetarget.txt' used in the previous exercise. Browse and name the output file: hab5betweensub.tab. Press Run to run the analysis. The progress of the analysis will be displayed in the ‘Output’ tab. 4) Working with the CAT output files In order to display the results spatially, the text file 'hab5betweensub.tab' will need to be joined to the 'hex_id' field of the shapefile as described in Exercise 1. The online help was made with Dr.Explain