1

I am performing the Huff model with 10.000+ facilities and dwellings. As a result, each facility has a value between 0 and 1 that determines the probability a consumer patronages a facility from a certain dwelling. The script generates this value for each store, thus I end up with 10.000+ probability columns. Now I want to add all these probabilities in one accessibility field (per dwelling), since the I am interested in the accessibility from a consumers´ perspective. Is there a function available where all the values are summarized into one field, but exceptions can be given? E.g. Sum all variables horizontally (rows) into one field, where certain columns can be excluded?

Ps. The HUFF-model script also generates a sales potential column per facility in an adjacent column (next to the probability column), which is copied from another cell. This leads towards unnecessary fields. Is there a shortcut to delete all columns that contain facility_X_"SALES". Or can be this be deleted in the HUFF-script?

closed as too broad by PolyGeo Nov 4 '15 at 12:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What GIS software are you using? As a new user be sure to take the Tour to see that there should be only one question asked per question. – PolyGeo Nov 4 '15 at 12:23
1

If you are using ArcGIS, you may use the Field Calculator tool (right click on data field column in attribute table) to sum all the fields to one field, see expression example below:

[field_1] + [field_2] + [field_3]

To delete many fields you may use the Delete Fields tool or in your case it would be better to write a python script to handle this. The python script would involve the following logic:

  1. use List Fields method to loop through layer fields
  2. use .find() method on field name
  3. use if conditional logic against your find string value variable
  4. if found variable >-1 use Delete Fields

Not the answer you're looking for? Browse other questions tagged or ask your own question.