[GIS] Automatically exporting multiple maps with quantile symbology in ArcGIS Desktop

arcgis-desktopexportsymbology

I have a very simple shapefile to which I join a bunch of fields. I then need to have these new fields symbolized with a specific color ramp using a five quantile classification and then exported to a JPG at a certain resolution with a specific filename.

Is it possible to sort of "preload" the software manually with the layers and page layout I want and then have it loop in such a way that it merely changes the symbology field value and exports, over and over?

There is a legend but since the labels will remain the same (quantile 1, quantile 2, etc) I can just leave that as a hardcoded graphic.

I'm envisioning something like this: I add my two layers (one is a fill-free layer of US states to serve as an outline for the other layer) and then join one big file to the layer that needs symbology. This program I don't know how to write would then loop through and change the symbology field value to the next column I've added, and changes the classification back to a 5-class quantile (it always reverts to Jenks for some reason). Then since the legend is hardcoded it just needs to save this new map of field Beta1 as a jpg and then switch to Beta2, Beta3, etc.

Best Answer

The ArcMap interface resets the symbology classification to jenks whenever you change the symbology layer, which is kind of annoying. I've gotten around this to make batches of 100s of maps using ArcPython.

First, set the symbology to run off of a field in the attribute table called "temp" or something like that. Tweak the symbology to your liking. Then you will iteratively replace that values of that field using Field Calculator, then export the map:

import arcpy

#List of names of fields to be mapped
ListOfFieldsToSymbolize = ["field1","field2","field3"]

#Temporary field that layer is currently using in ArcMap
SymbolizedField = "temp"

for Field in ListOfFieldsToSymbolize:

    #Replace temporary field with one of the fields to be mapped
    arcpy.CalculateField_management("Layer", SymbolizedField, "!" + Field + "!", "PYTHON")    

    arcpy.mapping.ExportToPDF(Current.mxd, Output.pdf)
Related Question