I am attempting to classify a set of gps time-encoded point data into behaviors based on different attributes.
I have created an attribute that is 0 for home and 1 for away based on location, and now want to number the trips away from home (a set of points 01111111111110
would be one trip because it started and ended at home). I have added the attribute field that will have the trip numbers, but don't know how to calculate the field so it is based on the home/away field.
UPDATE: theseThese are the bare bones of what Python code might look like (I'm not experienced with code).
UPDATE:
After After using matt wilkie's recommended script I've made some changes so that my first trip is number 1, my second is 2, etc etc.
Here is the code modified from matt's:
Then I just select for home = 0 and calculate my trip field back to 0. Neatly ordered trips. Thanks a ton everyone!