mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-01-19 06:02:58 +00:00
fixing many things which are just wrong
This commit is contained in:
@@ -18,6 +18,9 @@ from troggle.parsers.people import GetPersonExpeditionNameLookup, foreign_friend
|
||||
the status of data inconsistencies. Also the wallets summary report.
|
||||
"""
|
||||
def legs_by_expo(expos):
|
||||
"""This depends rather deeply on precisely how the survex parser has selected what it records
|
||||
from each survex file
|
||||
"""
|
||||
legsbyexpo = []
|
||||
addupsurvexlength = 0.0
|
||||
addupsurvexlegs = 0
|
||||
@@ -33,12 +36,13 @@ def legs_by_expo(expos):
|
||||
addupsurvexlength += survexleglength
|
||||
addupsurvexlegs += legsyear
|
||||
|
||||
expoers = PersonExpedition.objects.filter(expedition=expedition).count()
|
||||
expoers = PersonExpedition.objects.filter(expedition=expedition, noncaver=False).count()
|
||||
if expoers > 0:
|
||||
success = survexleglength/expoers
|
||||
else:
|
||||
success = ""
|
||||
legsbyexpo.append((expedition, {"success":success, "people": expoers, "nsurvexlegs": legsyear, "survexleglength": survexleglength}))
|
||||
tourists = PersonExpedition.objects.filter(expedition=expedition, noncaver=True).count()
|
||||
legsbyexpo.append((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength}))
|
||||
legsbyexpo.reverse()
|
||||
return legsbyexpo, addupsurvexlegs, addupsurvexlength
|
||||
|
||||
@@ -111,7 +115,7 @@ def svxfilewild(request, year=None):
|
||||
|
||||
def stats(request):
|
||||
"""Calculates number of survey blocks, the number of survey legs and the survey length for each year.
|
||||
This is only underground survey legs, but includes ARGE as well as Expo survex files.
|
||||
This is only underground survey legs, but includes "wild" as well as walleted survex files.
|
||||
"""
|
||||
statsDict = {}
|
||||
statsDict["caveCount"] = f"{Cave.objects.count():,}"
|
||||
@@ -121,14 +125,16 @@ def stats(request):
|
||||
|
||||
#statsDict["expoCount"] = f"{Expedition.objects.count():,}" # incorrect as no expo in 76, 2020,21
|
||||
n = int(current_expo()) - 1975 - 3
|
||||
statsDict["expoCount"] = f"{n:,}" # incorrect as no expo in 76, 2020,21
|
||||
statsDict["expoCount"] = f"{n:,}"
|
||||
|
||||
expos = Expedition.objects.all()
|
||||
legsbyexpo, addupsurvexlegs, addupsurvexlength = legs_by_expo(expos)
|
||||
adduplength = f"{addupsurvexlength/1000:.1f}"
|
||||
adduplegs = f"{addupsurvexlegs:,}"
|
||||
|
||||
renderDict = {
|
||||
**statsDict,
|
||||
**{"addupsurvexlength": addupsurvexlength / 1000, "legsbyexpo": legsbyexpo, "nsurvexlegs": addupsurvexlegs, "year": current_expo()},
|
||||
**{"adduplength": adduplength, "legsbyexpo": legsbyexpo, "adduplegs": adduplegs, "year": current_expo()},
|
||||
} # new syntax
|
||||
return render(request, "statistics.html", renderDict)
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ cave survex path '{{ cave.areacode }}/{% if cave.kataster_number %}{{cave.katast
|
||||
{% if cave.explorers %}
|
||||
<h3>Initially explored by</h3>
|
||||
<p> {{ cave.explorers|safe }}<br />
|
||||
<p>[This is a fossil: it used to show whether the cave was explored by CUCC/expo or by another group, but that information is now available in the survex files recording the surveying, see <a href="/survexfile/{{cave.survex_file}}">the primary survex file</a>.]
|
||||
<p>[This field is a fossil: it used to show whether the cave was explored by CUCC/expo or by another group, but that information is now available in the survex files recording the surveying, see <a href="/survexfile/{{cave.survex_file}}">the primary survex file</a>. However, some caves do not have any survex files, in which case this information is worth keeping.]
|
||||
{% endif %}
|
||||
<div id='scene'></div>
|
||||
{% endif %}
|
||||
|
||||
@@ -76,6 +76,6 @@
|
||||
{% endif %}
|
||||
{% if entrance.explorers %}
|
||||
<h3>Initially explored by</h3>
|
||||
{{ entrance.explorers|safe }} <br />[This is probably outdated fossil data.]
|
||||
{{ entrance.explorers|safe }} <br />[This field is probably outdated fossil data.]
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Expo statistics{% endblock %}
|
||||
{% block title %}Expo survey statistics{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Expedition Statistics</h1>
|
||||
<h1>Expo Survey Statistics</h1>
|
||||
|
||||
<p>{{ expoCount }} expeditions: {{ personCount }} people, {{ caveCount }} caves, {{ walletsCount }} wallets and {{ logbookEntryCount }} logbook entries.
|
||||
|
||||
<p>Number of survey legs: {{nsurvexlegs}} <br />
|
||||
Total length: {{addupsurvexlength|stringformat:".1f"}} km adding up the total for each year.</p>
|
||||
<p>Number of survey legs: {{adduplegs}} <br />
|
||||
Total length: {{adduplength}} km adding up the total for each year.</p>
|
||||
|
||||
<p>These lengths are from surveys which have been recorded in expo wallets. Non-expo surveys done by other clubs, and surveys
|
||||
<a href="/survexfilewild">which have not been properly recorded</a>
|
||||
in an expo wallet are excluded.
|
||||
<p>These are <em>uncorrected</em> tape lengths which include pitches and duplicates but exclude splays or surface-surveys. They are uncorrected
|
||||
because they are lengths <em>before</em> any loop-closure corrections done by survex.
|
||||
<p>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).
|
||||
<p>These lengths are not authoritative.
|
||||
<p>These are <em>uncorrected</em> tape lengths.They are uncorrected
|
||||
because they are lengths <em>before</em> any loop-closure corrections done by survex and because they <em>include duplicated surveys</em>. These numbers include pitches but exclude splays or surface-surveys.
|
||||
|
||||
<p>Authoritative survey lengths for each cave are calculated using <a href="/handbook/troggle/cavelengths.html">a script</a> which uses the
|
||||
<em>loop-closure corrected</em> lengths and is manually curated to exclude duplicate surveys of the same cave. The results are maintained
|
||||
<p>Authoritative survey lengths for each cave, as explored by expo participants, are calculated using <a href="/handbook/troggle/cavelengths.html">a script</a> which
|
||||
<ol><li>uses the
|
||||
<em>loop-closure corrected</em> lengths
|
||||
<li>is manually curated to exclude duplicate surveys of the same cave,
|
||||
<li>and to include only surveys by expo participants.
|
||||
</ol>
|
||||
|
||||
These authoritative results are maintained
|
||||
in an <a href="/repositories/loser/.git/tree/docs/smklengths.ods">ODS-format spreadsheet</a>.
|
||||
<p>
|
||||
|
||||
<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>meters/caver</th></tr>
|
||||
<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>
|
||||
@@ -30,6 +34,7 @@ in an <a href="/repositories/loser/.git/tree/docs/smklengths.ods">ODS-format spr
|
||||
<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>
|
||||
<td style="text-align:right">{{legs.1.tourists|floatformat:"0g"}}</td>
|
||||
<td style="text-align:right">{{legs.1.success|floatformat:"1g"}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -37,7 +42,9 @@ in an <a href="/repositories/loser/.git/tree/docs/smklengths.ods">ODS-format spr
|
||||
<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>Currently the number of cavers includes non-caving attendees: that needs to be fixed.
|
||||
<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.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user