=== versions === python 3.12.0 | pointpats 2.6.0 | geopandas 1.2.0 | shapely 2.2.0 | scipy 1.18.1 | numpy 2.5.4 === Camden trees === 28,128 tree records (snapshot uploaded 26 October 2026) 27,883 with coordinates 27,604 inside the borough boundary (21.78 km2, perimeter 26.2 km) by contract area: {'Highways': 11928, 'Housing': 9805, 'Parks': 4308, 'Education': 1347, 'Corporate Landlord': 193, 'Valuers': 23} London plane: 3,293 records, 1 at duplicate coordinates dropped -> n = 3,292 by contract area: {'Highways': 1987, 'Housing': 697, 'Parks': 541, 'Education': 63, 'Corporate Landlord': 4} all council trees at distinct locations: 27,403 windows: borough 21.78 km2 | within 100 m of a council tree 17.77 km2 | bounding box of the planes 47.31 km2 intensity: 1.51 planes per hectare (151 per km2) === quadrat test (500 m squares) === 98 cells (60 complete squares), 3,258 planes counted, 10 empty cells chi2 = 2,770.6, df = 97, p < 1e-300 variance/mean ratio on complete squares: 28.12 (1 under CSR, > 1 clustered, < 1 regular) 250 m squares: 368 cells, chi2 = 5,399.4, df = 367, p < 1e-300 1000 m squares: 28 cells, chi2 = 1,487.4, df = 27, p = 4.9e-297 === Clark-Evans nearest-neighbour index === mean NND 15.5 m, median 10.4 m, 10.5% under 5 m, 74.5% under 15 m CSR expectation 0.5/sqrt(lambda) = 40.7 m -> R = 0.380, z = -68.0, p < 1e-300 Donnelly edge-corrected expectation 41.1 m -> R = 0.376, z = -66.5 Monte Carlo: mean NND under CSR in the borough 41.1 m (range 40.3-42.1); one-sided p = 0.005 (floor 0.005) === G, F, K and L functions (border correction, CSR envelopes) === 54,441 F-function sample points on a 20 m grid; 1,398 of 3,292 planes are at least 500 m from the boundary G: above the envelope at 3-80 m (78 of 81 distances), below at none F: above the envelope at none (0 of 81 distances), below at 10-400 m K: above the envelope at 5-500 m (100 of 101 distances), below at none r = 10 m: L(r) - r = 31.6 m (CSR envelope -1.6 to 1.8) r = 50 m: L(r) - r = 78.6 m (CSR envelope -1.5 to 1.5) r = 100 m: L(r) - r = 95.3 m (CSR envelope -1.8 to 1.9) r = 200 m: L(r) - r = 103.4 m (CSR envelope -3.0 to 3.0) r = 400 m: L(r) - r = 89.0 m (CSR envelope -6.6 to 7.2) G(15 m) = 0.76 (CSR envelope 0.083-0.119) F(100 m) = 0.55 (CSR envelope 0.99-1.00) === window shape and edge correction === planes at least r from the window edge: borough 2,210 at 250 m, 1,398 at 500 m | support window 898 at 250 m, 27 at 500 m (curve dropped beyond 445 m) r = 100 m: L - r = 184.7 (pointpats, bounding box) | 93.2 (borough, no correction) | 95.3 (borough, border) | 78.7 (100 m support window, border) CSR mean in the borough: -1.3 without correction, -0.1 with border correction r = 250 m: L - r = 263.3 (pointpats, bounding box) | 98.3 (borough, no correction) | 99.9 (borough, border) | 77.2 (100 m support window, border) CSR mean in the borough: -7.5 without correction, -0.2 with border correction r = 500 m: L - r = 333.0 (pointpats, bounding box) | 65.1 (borough, no correction) | 76.3 (borough, border) | nan (100 m support window, border) CSR mean in the borough: -28.9 without correction, -0.5 with border correction === global MAD test against CSR === MAD on L(r) - r, 0-500 m: observed 103.9 m; CSR simulations 2.5 m median, 10.3 m max; p = 0.005 pointwise envelope check: 13% of CSR patterns leave the envelope of the other 198 at one or more of 101 distances === random labelling: are planes more clustered than council trees in general? === L - r vs random labelling: above the envelope at 5-465 m (93 of 101 distances), below at none r = 20 m: planes 54.7 m | all council trees 20.1 m | random-label envelope 18.3 to 22.2 r = 50 m: planes 78.6 m | all council trees 31.0 m | random-label envelope 28.8 to 34.8 r = 100 m: planes 95.3 m | all council trees 42.0 m | random-label envelope 38.7 to 46.8 r = 200 m: planes 103.4 m | all council trees 52.9 m | random-label envelope 47.6 to 58.7 r = 400 m: planes 89.0 m | all council trees 66.4 m | random-label envelope 56.5 to 75.9 MAD test vs random labelling: observed 54.4 m; simulations median 4.6 m, max 14.9 m; p = 0.005 restricted to 0-100 m: p = 0.005 restricted to 100-500 m: p = 0.005 wrote output\camden_london_planes.gpkg and output\camden_windows.gpkg