We added a new tool for summarizing classified data to our SSURGO toolbox. The SSURGO Component Classified tool takes a categorical field in the SSURGO component table and produces an output table summarizing the proportion of each category in the field for each map unit.
The SSURGO Tools version 2.0 toolbox is available in the Esri Hydro Resource Center and the Soils Atlas Group on ArcGIS.com.
In SSURGO Soils Tools Part 1, we discussed how values contained in the SSURGO component table could be mapped by flattening the many-to-one relationship between records in the component table and the map unit polygons using a weighted average approach. However, many useful fields in the component table contain categorical data. For example, the component table field hydricrating has values of yes, no, unranked, and not prime. Since each map unit polygon has one or more records in the component table, the components must be aggregated to produce a map. The Component Classified Tool aggregates the data by summing the proportion of each class for all the components in each map unit. To produce a map, the output table from this tool is joined to the map unit polygons using the mukey field and symbolized.
Like the weighted average tool, the SSURGO component classified tool takes three inputs:
- A list of component table fields to process separated by semicolons
- A path to a geodatabase containing two tables – “component” and “mapunit”
- A path to an output folder or geodatabase
For each field in the input field list, the script creates an output table using the field’s name as the output table name and adds a field to the table to store the mukey which is later used to join to the map unit polygons and a no data field to store the proportion of the map unit with no data in the selected field. The script reads through the field and creates a list of unique values and adds a field in the output table for each unique value.
Note that if more than 20 unique values are detected the script will abort the current field and begin processing the next field in the list. This value can be changed by modifying the maxLen value in line 127 of the script.
Once the output table has been set up, the script cycles through each record in the map unit table, selects all the component table records associated with that map unit, and sums the proportion of each value in the component table field for the map unit. The summed proportion of each value is then written to the appropriate field in the output table.

Figure 1: Example of output table.
The output from this tool can be mapped in a number of ways. In this example we can join the output table to the map unit polygons and symbolize areas by the proportion of prime farmland with hydric soils (hydricrating = “yes”).

Figure 2: Hydric soils in the Sacramento, California area.
The Classifed and weighted average tools can be downloaded from the Hydro Resource Center Script Gallery or the ArcGIS.com Soil Atlas Group.
For more information, comments, and to share ideas contact Richard Nauman (RNauman@esri.com) or Michael Dangermond (MDangermond@esri.com).