I'm hoping someone might be able to help me here:
I am looking to calculate the difference between the timestamps in the current row of a table, and the preceding row. Then, if the difference exceeds a set amount, increment the number in the Journey_Number column by 1. At the moment I am dumping all my data to excel to do this, but it's very inefficient. Example data is below.
At the moment I've worked out a model that can draw in related files, spit each out as a shapefile, then merge the shapefiles, reduce identical values, and sort by the timestamp field using regular toolbox items. In theory the data should be sorted at this point so that it's all sequential. This function, however, requires something more specific such as a python script - and I'm in over my head.
Any help is appreciated
| (Given information) | (Calculated Information) | (Calculated Information) |
|---|
| Timestamp | Seconds_from_prior_line_to_this_line | Journey_Number |
|---|
| 2015-07-13T23:49:09Z | | 1 |
| 2015-07-13T23:49:17Z | 8 | 1 |
| 2015-07-13T23:49:23Z | 6 | 1 |
| 2015-07-13T23:49:24Z | 1 | 1 |
| 2015-07-13T23:49:32Z | 8 | 1 |
| 2015-07-13T23:49:44Z | 12 | 1 |
| 2015-07-13T23:49:51Z | 7 | 1 |
| 2015-07-13T23:49:59Z | 8 | 1 |
| 2015-07-17T06:04:27Z | 868 | 2 |
| 2015-07-17T06:05:02Z | 35 | 2 |
| 2015-07-17T06:05:05Z | 3 | 2 |