Select to view content in your preferred language

Script to automate updating attribute table values by adding from another table

757
0
03-11-2021 10:59 AM
TiffanyWu1
Emerging Contributor

Hey all! I'm fairly new to ArcGIS Notebooks and scripting in general, and I have a project task I'd like to use in Notebooks and thought I'd bring it up to see if folks think it is feasible or if it's more suited through another workflow or for example using arcpy in Pro.

I have a spatial dataset of US states joined with values from using the Summarize Attributes tool on a larger dataset. Simply put, that states layer contains 3 important fields with count values (Type A, Type B and Total) for each state. So for example, California has 47 in Type A, 408 in Type B, and 455 as its total. 

Each month I will have another summary table containing those three count values for each state. Let's say California for this month would be: 5 in Type A, 30 in Type B, and 35 in total. I want to be able to add those values to the existing spatial dataset (so 52 in Type A, 438 in Type B, and 480 total). I'm thinking of using pandas / Spatially Enabled Dataframe objects to do so while manipulating attribute values. However I'm not sure exactly how to get started on this or if this an easy task to do in ArcGIS Notebooks.

Alternatively, I would have to run the Summarize Attributes on the full dataset and overwrite the layer in AGOL, which will be complicated in re-doing the pop-ups and configurations of the dashboard that uses the layer. I can also update each state manually but that isn't as feasible if there are dozens of states with added counts for each month. I appreciate any and all suggestions, thank you!

0 Replies