New Zealand 2014 general election results by voting place
A data frame with 136,195 rows and 7 variables.
ApproxLocation. Approximate location of voting place
VotingPlace. Exact location of voting place
Party. Party voted for (party vote) or party of candidate voted for
Votes. Number of votes
Electorate. Electorate in which voters were enrolled. Note that this
is not necessarily the physical location of the VotingPlace, so VotingPlace
and Electorate have a many to many relationship
VotingType. Party (proportional representation) or Candidate (first past
the vote). In New Zealand each voter has to vote for both an individual
candidate to represent their electorate, and a party vote for the overall makeup
Candidate. If VotingType == "Candidate", the name of the candidate;
GE2014 is deprecated; please use
nzge instead - it has results back to 2002 and is the one we
will update in future.
1 2 3 4 5 6 7 8 9 10 11 12
# the following matches the results published at # http://www.electionresults.govt.nz/electionresults_2014/e9/html/e9_part1.html library(tidyr) library(dplyr) GE2014 %>% mutate(VotingType = paste0(VotingType, "Vote")) %>% group_by(Party, VotingType) %>% summarise(Votes = sum(Votes)) %>% spread(VotingType, Votes) %>% select(Party, PartyVote, CandidateVote) %>% ungroup() %>% arrange(desc(PartyVote))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.