The level code was taken out of the main SQL file and moved to ExcessCode.sql.
The elbow calculation was done using '''elbowdata''', not '''elbowdatarestricted'''. The workings are in E:\projects\agglomeration\Elbow.xlsx. Plot fracunclustered (X) against avgfracinhull (Y), and fit a quadratic cubic to give:2.8485 x^3 - 3.3892 x^2 - 0.43^x + 1.0373≈-0.0553263 at x≈0.425704 [https://www.wolframalpha.com/input/?i=inflection+points+2.8485x%5E3+-+3.3892x%5E2+-+0.43%5Ex+%2B+1.0373] The Chosen Hull Layer can't be done until after the STATA analysis has been run, so for the first pass these tables are created empty. The code will have to be re-run from line 1200 onwards to add this in, recomputer the layer distances, and update the master dataset later. The TIF data processing was taken out of the main file. It was moved to E:\projects\agglomeration\TIF\TIF.sql.
==Files==