Friday, June 13, 2014

PDC Database : Frequency vs. Donation size in the 42nd LD to date

The political piece for this code is hereThis R (3.1.0) code helped me dig into the PDC database to understand campaign financing for the 42nd LD in WA. The first example gives a jpeg_create() I used for automated printing, but I had some trouble applying it for all my charts configured par(mfrow) . Hadley Wickham's Advanced R text on data structures gave me the stringsAsFactors = FALSE setting for read.csv.  I have an intuition that could be a useful flag. QQplot seems to portray certain types of data that would otherwise be complicated to understand very well. One such data is comparing the frequency vs. donation size of out both in and out of state donations in a specific political district.

Saturday, June 7, 2014

05.20.2014 Whatcom County Voter General Election Database: The Precincts....





The political piece for this code is here.  I received quite a bit of practice in the skill of sending multivariate graphs to file for this piece. Election databases nearly scream for raster and GIS files.  Something to learn next....

Wednesday, June 4, 2014

Boomers vs. Millenials ...


Political post for this code is here.



Hadley Wickham has said that one of the problems with R is that it isn't very "programmerly".  In working through R loops in complex functions, I have discovered this. Here is what I want to do:

for (i in 1:5)  {VDB_M <- as.data.frame(table(VDB_N%i%$BirthDate)) ... }

where %i% is the set of variables I want to loop through. If there is a method for doing that, I can not find it yet.  Clearly a Python or Powershell wrapper might be the answer.   But it is a big language and maybe applying functions in R for the data analyst needs more research on my part.