nzge: General Election Results 2002 and onwards

Description Usage Format Details Source See Also Examples

Description

New Zealand general election results by voting place for 2002, 2005, 2008, 2011 and 2014

Usage

1

Format

A data frame with 728,602 rows and 9 variables.

Details

Source

http://www.electionresults.govt.nz/electionresults_2014/e9/html/statistics.html

See Also

voting_places

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# the following matches the results published at
# http://www.electionresults.govt.nz/electionresults_2014/e9/html/e9_part1.html
library(tidyr)
library(dplyr)
nzge %>%
    mutate(voting_type = paste0(voting_type, " vote")) %>%
    group_by(party, voting_type, election_year) %>%
    summarise(votes = sum(votes)) %>%
    spread(voting_type, votes) %>%
    ungroup() %>%
    arrange(election_year, desc(`Party vote`))

nzelect documentation built on May 2, 2019, 3:44 p.m.