Integrating Census data with DEM data
This webpage describes the steps necessary to join attribute data downloaded from the US Census Bureau to spatial boundary files and integrate those data with a raster DEM covering the same area. Here the example will assume you are acquiring tract level data for a particular county in the United States.
1) Download census attribute data
- Go to the Census Burea Website
- Select American Factfinder : Data Sets
- Select the Summary File that contains the data you want to download (SF1, SF2, SF3)
- Select Detailed Tables
- Select the Geo within Geo tab, Show all Tracts within a county (you choose county)
- Add All Census Tracts and select Next
- On the following page select the variables you want to download for the census tracts, Add them to the Current Table Selections
- Show the Result then Download the data (Print/Download) as a *.xls file
2) Subset the corresponding tract data from the ESRI 2005 Data (see R: drive mapped on STC machines)
- Open the Tracts dataset, select tracts you want (by attribute recommended)
- Right click on layer in ArcMap, select Data : Export Data. This will create a new dataset of just the features you had selected.
- Open this new dataset and note the format of the FIPS field, you'll need to get the Census data you downloaded to have the same format.
3) Census data cleaning
- Open the *.xls census data file. Select the Geo_ID column, do a Replace (Edit menu : Replace) and get rid of the FIPS prefix so the field format will match that of the Tracts GIS dataset
- Delete the row with the descriptive names (rename abbreviated variable names if you want, no spaces allowed in variable names)
- Optionally rename the Geo_ID field to "FIPS" (no quotes)
4) Join Census data to Tract GIS dataset
- Add Tract datset and Dbase file to the same ArcMap Data Frame
- Join Dbase file to Tract dataset
- Right click on Tract dataset, select Joins and Relates
- Fill in the next fields, note if the FIPS or GEO_ID field does not appear in the pull down menu it is because the field type is different from that of the FIPS field in the Tracts dataset. To remedy, open the Attribute Table, Add a new field with the same field type as the Tracts FIPS field, and use the "Calculate Values" (right click on field name in Open Attribute Table) and choose the old field as the value for the new field. Note, you can distinguish numeric fields from text fields by the justification of the field.
- IMPORTANT - Export the dataset now - this will save a version of the dataset with the joined fields attached. The Join operation only temporarily joins the DBASE file to the Tracts dataset so if you don't Export the Tracts dataset to a new dataset you won't retain the join to the original dataset.
5) Download the DEM for the county from the Seamless DEM project of USGS
6) Add DEM to ArcMap session, find Mean Elevation of Census Tracts
- Add DEM to ArcMap Data Frame
- Optionally
- Add the Spatial Analyst Extension, and open the Spatial Analyst toolbar
- Select the Zonal Statistics menu and use the Zonal Mean option to calculate the mean DEM value by Census Tract (use FIPS as the zone value). Here the Zone dataset is the Census Tracts and the Value dataset is the DEM.
- Note the issue of the Census tracts splitting cells in the DEM and the impact of the cell size of the DEM on the errors of omission and comission in the Zonal mean operation