Dear Forum, I have yet been able to devise a working piece of code that will create a cumulative total column that resets at each break in another variable. Have over 7k in observations. For example, given the following sample data set. 1 NY ZIPCODE# long# lat# 2 NY ZIPCODE# long# lat# 3 NY ZIPCODE # long# lat# 4 NY ZIPCODE# long# lat# 5 NY ZIPCODE# long# lat# 6 LA ZIPCODE# long# lat# 7 LA ZIPCODE# long# lat# 8 LA ZIPCODE# long# lat# 9 LA ZIPCODE# long# lat# 10 LA ZIPCODE# long# lat# I will like to compute the cumulative distance (measured in kilometers) between each of the ZIP codes in each state. With the total cumulative distance being shown in the last observation of the given state. Thank you for any help!
... View more