R, Julia, SQL, Octave and others: Personal notes on data analysis, computation, data access most especially for querying voter history, Census, PDC, and other election data. Reader is advised to just paste the code text into Notepad++.
Friday, December 26, 2014
Understanding Voter Updates
Some of the Age and Precinct charting code updated 12:55 PM 12/29/201 -RMF
Political piece will be here. Output differentiated from R (3.12) code with text color red.
Sunday, December 14, 2014
Analysis of 2012 - 2014 General Election Matchbacks: Part II
Analysis of 2012 - 2014 General Election Matchbacks: Part II By Age. Political piece here. The data from this comes from Part I.
Tuesday, December 9, 2014
Analysis of 2012 - 2014 General Election Matchbacks: Part I
Updated 5:00 PM 12/14/2014 -RMF. Political piece under construction.
Friday, December 5, 2014
Analysis of Final Matchbacks for 2014
Analysis of Final Matchbacks for 2014. Political piece here.
Thursday, November 6, 2014
Votes left on the Table
This R code is designed to accumulate "MatchBacks" from and election and return results. I then bind a recent voterdb to see how many and what percentage (on a precinct level) of votes were "left on the table".
Thursday, October 30, 2014
Three ballotcounted dispositions mapped per precinct for two elections plus their difference
precinctid | ge2013blank | ge2012blank | bdiff | ge2013count | ge2012count | cdiff | ge2013notcount | ge2012notcount | ncdiff
801 | 38 | 63 | -25 | 311 | 504 | -193 | 339 | 121 | 218
701 | 31 | 56 | -25 | 387 | 578 | -191 | 340 | 124 | 216
611 | 32 | 54 | -22 | 343 | 468 | -125 | 206 | 59 | 147
610 | 42 | 72 | -30 | 567 | 734 | -167 | 267 | 70 | 197
609 | 44 | 82 | -38 | 530 | 740 | -210 | 335 | 87 | 248
608 | 35 | 66 | -31 | 413 | 570 | -157 | 270 | 82 | 188
607 | 28 | 49 | -21 | 429 | 555 | -126 | 218 | 71 | 147
606 | 46 | 68 | -22 | 449 | 637 | -188 | 312 | 102 | 210
605 | 21 | 36 | -15 | 289 | 386 | -97 | 158 | 46 | 112
604 | 45 | 73 | -28 | 389 | 578 | -189 | 298 | 81 | 217
603 | 50 | 77 | -27 | 341 | 529 | -188 | 298 | 83 | 215
...
This postgres SQL (9.5) takes the three ballotcounted dispositions (null, 0, 1) and maps them each per precinct for two elections and shows the difference for each disposition between the two elections. This was over 140 lines of SQL; so there must be a simpler but more optimized method of obtaining the same result with the OVER or WITH statements. My joins are lacking in sophistication. However, despite the fact that my code is wordy and unreadable; there is no noticeable delay in function or speed. Political piece here.
Thursday, October 23, 2014
Measure per precinct turnout for active voters
Poltical piece is here.
