Methodology

Attack Plan
1. Go to the senator’s vote record page. I used Spidere for my first attempt because he’s on my friends list, so he’s the first one it occurred to me to try.
2. Right click to View Source. Hit CTRL-A and CTRL-C to copy the data, then dump it all in a word processor.
3. Select and delete everything but the voting record (you can search for the second instance of “Votes cast” and delete everything above it, then search for the name of the last vote and delete everything below it.)
4. Next I had to extract the data you needed and discard the rest. I decided that the easiest way to standardize vote records for analysis was to move everything to a predictable location using find-and-replace runs. Looking at the raw file, I predicted the following would do the trick:
   replacing [^t^t<div class="u_lista g"><span class="u_date">] (^t stands in for tab in MS Word Find and Replace) with [] (null)
   replacing [^t^t<div class="u_lista "><span class="u_date">] with []
   replacing [</span> ^p^t<div class="ihold"><a href="http://sf0.org/] (^p for a hard line break) with [@@@]
   replacing [/"><img  class="] with [@@@]
   replacing [/"><img  style = "background-image:url(/SFmedia/c.php?mc=] with [@@@]
      (The two above are either/or: the first one will isolate the class code for single- or no-team tasks, the latter deals with the style code for multiple teams)
   replacing ["  src="http://sf0.org/media/] with [@@@]
   replacing [" width="30" height="30" align="left"></a></div>^p^t<div><a href="http://sf0.org/] with [@@@]
   replacing [/"><strong>] with [@@@]
   replacing [</strong><div class="u_c">] with [@@@]
   replacing [</div></a></div>^p^t</div>^p^t^t^p] with [^p]

Testing the Method
If I’ve done this right, each change (or sometimes a pair of changes) ought to result in the same number of replacements as votes. Let’s run a test run on Spidere’s data and see.
   1. replace [^t^t<div class="u_lista g"><span class="u_date">] (^t stands in for tab in MS Word find and replace) with [] (null)... 247. (Why doesn’t that cover all 494 of his votes? Oh, right, that’s because there are also a bunch that use in ="u_lista " instead of “u_lista g”. So that means we need to add:
   2. replace [^t^t<div class="u_lista "><span class="u_date">] with []... which yields 246. 247+246=493, which is close enough for me right now.
   3. replace [</span> ^p^t<div class="ihold"><a href="http://sf0.org/] with [@@@]...yields 493. Where is that pesky nonconformist? Oh well. I’ll figure it out eventually.
   4. replace [/"><img  class="] with [@@@]... 397. Which tells me that about 80% of his votes are for single-color tasks. Spoiler warning!
   5. replace [/"><img  style = "background-image:url(/SFmedia/c.php?mc=] with [@@@]... 96. 397+96 = 493. Hmm. Did I lose a task somehow? But the first one and the last one match up to his page, so I’m going to continue not worrying for now.
   6. replace ["  src="http://sf0.org/media/] with [@@@]... 452. Uh-oh. The fact that this didn’t catch everything reveals to me that the non-photo proofs are stored in a different place. The SFmedia directory should cover the others:
   7. replace ["  src="http://sf0.org/SFmedia/] with [@@@]...41+452=493, which is good enough for now.
   8. replace [" width="30" height="30" align="left"></a></div>^p^t<div><a href="http://sf0.org/] with [@@@]...493.
   9. replace [/"><strong>] with [@@@]... 493
   10. replace [</strong><div class="u_c">] with [@@@]... 493
   11. replace [</div></a></div>^p^t</div>^p^t^t^p] with [^p]... 491. Huh. I guess one of these would fall after the last recorded task, but I’m not sure where the other went.
   After running through all of these, I saved the text of the initial run as Spidere0.txt, then scrolled through it to see what I wound up with. The first thing I spotted is that the one obviously non-transformed bit was right underneath a (mutual) vote for our mutual friend James (no nepotism there, I’m sure), so I briefly speculated that there was a special notation for shared votes, then quickly realized that that extra code was actually for the “show all” link, and its location was just a coincidence. That means we need to throw in one more fix for future runs:
   12. replace [</div></a></div>^p^t</div>^p^t^t^t<a href="javascript:show_e('more_cast')" style="margin-left:3%;">show all</a>^p^t^t<div id="more_cast" style="display:none;">^p^t^t^p] with [^p] to clear the “show all” button. 
   I’m guessing the numerical discrepancy in run 11 has something to do with this as well. Everything else looks basically okay, but I still have no idea where the 494th vote is. For now I’m going to say it was either a computer miscount or a lost vote. And, let’s face it, one lost vote will probably be statistically insignificant against 493 others.

Developing the Analysis
Now for the fun part! I start by replacing every [@@@] in the test file with [^t], and then opening it in Excel for analysis.
   The columns that are relevant to my mission are A, C, F, and G. I just need to write formulas that will interpret them to my liking. Here’s what I eventually come up with:
   A. Timing: To assign points to the days of the week, I put [=TEXT(WEEKDAY(A1),"ddd")] in column H and [=IF(EXACT(H2,"Mon"),3.5,(IF(EXACT(H2,"Tue"),3,(IF(EXACT(H2,"Thu"),2.5,(IF(EXACT(H2,"Wed"),2,(IF(EXACT(H2,"Fri"),1.5,(IF(EXACT(H2,"Sun"),1,0.5)))))))))))] in column I.
   B. Gouposity: For the group, I can look at the length of the value to figure out if more than one group is involved: 0 points for “L0” (the color for general tasks), 1 point for anything non-general that still has 2 characters, 5 points if all five groups are involved [len(009FD7,E41F15,000000,FFE301,66FF00);)=36], and 4 points for anything else. The resulting formula is [=IF(EXACT(C2,"L0"),0,(IF(LEN(C2)=2,1,IF(LEN(C2)=36,4,3))))], which goes into column J.
   C. Collaboration: The trick to assessing how many players participated in a particular task is to count the number of commas in the player list, which you can do with [=SUM(LEN(G1)-LEN(SUBSTITUTE(G1,",",""))+1)] (in column K). Then you can assign points to those data values with a formula like [=IF(K2=1,0,(IF(K2=2,1,IF(K2=3,2,3))))].
   D. Verbosity: The number of spaces in the task name will tell us the number of words, so I add [=SUM(LEN(F2)-LEN(SUBSTITUTE(F2," ",""))+1)] to column M and [=IF(M2<=3,0,IF(M2=4,1,IF(M2=5,2,IF(M2=6,3,4))))]. to column N.

Applying what we learned
Now that all the thinking is done, there’s the grunt work of applying the same methods to the other Senators. I pulled their records at about 2:45 a.m. on Saturday, January 26th, and checked to make sure Spidere’s hadn’t changed in the meantime. At that point, the total vote counts were as follows:
Name	Votes	1	2	3	4	5	6	7	8	9	10	11	12	
The Same (burnunit)	882	440	440	880	686	194	809	71	880	880	880	879	1	
Cthulhu Kitty (katotoro)	390	195	194	389	304	85	352	37	389	389	389	388	1	
p00n p00n (MFC)	187	92	92	184	143	41	169	15	184	184	184	183	1	
Eleanorest	8	4	4	8	8	0	5	3	8	8	8	8	0	
Lowteck	513	254	254	508	428	80	450	58	508	508	508	507	1	
Spidere	486	(see above)	-	-	-	-	-	-	-	-	-	-	-	
Interrex Lincoln (Lincoln)	582	291	291	582	462	120	547	35	582	582	582	581	1	
Darkaardvark	215	108	107	215	173	42	189	26	215	215	215	214	1	
I decided to track the transformations just to make sure everything was working. It seemed like everything was, save that my 12th transformation wound up deleting the line break between votes 10 and 11, so I amended the formula slightly and fixed the output files.
   For easier readability, I decided to add a row at the top of each file that would automatically fill in column headers. That means the last two steps in the process are:
13. Replace [@@@] with [^t]
14. Add
         [DATE	#	GROUP	#	#	TASK	PLAYERS	#	TIMING	GROUPOSITY	#	COLLABORATION	#	VERBOSITY	TOTAL	ANALYZE]
   as the first line of each record.
After that, it was just a question of bringing the files into Excel and pasting all of the analysis formulas in the correct locations. Please see the writeup for my thoughts on what this all means.

(Part of the praxis for http://sf0.org/tasks/Senatorial-Oversight/ by http://sf0.org/TooMuchExposition/)