2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-01-18 16:42:48 +00:00

now consistent with survex blocks only from expo

This commit is contained in:
2025-10-31 12:19:21 +02:00
parent 0a5e779dfd
commit e39037b333
3 changed files with 9 additions and 6 deletions

View File

@@ -28,11 +28,13 @@ def legs_by_expo(expos):
for expedition in expos:
survexblocks = expedition.survexblock_set.all()
legsyear = 0
nblocks = 0
survexleglength = 0.0
for sb in survexblocks:
if not sb.foreigners:
survexleglength += sb.legslength
legsyear += int(sb.legsall)
nblocks += 1
addupsurvexlength += survexleglength
addupsurvexlegs += legsyear
@@ -42,7 +44,7 @@ def legs_by_expo(expos):
else:
success = ""
tourists = PersonExpedition.objects.filter(expedition=expedition, noncaver=True).count()
legsbyexpo.append((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength}))
legsbyexpo.append((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength, "nblocks": nblocks}))
legsbyexpo.reverse()
return legsbyexpo, addupsurvexlegs, addupsurvexlength

View File

@@ -25,12 +25,15 @@ These authoritative results are maintained
in an <a href="/repositories/loser/.git/tree/docs/smklengths.ods">ODS-format spreadsheet</a>.
<p>
<!--
legsbyexpo: ((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength, "nblocks": nblocks}))
-->
<table>
<tr><th>Year</th><th>Survex<br>Survey<br>Blocks</th><th>Survex<br>Survey Legs</th><th>Survex <br>length(m)</th><th>Cavers</th><th>Non-cavers</th><th>meters/caver</th></tr>
{% for legs in legsbyexpo %}
<tr>
<td style="text-align:center"><a href="{{ legs.0.get_absolute_url }}">{{legs.0}}</a></td>
<td style="text-align:center">{{legs.0.survexblock_set.all|length}}</td>
<td style="text-align:center">{{legs.1.nblocks}}</td>
<td style="text-align:center">{{legs.1.nsurvexlegs|rjust:"10"|floatformat:"0g"}} </td>
<td style="text-align:right">{{legs.1.survexleglength|floatformat:"0g"}}</td>
<td style="text-align:right">{{legs.1.people|floatformat:"0g"}}</td>
@@ -39,9 +42,7 @@ in an <a href="/repositories/loser/.git/tree/docs/smklengths.ods">ODS-format spr
</tr>
{% endfor %}
</table>
<p>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, but each block is recorded on a single day.
<p>One Survex Survey Block is one *begin/*end block of data in a survex file. Different survex blocks in the same survex file can have different dates and surveyors.
<p>The number of cavers excludes those attending who were not caving. This is something of a distortion as non-cavers
may still be doing useful expo-related work such as prospecting, ferrying gear and preparing food.
Non-cavers also include the bier tent and Rover Richardson, see <a href="/folk/index.html">the folk list</a> for details.

View File

@@ -63,7 +63,7 @@ Length of survex data referenced by wallets in this year {{walletslength|floatfo
{% for legs in legsbyexpo %}
<tr>
<td style="text-align:center"><a href="{{ legs.0.get_absolute_url }}">{{legs.0}}</a></td>
<td style="text-align:center">{{legs.0.survexblock_set.all|length}}</td>
<td style="text-align:center">{{legs.1.nblocks}}</td>
<td style="text-align:center">{{legs.1.nsurvexlegs|rjust:"10"|floatformat:"0g"}} </td>
<td style="text-align:right">{{legs.1.survexleglength|floatformat:"0g"}}</td>
</tr>