-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
56 lines (36 loc) · 1.76 KB
/
README
File metadata and controls
56 lines (36 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Scripts to Count Messages from Google
==============================================================
Author: Benjamin Mako Hill (mako@atdot.cc)
License: GNU General Public License version 3 or any later version
Code: http://projects.mako.cc/source/?p=gmail-maildir-counter
I wrote this code in order to do the analysis I posted in this blog
post:
http://mako.cc/copyrighteous/google-has-most-of-my-email-because-it-has-all-of-yours
If you want to send me patches or bugfixes, details on how to do that
are here:
http://projects.mako.cc/source/
1. Parse your mailbox using the count_gmail.py script
--------------------------------------------------------------
I ran the script like this:
$ python count_gmail.py ~/incoming/mail/default > mail_metadata.tsv
2. Parse the output using analysis.R
--------------------------------------------------------------
If have not used R, you will to install R and three libraries I use in
the script.
First, install R. In Debian and Ubuntu, the package is r-base.
You will then need to install three R libraries. The easiest way to do
that is from within R. To start R, just invoke it from your shell:
$ R
Once R is running, you can install the packages by running these three
commands from within the R interactive shell:
> install.packages("data.table")
> install.packages("ggplot2")
> install.packages("reshape")
Once youv'e done that, you can run the scripts. I run R interactively
in Emacs/ESS but you might want to use RStudio if you are not familiar
with Emacs. Alternatively, if you also output into mail_metadata.tsv,
you can just run:
$ R --no-save < analysis.R
It will create the two PDFs files of graphs for you in the local directory.
The I converted the PDFs into PNGs with imagemagick's mogrify:
$ mogrify -format png *pdf