commit 9953f9d7648017ff9e8e98972beb5912a42cde37
parent edcbb997c5b2264872c74ce04b266a43766ab3a4
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Mon, 3 Oct 2022 19:26:55 +0200
fix
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/addnoise.py b/addnoise.py
@@ -5,8 +5,6 @@ from random import uniform
noise = float(sys.argv[1])
-print( "mode,distance in meters")
-
for l in sys.stdin.readlines():
f = l.strip().split(',')
mode = f[0]
diff --git a/run.sh b/run.sh
@@ -16,7 +16,10 @@ then
fi
./compute.py "$FILE" "$LOCALCODE" > trips
-paste -d, trips <(cut -d, -f2,3 trips | tr ',' ' ' | sed "s/^/$LAT $LON /" | GeodSolve -i| cut -d ' ' -f3 ) | sort -t',' -k4,4nr > trips_with_dist
-./addnoise.py "$NOISE" < trips_with_dist > trips_anonymized.csv
+paste -d, trips \
+ <(cut -d, -f2,3 trips | tr ',' ' ' | sed "s/^/$LAT $LON /" | GeodSolve -i| cut -d ' ' -f3 ) |
+ sort -t',' -k4,4nr > trips_with_dist
+./addnoise.py "$NOISE" < trips_with_dist | sort -t',' -k2,2n |
+ cat <(echo 'mode,distance in meters') - > trips_anonymized.csv
python3 co2.py < trips_with_dist > trips_with_footprint