diff --git a/core/views/statistics.py b/core/views/statistics.py index 30fc1b5f..7bf65206 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -32,7 +32,13 @@ def legs_by_expo(expos): legsyear += int(sb.legsall) addupsurvexlength += survexleglength addupsurvexlegs += legsyear - legsbyexpo.append((expedition, {"nsurvexlegs": legsyear, "survexleglength": survexleglength})) + + expoers = PersonExpedition.objects.filter(expedition=expedition).count() + if expoers > 0: + success = survexleglength/expoers + else: + success = "" + legsbyexpo.append((expedition, {"success":success, "people": expoers, "nsurvexlegs": legsyear, "survexleglength": survexleglength})) legsbyexpo.reverse() return legsbyexpo, addupsurvexlegs, addupsurvexlength diff --git a/templates/statistics.html b/templates/statistics.html index 2daec6a8..44b6eec4 100644 --- a/templates/statistics.html +++ b/templates/statistics.html @@ -10,25 +10,28 @@
Number of survey legs: {{nsurvexlegs}}
Total length: {{addupsurvexlength|stringformat:".1f"}} km adding up the total for each year.
These are uncorrected tape lengths which include pitches and duplicates but exclude splays or surface-surveys. +
These are uncorrected tape lengths which include pitches and duplicates but exclude splays or surface-surveys. They are also before any loop-closure corrections.
-
This only includes lengths surveyed by Expo survey trips (though not all have valid Expo-attendees as some survex files are administrative collections of *include statements). This no longer (since 30 June 2025) includes ARGE and other non-expo surveys. +
This only includes lengths surveyed by Expo survey trips (though not all have valid Expo-attendees as some survex files are administrative collections of *include statements). This no longer (since 30 June 2025) includes non-expo surveys (ARGE and others).
| Year | Survex Survey Blocks | Survex Survey Legs | Survex length(m) | ||
|---|---|---|---|---|---|
| Year | Survex Survey Blocks | Survex Survey Legs | Survex length(m) | Cavers | meters/caver |
| {{legs.0}} | {{legs.0.survexblock_set.all|length}} | {{legs.1.nsurvexlegs|rjust:"10"|floatformat:"0g"}} | {{legs.1.survexleglength|floatformat:"0g"}} | +{{legs.1.people|floatformat:"0g"}} | +{{legs.1.success|floatformat:"1g"}} |
One Survex Survey Block is one *begin/*end block of data in a survex file. Some files from other caving clubs may have a convention of using many more blocks per file than we do, e.g. if the -file is exported from other software into survex format. +file is exported from other software into survex format, but each block is recroded on a single day. +
Currently the number of cavers includes non-caving attendees: that needs to be fixed.