That looks awesome! It’s a side project that I was interested in, if I could only learn to code like you. I need to understand what you’ve done. Got a couple of things that I want to add (valves, say an input to place 1 or more valves and then place them in the optimal place on the line), which is hoping to be able to add to this. Like the graph and all that you’ve done, really appreciate it!
Just took a better look at it, and it appears to be close but may be over estimating in a few locations. Distance 0,1,2 look correct. Just checked a few past there, 3 and 4 appear to be overestimating the length. The overlaid line looks to be showing the correct length though.
Looks to be due to the first column being in km, and the second being in meters.