Working with SPSS, ArcGIS and ICPSR data A praxis for mapping data quickly and easily Step 1. Setting up ArcGIS directory and acquiring files We will be working with the County Characteristics, 2000-2007 data set produced by the Department of Census and compiled and made available as an SPSS portable file through ICPSR. The Inter-Universtiy Consortium for Political and Social Research (a www.icpsr.umich.edu/icpsrweb/icpsr/) (County Characteristics, 2000-2007) We will use spatial files or shapefiles that have been converted from the Census Bureau s Tiger-line (Topologically Integrated Geographic Encoding and Referencing) files into file formats developed by Esri to work with ArcGIS. The US Census Bureau (www.census.gov/geo/www/cob/bdy_files.html Cartographic Boundary Files ) Additionally, we will use two files Esri Data and Maps collection available both through IUware and locally on STC workstations: North American City Population USA Major Highways These files will be found through drive R:\ on all STC machines (/DataMaps10/Streetmap_na/data), but can be downloaded from IUware: (iuware.iu.edu/list.aspx?id=146) ESRI Data and Maps Open ArcMap an ArcGIS folder will be generated under /user/documents (all files for this workshop go into this folder) Download the county shapefiles from the Census Bureau, selecting Census 2000 County and County Equivalent Areas, and selecting the zip file for Indiana: co18_d00_shp.zip Click on the add data icon the select the Co18_d00 file View the table (right-click, view source)--look at how county fips code is formatted. This formatting will keep us from selecting county fips code as the common field, choosing county name instead.
Step 2. Select cases Download the both the spss (sav) file from ICPSR s site (www.icpsr.umich.edu) and open the codebook (for future reference minimize it after opening) Open the ICPSR_20660.sav file in SPSS. Select Indian counties through the following: Click on the Select Cases Icon Check the Radio button if condition is satisfied Click on the if tab In the left-hand variable window, select State FIPS (Federal Information Processing) Code or State Name Since State contains the FIPS code with a colon (e.g. 18:Indiana) and the variable lists a field width of 2, one can select cases using State ( FIPS code) of 18 as well as StatName= Indiana (remember the quotation marks) State will appear in the query builder box Using the query builder keypad, select = and the 18 (FIPS code for Indiana) Click Continue and the OK Make sure, under Output, that Delete unselected cases radio button is selected A new dataset is created with only Indiana counties Look at the Output window Step 2. Selecting cases, variables and saving your file Look at Variable View allows us to bypass the codebook because we can view label descriptons
In Data view, click on the Select Cases tab Right-click on the first variable Case number[id] and select Display variable names Click the radio button if condition is satisfied the if button. Drag State to the query builder box, click on = and enter 18, the FIPS code for Indiana Click Continue Activate the radio button Delete unselected cases Click OK Because County FIPS codes do not match the Cenus.dbf file (Co18_d00.dbf) used supporting the.shp file, we need to use CountyName as the common field two which we will join this table to the Co18_d00.dbf. We have to make a slight adjustment to the CountyName entries, removing County after each county name Highlight CountyName Edit, Replace In the Find box, enter County Leave the Replace with: box empty Click on Replace All We will now select 4 variables and save our file as a dbase IV format file: Under File select Save As Change the destination folder to the documents/arcgis folder Select dbase IV (*.dbf) as your file type Edit the file name to be saved to IN_counties.dbf Click on the Variables tab Click on Drop All Click on the Name column for descending order starting with AIAN05 Select the following variables and save: CFFR_DR04 (Federal direct expenditures or obligations: Retirement/disability payments for individuals, fiscal year 2004) County name (we will use this variable to establish our join in ArcMap) CrimeRate04 (Index crime rate (per 1000,000 persons), 2004) UnempRate05 (Unemployment rate, annual average estimate, 2005 Click Continue, and Save. You should have the following files in your user/documents/arcgis folder
Co18_d00.dbf Co18_d00.shp Co18_d00.shx IN_counties.dbf 3. Using with ArcGIS (ArcMap) Add the North American City Population layer file (Under R:\DataMaps10\Streetmap_na\data\ Great information but we would really like just Cities in the state of Indiana. Uncheck the City layer so that it isn t visible. Open the ArcMap Toolbox (toolbar at the top of the page) which looks like this: Expand Analysis Tools > Extract > Select. For Input Features, browse to cities.sdc feature class in: R:\DataMaps10\Streetmap_naData\data\ For Output Feature Class, specify the name and location of the output feature class (should be in the Home directory, which is /documents/arcgis/). Next, click the SQL query button to launch the SQL dialog box. The cities.sdc file contains the City codes for all States. Anything that begins with 18 is a city in Indiana. Your Query should look like this
Place_ID >= 1800104888 AND Place_ID <= 1818381170 These numbers represent all the places in Indiana, i.e any place ID greater than or equal to the lowest ID number and anything less than or equal to the largest ID number. Remember to put the single quotes. Click OK to run the tool. Now, you need to change the label representation for the City places Right-click on the Cities layer and select Properties. Click on the symbology tab Click on Quantities/graduated symbols Select Population Double-click on each point and adjust the color for each population class Joining the tables to represent your ICPSR data Since we have already added our shape file, we need to join the table we just created in SPSS to the existing shapfile, so that the variables that we chose can be spatially referenced. Right-click on col18_d00 and select Joins and Relates and then Join. Under What do you want to join to this layer?, select Join attributes from a table. Under 1. Choose the field in this layer that the join will be based on: select NAME. Under 2. Choose the table to join to this layer, or load the table from disk: Indiana_counties_9_variables should be selected already. And under 3. Choose the field in the table to base the join on: scroll down and select COUNTYNAME.
Click Validate Join. Click Yes to create an Index. You should receive a Join Validation box, All field datasource validation tasks were completed successfully. Click Close and OK. Browse the map Open Attribute table. Both tables should be merged, showing the three additional variables added Right-click on a county and choose identify-look at how the census data is presented. Creating new layers Now, we are going to change the representation of data on the first layer, save that as a separate layer and add it as an additional layer.
Saving layers Right-click on co18-d00 and choose properties Select the Symbology tab Features/Single symbol is selected by default Select Quantities/Graduated colors Under Value: select UNEMPRATE0 Keep Classes to 5 Click OK. Right-click on the co18_d00 layer and save the layer as unemployment. Go through the steps above to add the two remaining layers Add labels to each of the layers Add additional data from Esri s map-data collection Click the Add data icon Click connect to folder icon (folder with the plus sign) Look for the R:\ drive (apps for UITS workstations) or map to where you downloaded your data from IUware DataMaps10/Streetmap_naData/data Select the following layer North American Major Roads Edit Symbology Right-click on North American City Populations, go to properties and Symbology and remove the any city less than 30,000. Right-click on North American Major Roads and remove secondary roads as above.