Example Using Tabulate Intersection with USFWS Data
This geoprocessing tool has many different applications as described on the "Applications" page.. Below are the methods showing how this tool can be helpful in taking county data and calculating a weighted average to come up with an estimate value for a grid cell.
Goal: Apply county values to a 200 km grid cell to "fuzz" county boundaries which are abitrary in terms of migratory bird data values (their distribution and abundance won't be influenced by these invisible boundaries).
Goal: Apply county values to a 200 km grid cell to "fuzz" county boundaries which are abitrary in terms of migratory bird data values (their distribution and abundance won't be influenced by these invisible boundaries).
- Creating grid across the US
- Project map into North American Lambert Conformal Conic
- Import shape layer of USA counties and transform to same projection as map using Project Tool (layer: https://www.arcgis.com/home/item.html?id=a00d6b6149b34ed3b833e10fb72ef47b)
- Create a grid over the US by using Generate Tesselation Tool (square shape, 200 sq km).
- Clip the grid to the US County layer using Clip Tool. - Calculating area of counties within each grid cell ** OUR TOOL **
- Use Tabulate Intersection Tool to calculate the percentage of each county within every grid cell
Input: grid layer clipped to the US
Zone fields: Grid ID (The grid cells) Input Class features: the county shape layer output table: new name for the output – “TabIntersect_US” Class fields: FIPS (the counties which you want the % of) output units: Square kilometers *The output table will have a row for every grid cell – FIPS code combination |
- Use Union Tool to create shape file that has a separate shape for each county and grid shape created. The two input features are the US Counties layer and the clipped grid cell layer.
- Create single column with unique grid cell and FIPS identifier, so the TabIntersect table can be joined to this new union layer to include the percentage information.
- Use Attribute Join to join in percentage information from TabIntersect table to the union layer.
- Export joined data to a new layer
3. Mapping
- Import csv file with metric of interest (waterfowl harvest for example)
- Join this data to the layer created in the previous step with TabIntersect information joined to a shape layer. (NOTE: there will be multiple rows for every FIPS, so the harvest information should be duplicated in those instances.)
- Create and calculate a new field (double type) which is the product of the metric of interest and the percentage column. Use Python 3 format. For example = harvest * (PERCENTAGE/100)
- Use the dissolve tool to sum up all the above calculated values for each grid cell. By doing this, the percentage adds up to 100% and you get a weighted average of all of the values of interest.
- Create single column with unique grid cell and FIPS identifier, so the TabIntersect table can be joined to this new union layer to include the percentage information.
- Use Attribute Join to join in percentage information from TabIntersect table to the union layer.
- Export joined data to a new layer
3. Mapping
- Import csv file with metric of interest (waterfowl harvest for example)
- Join this data to the layer created in the previous step with TabIntersect information joined to a shape layer. (NOTE: there will be multiple rows for every FIPS, so the harvest information should be duplicated in those instances.)
- Create and calculate a new field (double type) which is the product of the metric of interest and the percentage column. Use Python 3 format. For example = harvest * (PERCENTAGE/100)
- Use the dissolve tool to sum up all the above calculated values for each grid cell. By doing this, the percentage adds up to 100% and you get a weighted average of all of the values of interest.
- Map the Dissolved layer! Edit color scheme and natural breaks as necessary
Below are some examples of the outputs created with this methodology. One can look at different spatial extents, different time periods of data, different metrics, and also overlay other data.
Layers
USACounties_Project : ESRI shape layer https://www.arcgis.com/home/item.html?id=a00d6b6149b34ed3b833e10fb72ef47b includes FIPS codes. Used Project Tool to project from GCS to PCS North America Lambert Conformal Conic.
CountyHarvestSpecies : added Task3Counties.csv file and joined it to USACounties_Project based on FIPS code. This is the joined feature layer.
GenerateTesselation100 : Created with Generate Tesselation tool. 100 sq km area squares covering extent of CountyHarvestSpecies layer
clip_100grid_us : clip GenerateTesselation100 layer to CountyHarvestSpecies layer so that the grid only covers us land
TabIntersect_100_USharvest : use Tabulate Intersection tool to create layer that calculates the area of each county based on FIPS code in every 100 sq km grid cell in the US.
gridCo_us_split : use Union tool to create layer with separate polygons for county sections falling in different grid cells. Input features are the clip_100grid_us and CountyHarvestSpecies.
us_tabarea_100_harvest : add “GridCo” field to both gridCo_us_split and the attribute table TabIntersect_100_USharvest. Calculate field to concatenate grid ID and FIPS code with leading zero. Then use this field to attribute join the two layers. Export the join as its own layer which is us_tabarea_100_harvest.
Dissolve_us_weighted_100grid : use Dissolve tool to add up all of the harvest estimates times the percent within the grid for every grid cell in the US. Input us_tabarea_100_harvest dissolve based on GRID_ID and under Field, put all of the species_weigted fields and select Sum. This is what will then be visualized on the map based on the Sum_species_weighted columns!
USACounties_Project : ESRI shape layer https://www.arcgis.com/home/item.html?id=a00d6b6149b34ed3b833e10fb72ef47b includes FIPS codes. Used Project Tool to project from GCS to PCS North America Lambert Conformal Conic.
CountyHarvestSpecies : added Task3Counties.csv file and joined it to USACounties_Project based on FIPS code. This is the joined feature layer.
GenerateTesselation100 : Created with Generate Tesselation tool. 100 sq km area squares covering extent of CountyHarvestSpecies layer
clip_100grid_us : clip GenerateTesselation100 layer to CountyHarvestSpecies layer so that the grid only covers us land
TabIntersect_100_USharvest : use Tabulate Intersection tool to create layer that calculates the area of each county based on FIPS code in every 100 sq km grid cell in the US.
gridCo_us_split : use Union tool to create layer with separate polygons for county sections falling in different grid cells. Input features are the clip_100grid_us and CountyHarvestSpecies.
us_tabarea_100_harvest : add “GridCo” field to both gridCo_us_split and the attribute table TabIntersect_100_USharvest. Calculate field to concatenate grid ID and FIPS code with leading zero. Then use this field to attribute join the two layers. Export the join as its own layer which is us_tabarea_100_harvest.
Dissolve_us_weighted_100grid : use Dissolve tool to add up all of the harvest estimates times the percent within the grid for every grid cell in the US. Input us_tabarea_100_harvest dissolve based on GRID_ID and under Field, put all of the species_weigted fields and select Sum. This is what will then be visualized on the map based on the Sum_species_weighted columns!