mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
Identified survey length discrepencies
This commit is contained in:
parent
b88b142332
commit
35e9eb558d
@ -195,6 +195,10 @@ def walletslistyear(request, year):
|
|||||||
manywallets = ticksyearwallet(year)
|
manywallets = ticksyearwallet(year)
|
||||||
expeditions = Expedition.objects.all() #bad Django style
|
expeditions = Expedition.objects.all() #bad Django style
|
||||||
expedition = expeditions.filter(year=year)
|
expedition = expeditions.filter(year=year)
|
||||||
|
length_ug = 0.0
|
||||||
|
for w in manywallets:
|
||||||
|
for sb in w.survexblock_set.all():
|
||||||
|
length_ug += sb.legslength
|
||||||
print("--")
|
print("--")
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
@ -205,6 +209,7 @@ def walletslistyear(request, year):
|
|||||||
"year": year,
|
"year": year,
|
||||||
"expeditions": expeditions,
|
"expeditions": expeditions,
|
||||||
"expedition": expedition,
|
"expedition": expedition,
|
||||||
|
"length_ug": length_ug,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -166,6 +166,9 @@ def pathsreport(request):
|
|||||||
|
|
||||||
|
|
||||||
def stats(request):
|
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.
|
||||||
|
"""
|
||||||
statsDict = {}
|
statsDict = {}
|
||||||
statsDict["expoCount"] = f"{Expedition.objects.count():,}"
|
statsDict["expoCount"] = f"{Expedition.objects.count():,}"
|
||||||
statsDict["caveCount"] = f"{Cave.objects.count():,}"
|
statsDict["caveCount"] = f"{Cave.objects.count():,}"
|
||||||
@ -173,7 +176,7 @@ def stats(request):
|
|||||||
statsDict["logbookEntryCount"] = f"{LogbookEntry.objects.count():,}"
|
statsDict["logbookEntryCount"] = f"{LogbookEntry.objects.count():,}"
|
||||||
|
|
||||||
legsbyexpo = []
|
legsbyexpo = []
|
||||||
addupsurvexlength = 0
|
addupsurvexlength = 0.0
|
||||||
addupsurvexlegs = 0
|
addupsurvexlegs = 0
|
||||||
for expedition in Expedition.objects.all():
|
for expedition in Expedition.objects.all():
|
||||||
survexblocks = expedition.survexblock_set.all()
|
survexblocks = expedition.survexblock_set.all()
|
||||||
@ -184,7 +187,7 @@ def stats(request):
|
|||||||
legsyear += int(survexblock.legsall)
|
legsyear += int(survexblock.legsall)
|
||||||
addupsurvexlength += survexleglength
|
addupsurvexlength += survexleglength
|
||||||
addupsurvexlegs += legsyear
|
addupsurvexlegs += legsyear
|
||||||
legsbyexpo.append((expedition, {"nsurvexlegs": f"{legsyear:,}", "survexleglength": f"{survexleglength:,.0f}"}))
|
legsbyexpo.append((expedition, {"nsurvexlegs": legsyear, "survexleglength": survexleglength}))
|
||||||
legsbyexpo.reverse()
|
legsbyexpo.reverse()
|
||||||
|
|
||||||
renderDict = {
|
renderDict = {
|
||||||
|
@ -353,7 +353,7 @@ def svx(request, survex_file):
|
|||||||
svxlength = 0.0
|
svxlength = 0.0
|
||||||
for b in svxblocksall:
|
for b in svxblocksall:
|
||||||
svxlength += b.legslength
|
svxlength += b.legslength
|
||||||
print(svxlength,b)
|
print(svxlength,b, b.legsall)
|
||||||
except AttributeError: # some survexfiles just *include files and have no blocks themselves
|
except AttributeError: # some survexfiles just *include files and have no blocks themselves
|
||||||
svxblocksall = []
|
svxblocksall = []
|
||||||
else:
|
else:
|
||||||
|
@ -12,18 +12,18 @@ Total length: {{addupsurvexlength|stringformat:".1f"}} km adding up the total fo
|
|||||||
|
|
||||||
<p>These are uncorrected tape lengths which include pitches and duplicates but exclude splays or surface-surveys.
|
<p>These are uncorrected tape lengths which include pitches and duplicates but exclude splays or surface-surveys.
|
||||||
<p>
|
<p>
|
||||||
This is work in progress (March 2023): the last column is floatng point numbers, the 3rd column appears to be strings..
|
This is work in progress (March 2023): the underground survey length does not match that in e.g.
|
||||||
|
<a href="/wallets/year/2018">wallets for 2018</a> probably because ARGE surveys are not in any of our wallets.
|
||||||
<p>This includes ARGE and other surveys currently. It will be changed to only include lengths surveyed by valid Expo-attendees.
|
<p>This includes ARGE and other surveys currently. It will be changed to only include lengths surveyed by valid Expo-attendees.
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Year</th><th>Survex<br>Survey<br>Blocks</th><th>Survex<br>Survey Legs</th><th>Total length<br>(m)</th><th>Total length<br>(m)</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></tr>
|
||||||
{% for legs in legsbyexpo %}
|
{% for legs in legsbyexpo %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:center"><a href="{{ legs.0.get_absolute_url }}">{{legs.0}}</a></td>
|
<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.0.survexblock_set.all|length}}</td>
|
||||||
<td style="text-align:center">{{legs.1.nsurvexlegs|rjust:"10"}} </td>
|
<td style="text-align:center">{{legs.1.nsurvexlegs|rjust:"10"|floatformat:"0g"}} </td>
|
||||||
<td style="text-align:right">{{legs.1.survexleglength}}</td>
|
<td style="text-align:right">{{legs.1.survexleglength|floatformat:"0g"}}</td>
|
||||||
<td style="text-align:right">{{legs.1.survexleglength|floatformat:0}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -80,7 +80,7 @@ LOGMESSAGES
|
|||||||
-->
|
-->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
survey length: {{svxlength|floatformat:2}} metres
|
undergound survey length: {{svxlength|floatformat:2}} metres
|
||||||
<span style="font-family: monospace; font-size: 130%; ">
|
<span style="font-family: monospace; font-size: 130%; ">
|
||||||
{% for sb in svxblocks %}
|
{% for sb in svxblocks %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
@ -29,6 +29,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
|
|||||||
|
|
||||||
{% include 'wallet_table.html' %}
|
{% include 'wallet_table.html' %}
|
||||||
<p>Note that names in italics are copied from the related survex file block name.
|
<p>Note that names in italics are copied from the related survex file block name.
|
||||||
|
<p>Total underground survey length: {{length_ug|floatformat:"1g"}} m
|
||||||
<br />
|
<br />
|
||||||
<table width=95%>
|
<table width=95%>
|
||||||
<tr><th>Wallet</th><th width=13%>Wallet Date</th><th>Wallet Name</th><th width=25%>People</th><th width=8%>Cave</th><th>Scans</th><th>Survex blocks</th><th>Drawings using these scans</th></tr>
|
<tr><th>Wallet</th><th width=13%>Wallet Date</th><th>Wallet Name</th><th width=25%>People</th><th width=8%>Cave</th><th>Scans</th><th>Survex blocks</th><th>Drawings using these scans</th></tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user