You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 5|Abbeville |Antreville |STRAIGHT PARTY |NA |DEM |Democratic | 72|
103
-
| 103|Abbeville |Lebanon |STRAIGHT PARTY |NA |LIB |Libertarian | 1|
104
-
| 104|Abbeville |Absentee |STRAIGHT PARTY |NA |LIB |Libertarian | 4|
105
-
| 105|Abbeville |Abbeville No. 1 |President and Vice President |NA |DEM |Hillary Rodham Clinton / Timothy Michael Kaine | 245|
106
-
| 106|Abbeville |Abbeville No. 2 |President and Vice President |NA |DEM |Hillary Rodham Clinton / Timothy Michael Kaine | 373|
107
-
| 107|Abbeville |Abbeville No. 3 |President and Vice President |NA |DEM |Hillary Rodham Clinton / Timothy Michael Kaine | 214|
94
+

108
95
109
96
So the fancy stuff I did in `kable` above was basically to show the original row numbers and print them to the left of all the other variables. If I had not used the `select(row,everything())`, the row would have printed last. This is a nice example of how to do a quick custom column-sorting. But that's not why we're here. The election file shows how people voted in a rather raw fashion. Specifically, here I want to tally those people who voted for the different candidates for president. But it's not that straightforward, because I have to count the straight-ticket voters as well as the split-party voters who specifically noted their president's choice on the ballot.

170
136
171
137
So one picky issue is worth mentioning here. This dataset counts absentee ballots as its own precinct (or their own precincts). Part of the joys of blogging is sweeping issues like this under the rug, but this can be the source of interesting analyses in their own right.

198
151
199
152
There were some casualties in this operation, namely the total party votes and total votes, but I don't really need them for the simple thing I'm doing here.
0 commit comments