#!/bin/bash
# table3: generate numbers of table 3 of sasn2012 paper tks&bos
# usage: bin/table3
# note: fun from base directory
# 20120312 erikt(at)xs4all.nl

INFILE="data/20110216"
TMPFILE="table1.$$.$RANDOM"

# count tweets
bin/onePartyPerTweet < $INFILE | bin/oneTweetPerUser |\
   bin/grep.count.pl.test > $TMPFILE
# convert tweet counts to seats and compute offset
cut -d' ' -f2,4 $TMPFILE | bin/tweets2seats.test | bin/offset.test |\
   paste -d' ' $TMPFILE - | sed 's/^ off/  off/' | cut -d' ' -f3,4,6,8

rm -f $TMPFILE
exit 0
