RonRules
Member
- Joined
- Dec 25, 2007
- Messages
- 4,485
Ok, so I have been looking into R and have had a surprisingly easy time learning it. The way they deal with the data was confusing for a while, because it is very different from a traditional programming language. I have also found that there seems to be a function to do anything. I write out 15-20 lines of code to do something, and then later come back and replace it with a 1 line R function that I found.
RonRules, I think the math for computing the cumulative totals and percentages should be easy(~30 lines of R or less). The part I am having the hardest time with is rearranging the data before I do the math. If the data for TX or CA is fairly standard then it might help me to see some of the .csv files from those 2 states.
Thank you so much for taking this on. Indeed, because the data formats vary a lot, and within a state they vary, it makes the job difficult.
Nebraska's elections were just yesterday, so I jumped in and did a chart at the state level. I found that all counties report at the state level and have the exact same format. It is also tabular with columns for each candidate, making the data format nearly perfect.
If you wan to practice with a state, I recommend Nebraska. Nebraska is one of those states with sleepy little counties like Wisconsin that likely hand count ballots. It would be a useful exercise to do the entire state. If you can do one county, the rest will be very easy.
Here's the overall state. Even though Romney had no need to flip at all, he was still a flipper. That indicates that whatever trick causes this is already installed and they can't get to it to turn it off.

Data source: (Download spreadsheet)
http://electionresults.sos.ne.gov/resultsCTY.aspx?type=SW&rid=649&pty=REP&osn=100&map=CTY
I can't wait to see if Utah will be a flipper.
Last edited: