I am using ArcGIS Pro.
I have a series of points representing animal locations that were tracked in a small stream. I would like to get the distance between the most upstream and downstream location for each individual (also known as the Linear Home Range), following the river path. Essentially the largest distance along this line between points, grouped by individual. I have downloaded a polylineZM file for the stream - and I understand that I can use Linear Referencing to get the distances between these points, and a measure of the point location in reference to the beginning of the line. But, I am looking for a little more than this, as this result gives me an output that I would need to manually manipulate to get my answer. If there is a code or workflow that would help me to easily calculate this without having to split the data set into a file for each individual, manually rerun it for each individual, sort output by the distance along the line and then manually subtract the largest and smallest points, that would be ideal.
The most recent point may not necessarily be the most upstream point, as the animals are not only traveling in one direction. Below is a screen grab of my points -
If there is a need to write an ArcPy script or a suggestion for manipulating the data after the Linear Referencing output file after it is created - I am all ears.