This function provides complete crosswalk and final shapefiles in cases when the user requires GAT to be run twice (for example, a first run that enforces the boundary variable and a second run that does not).
combineGATcrosswalks(path, file1, file2, idvar)
The filepath to the files created by GAT. This function assumes the same filepath was used in both runs.
The crosswalk (*in) file created in the first run of GAT. For best results, avoid filenames containing a period. It is not necessary to add the file extension.
The crosswalk (*in) file created in the second run of GAT. For best results, avoid filenames containing a period. It is not necessary to add the file extension.
The ID variable used when running GAT. This function assumes the same ID variable was used in both runs.
Two shapefiles are created and saved in the path provided:
a revised original crosswalk
name: file1 ending in "_combined"
"GATid" renamed to "tempid"
new "GATid" created with the IDs from the second run
a revised final aggregation
name: file2 without "in" ending in "_combined"
"GATnumIDs" removed
new "GATnumIDs" created with the number of areas in the original shapefile included in each final area
In a future iteration, I may also include maps and a log that compare the original and final shapefiles.