From 8788b2a40ace4201c40d0d4a1e8460e19e13b70b Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sat, 27 Apr 2024 00:10:42 +0000 Subject: [PATCH] Update Scripts for getting stats --- Scripts-for-getting-stats.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Scripts-for-getting-stats.md b/Scripts-for-getting-stats.md index 5d08b7b..30ba72c 100644 --- a/Scripts-for-getting-stats.md +++ b/Scripts-for-getting-stats.md @@ -1 +1,15 @@ -Welcome to the Wiki. \ No newline at end of file +Average score for each level: + +```bash +$ csvjson output.csv | jq -c 'map(select(.Lamp != "Fail")) | group_by(.Rating) | map(. | [(.[0].Rating | round), (map(.Score) | length as $length | add / $length | round)]) | .[]' +[8,895073] +[9,909287] +[10,915836] +[11,896387] +[12,889375] +[13,836118] +[14,799162] +[15,800785] +[16,774763] +[17,662870] +``` \ No newline at end of file