Referring to this new tool : https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/graphical-cartograms-in-arcgis-pro/
I was able to use the tool to easily create a cartogram representing a certain value for a set of census areas. However, the resulting cartogram's attribute table only contains the standard fields (ObjectID, Shape, Length and Area) and the value I used to size the symbols (rounded to integer). This means there is no way to then colour the symbols, either by an attribute that already exists, or by using a table join to bring in external data.
The example in the blog article implies that some additional information was included when the cartogram was created, if only to colour the circles red or blue.
Can I keep more than one attribute for my cartogram symbols?
Solved! Go to Solution.
Try adding these two lines:
Line 508: ARCPY.AddField_management(resObj, "ORIG_FID", "Long")
Line 520: row.setValue("ORIG_FID", o.id)
Then you'll have the original OID as "ORIG_FID" in the output, and you can join the input feature class on that.
Hello Katy, It looks like in the Geoprocessing Environments tab, in Geodatabase Advanced, tab you can select Preserve Global IDs and Transfer Geodatabase Field Properties. Perhaps that's what you're looking for?
Thanks for the reply but I just tested and this doesn't fix the issue. While my census data has a unique identifier for each zone, it is not a Global ID in the ArcGIS Pro technical sense, and Field Properties are not relevant.
(I was not aware of Global IDs but reviewed this page to confirm: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-global-ids.htm)
Try adding these two lines:
Line 508: ARCPY.AddField_management(resObj, "ORIG_FID", "Long")
Line 520: row.setValue("ORIG_FID", o.id)
Then you'll have the original OID as "ORIG_FID" in the output, and you can join the input feature class on that.
Thank you! I added those lines and was then able to join the original table to the output.
It would be great if the script did this out of the box or, even better, if the tool panel asked you to identify one or more existing attributes of the input layer to bring over to the cartogram, in addition to the one driving the symbol size. Is anyone at Esri listening?