How to determine pythagorean triples that have a slope closest to 1

You are going to have a hard time with this. Clearly, your Pythagorean triples are primitive. Which means that there are natural numbers $u,v$ such that your so-called prime leg is equal to $u^2-v^2$, the even leg is equal to $2uv$ and the hypotenuse is equal to $u^2+v^2$.

The fact that your prime leg is equal to $u^2-v^2=(u-v)(u+v)$, and at the same time a prime number means that we must have $u-v=1$. Rewriting the above expressions for the three sides using this gives a prime leg of length $2v+1$ and even leg of length $2(v^2+v)$. The ratio between these two sides is just going to get further and further away from $1$ as you pick bigger and bigger primes for your prime side.

As a side note, the length of the hypotenuse will always be $(v+1)^2+v^2=2(v^2+v)+1$, which is $1$ more than the length of the even leg. You probably already spotted this pattern from your table.