I have a large number of shapefiles with a "Pop" field representing population counts. To each shapefile, I'd like to add and calculate a new field, "Pop_per", to represent each row's share of the total population (total population = sum of "Pop" values across all rows). To illustrate...
I have:
ID Pop
0 15
1 52
2 23
3 46
I'm trying to get here:
ID Pop Pop_per
0 15 .11
1 52 .38
2 23 .17
3 46 .34
I know how to do this manually in the Attribute Table, but am looking for a way in either Model Builder (preferable so I can insert it in an existing model) or as a script. Each shapefile has a different number of features. Any ideas?