Etiqueteur: October labels for 8 stations; its folder moves to labeling/auto/etiqueteur/, analyses and scripts versioned (D-126)
Labels for CLARIDEN, FLORIDA, JUNGFRAU (gaps 06-20.10, 26.10-01.11), LENZSPITZE, NIEDERHORN, NORDEND, SNCF01, WILDSTRUBEL. Figures and tool outputs stay out of git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2bba388290
commit
6fbd7510b7
112 files changed
+8951
-6
No files matched your search
@@ -0,0 +1,15 @@
|
||||
"""usage: metrique.py NOM1,NOM2 DEBUT FIN -> une ligne par heure, une colonne par métrique (metrics/ NIEDERHORN)."""
|
||||
import csv, glob, sys
|
||||
|
||||
noms, debut, fin = sys.argv[1].split(','), sys.argv[2], sys.argv[3]
|
||||
tab = {}
|
||||
for n in noms:
|
||||
for f in glob.glob(f'data/NIEDERHORN/metrics/NIEDERHORN_{n}_2026_*.csv'):
|
||||
with open(f) as fh:
|
||||
for r in csv.DictReader(fh):
|
||||
t = r['time_utc'][:16].replace(' ', 'T') + 'Z'
|
||||
if debut <= t <= fin:
|
||||
tab.setdefault(t, {})[n] = r['metric']
|
||||
print('instant', *noms, sep='\t')
|
||||
for t in sorted(tab):
|
||||
print(t[5:16], *[tab[t].get(n, '') for n in noms], sep='\t')
|
||||
Reference in new issue
Block a user