Introduction
Introduction Statistics Contact Development Disclaimer Help
tCalculate average weekly use per tag - bitreich-memestats - statistical analys…
git clone git://src.adamsgaard.dk/bitreich-memestats
Log
Files
Refs
---
commit 2663b2f37121a05ddedc89592d906462030527af
parent 8b2c68445d43d0c94c54acda78111be3c9bcc8dd
Author: Anders Damsgaard <[email protected]>
Date: Fri, 17 Apr 2020 11:02:33 +0200
Calculate average weekly use per tag
Diffstat:
M Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/Makefile b/Makefile
t@@ -1,16 +1,24 @@
log = ~/.irssi/log/Freenode/\#bitreich-en.log
-all: all_time_use.tsv
+all: all_time_use.tsv all_time_popularity.tsv
+# format: day<tab>date<tab>time<tab>user<tab>tag
memeuse.tsv: extract_memeuse.awk
awk -f extract_memeuse.awk $(log) > $@
+# format: total_uses<tab>tag
all_time_use.tsv: memeuse.tsv
cut -f5 memeuse.tsv | sort | uniq -c | sort -r | \
awk '{print $$1"\t"$$2}' > $@
+# format: avg_uses_per_week<tab>tag
+all_time_popularity.tsv: memeuse.tsv all_time_use.tsv
+ awk -v N_weeks="$$(awk 'END{print $$1/7}' memeuse.tsv)" \
+ '{print $$1/N_weeks"\t"$$2}' all_time_use.tsv > $@
+
clean:
rm -f memeuse.tsv
rm -f all_time_use.tsv
+ rm -f all_time_popularity.tsv
.PHONY: all clean
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.