Skip to content U.S. Department of Transportation/Federal Highway AdministrationU.S. Department of Transportation/Federal Highway Administration

Office of Planning, Environment, & Realty (HEP)
Planning · Environment · Real Estate

HEP Events Guidance Publications Glossary Awards Contacts

CTPP Data Products

Creating Statewide County-to-County Commuter Flow Maps Using ArcView 3.X

Todd Steiss and Jonathan Garner
Parsons Brinckerhoff

The following step-by-step process utilizes recently released county-to-county commuter flow files from the 2000 Census and the power of GIS to develop commuter flow maps at the statewide level.

County-to-county commuter flow maps for small groups of counties can be easily generated without the aid of GIS. A metropolitan area of six counties would only require 30 county-to-county commuter flow lines, 6 intra-county commute figures, and some method to represent commuter flows into and out of the metropolitan area. Even a metropolitan area of this size may require several hours to develop a map representing commuter flows. A statewide commuter flow map may involve over a hundred counties with thousands of county-to-county commuter flow combinations. At this level of complexity, a more innovated approach using GIS is warranted.

The steps below were successfully performed for several case studies. The process assumes some reasonable knowledge of ArcView 3.X. Once the basic process is understood, several variations in data sets and level of geography can be used such as multiple state analyses, the use of Traffic Analysis Zones rather than counties, or creating commuter flow maps by means of transportation.

Step 1: Create County Boundary File

This step requires a shapefile that has all the county boundaries that will be used to generate the county-to-county flow map. ESRI provides a "Counties" shapefile for the entire US with your copy of ArcView 3.X. Another source is the ESRI website: http://arcdata.esri.com/data/tiger2000/tiger_download.cfm. If this source is used, the individual county shapefiles by state need to be downloaded and then merged into one shapefile. Whatever source is used, the county boundary shapefile should have fields with the Census designated ID codes for the state and counties either separated or combined. It is recommended as a minimum that for a statewide map, all the counties for the subject state and all adjoining states be used.

Step 2: Create County Center Point File

There are several ArcView scripts available on the ESRI website to create a polygon to point shapefile. Suggest using "Polygon Centroid to Point Event Theme" by Tara Montgomery. This script converts the polygons into points and adds X and Y coordinates to the "County_Point" shapefile.

Step 3: Create County Flow Table

Download the "Work County" excel file for the subject state from the Census website: http://www.census.gov/population/www/cen2000/commuting.html. Delete the title rows (first four rows) and the rows with footnotes at the bottom of the table. Rename the column headers in Dbase format (short and simple). Example:

From:

Res State Res County Res (C)MSA Res PMSA Residence State- County Name Work State Work County Work (C)MSA Work PMSA Workplace State-County Name Count

To:

Res_St

Res_Co

Res_MSA

Res_PMSA

Res_Name

Wrk_St

Wrk_Co

Wrk_MSA

Wrk_PMSA

Wrk_Name

Cnt

Save the file in DBF 4 (dBase IV) format.

Step 4: Add and Populate Fields to the County-to-County Flow Table

Open the county flow table in ArcView. Add six new fields: Pair_C (String, 12), Pair_N (Number, 12, 0), Res_stco (String, 5), Wrk_stco (String, 5), ID_Num (Number, 8,0), x_coord (Number, 10, 6), y_coord (Number, 10, 6).

There is a leading zero in the Wrk_St code that should be removed. Replace the Wrk_St data with [Wrk_St].middle(1,2).

Then populate the new fields doing field calculations as follows:

Pair_C: "9"+[Res_st] + [Res_co] + [Wrk_st] + [Wrk_co].
Pair_N: (Pair_C).asnumber.
Res_stco: Res_St+Res_Co.
Wrk_stco: Wrk_St+Wrk_Co.

The ID_Num field will be used later in the process.

Join the "County_Point" attribute table to the "2WRKCO_ ST" table. Use the Res_stco field from the "2WRKCO_ ST" table and the state/county code from the "County_Point" attribute table. If a combined state/county code field does not exist in the "County_Point" attribute table, this will need to be added to complete the joining process. After joining the "County_Point" attribute table to the "2WRKCO_ ST" table, populate the x_coord and y_coord fields with the X and Y values from the "County_Point" attribute table.

The x_coord and y_coord values will be blank in areas not represented by the "County_Point" shapefile. These records represent areas beyond the subject and adjoining states and can be assigned to a zero X, Y coordinate (0,0), assigned to a default coordinate just outside the subject and adjacent states (for Virginia I used -73, 38), or assigned coordinates based on geographic location (north, south, east, west, or by state). If the x_coord and y_coord values are left blank, no commute flow line will be created for that record. Therefore, it is best to assign a value even if it is just (0,0).

The query function in ArcView does not work on blank numeric fields. To select all the records with blank X and Y coordinates, first query the y-coord field for values greater than zero. Then use the switch select button to highlight the records with blank X and Y coordinates. Then populate the X and Y coordinates with zeros or a default location.

Remove the join and clear selection if one was made. Export the "2WRKCO_ ST" table as "ST_Res.dbf", where "ST" is the state abbreviation.

Join the "County_Point" attribute table to the "2WRKCO_ ST" table again. This time use the Wrk_stco field from the "2WRKCO_ ST" table and the state/county code field from the "County_Point" attribute table. Populate the x_coord and y_coord fields with the X and Y values from the "County_Point" attribute table. This will overwrite the previously stored x_coord and y_coord values.

Remove the join. Export the "2WRKCO_ ST" table to "ST_Wrk.dbf", where "ST" is the state abbreviation.

Step 5: Creating County-to-County and Intra-County Commute Files

Add the "ST_Wrk.dbf" and "ST_Res.dbf" files to the ArcView project. Than add the as "ST_Wrk.dbf" and "ST_Res.dbf" files as event themes to the View. The "ST_Wrk" event theme should have points representing all county center points in the subject state. The "ST_Res" event theme should have points representing all center points where there is a residential county origin within the subject state and adjacent states. The default points(s) should also appear. The location of the default point(s) will depend on how it was defined in Step 4.

Use the Geoprocessing extension to merge the "ST_Wrk" and "ST_Res" event themes into a new "ST_flow" shapefile, where "ST" is the state abbreviation. This shapefile will have points representing all origin and destination combinations listed in the "2WRKCO_ST" table. If the table is sorted by the Pair_N (or Pair_C) column, there will be two records for each Pair_N (or Pair_C) id code but with different x and y coordinates. The exception is where the origin and destination is in the same county, in which case the x and y coordinates are the same.

In the "ST_flow" attribute table select the ID_Num field. This field will need to be populated with unique value numbers and running an auto number script does this. Download "Autonumber a field" by Ellen Tejan and run the script from the table properties of "2WRKCO_ ST".

Use the "ST_Wrk" event theme and Query where field Res_stco =Wrk_stco. This will select only the records where the county of residence and county of work are the same. Export this as a new shapefile called "ST_Internal", where "ST" is the state abbreviation.

Remove the "ST_Wrk" and "ST_Res" event themes. Also remove the "County_Point" shapefile.

Download the "Points to lines or polylines" extension by Dan Patterson from the ESRI website and add the extension. Select your "ST_flow" shapefile, and execute the program using the following options: X Field =x_coord, Y Field =y_coord, Feature ID Field =Pair_N, Vertex ID Field =ID_Num, and Attributes Field =<None>. Choose "Segmented" as the line type. Chose "NO" for Trap Points Events. Save lines to "ST_Flow _Line". The other options are not critical to the process.

The results should be a shapefile with lines connecting all the points representing all the origin and destination combinations listed in the "2WRKCO_ST" flow table. This may result in having several hundred lines all over the map. The next step will screen out and hide most of these lines.

Step 6: Create County-to-County Flow Theme

Join the "ST_Flow" attribute table to the "ST_Flow_Line" attribute table. Use the ID field from the "ST_Flow_Line" attribute table and the Pair_N field from the "ST_Flow" attribute table.

Create a Graduated Symbol theme with the "ST_Flow_Line" shapefile using the CNT field. Since every possible combination is shown, it is difficult to identify any distinctive pattern of commuter flow. It is best to redefine the value classes in which the lowest class symbol is given a 0 line thickness or null (blank) color. The value classes will vary by state and preference. In the example for the state of North Carolina 4 classes were used. The symbol size range was set from 1 to 4. The Ranges were: 500-1000; 1001-5000; 5001-10000; and 10001-(max number for an external county).

Step 7: Create Intra-County Commute Theme

Use the "ST_Internal" shapefile to create symbols representing the internal commute patterns. Use the CNT field to create a Graduated Symbol theme. The value classes will vary by state and preference. In the example for the state of North Carolina 5 classes were used. The symbol size range was set from 4 to 18. The Ranges were set to: 1-10000; 10001-50000; 50001-100000; 100001-200000; and 200001-(max number for an internal county).

Step 8: Summary of Results

The dots represent the internal county commuting and the lines represent the county-to-county flow. Large dots usually indicate that the county has a large employment base and small dots represent counties with a small employment base. Although the county-to-county lines do not explicitly show the direction of flow, it can be generally assumed that the major flow represented by the visible line is in the direction from small dots to large dots.

Any hidden lines representing the minor "reverse" flow would typically be from large dots to small dots. There are techniques to offset the lines between counties and use arrows to show both directions of flow, however, this would add significant complexity to a county-to-county commuter flow map at the state level.

Other general conclusions can be inferred by the map results. Counties with small dots that have major flow lines to large dots often represent bedroom communities to a major employment base. Small dots in isolation or that are connected to only a few other small dots tend to represent rural communities with a small residential and employment base. The commuting patterns in some metropolitan areas can be considerably complex. In these cases, more detailed mapping maybe required (ie directional flow lines).

Step 9: Optional Directional Flow Lines

Using the default line styles, the county with the larger commuter flow volume to a neighbor county will overshadow the smaller volume moving in the reverse direction. This occurs because the two connecting flow lines between county center points overlap. Adjusting the line offset and adding an arrow line style can make the map clearer.

Click the Advanced options and change the offset, the example uses 3. Double click on the Symbol display box and change the pen palette to an arrow line style to delineate the direction of the commuter flow. Changing the color of the lines or points may also add to the display quality.

If the arrows point from the focus state or jurisdiction to surrounding areas, the lines are reversed from their correct orientation. Open the "ST_flow_line" attribute table, select the Shape field, and do a field calculation: [Shape].Flip. This will flip all lines in the shapefile therefore correcting the directionality.

Adding directional lines adds more details for analytical interpretation but may produce a map that can be rather complex, particularly at the statewide level. This option may be best reserved for more detailed analysis for a smaller group of counties.

Updated: 04/29/2011
HEP Home Planning Environment Real Estate
Federal Highway Administration | 1200 New Jersey Avenue, SE | Washington, DC 20590 | 202-366-4000