Jump to content

File:NZ opinion polls 2005-2008.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (1,600 × 1,198 pixels, file size: 176 KB, MIME type: image/png)

Summary

Description Graph showing support for political parties in New Zealand since the 2005 election, according to various political polls. See w:Opinion polling for the New Zealand general election, 2008 for details of the polling data.
Date 24 March 2008, updated 4 May 2008.
Source Own work
Author Avenue (Avenue)
 
This chart was created with R.

This graph was created using R's ggplot2 package. Here is the source code, available under GPL version 2 and later as well as the licenses below.

library(reshape)
library(ggplot2)
polls <- read.csv("NZ opinion polls 2006-2008.csv")
polls$Date <- as.Date(polls$Date)
lpolls <- melt(polls[,-3], id.var=c("Poll", "Date"), variable_name="Party")
names(lpolls)[4] <- "Support"
levels(lpolls$Party)[3:4] <- c("NZ First", "Maori Party")
levels(lpolls$Party)[7] <- "United Future"
lpolls$Party <- with(lpolls, reorder(Party, Support, na.rm=TRUE))
p <- ggplot(lpolls[(lpolls$Date >= as.Date("2005-09-17")) & 
    (lpolls$Party %in% c("Labour", "National", "NZ First", "Greens")),], 
    aes(x=Date, y=Support, colour=factor(Party)))
p + geom_point() + stat_smooth() + 
    scale_colour_manual(name = "Party", values = c("black", "forestgreen", "red", "blue")) + 
    scale_x_date(major="4 months", format="%b-%Y") +
    scale_y_continuous(breaks=seq(from=0, to=55, by=5), name="Party support (%)")

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International, 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:21, 4 May 2008Thumbnail for version as of 10:21, 4 May 20081,600 × 1,198 (176 KB)Avenue
04:08, 23 April 2008Thumbnail for version as of 04:08, 23 April 20081,600 × 1,198 (169 KB)Avenue
11:10, 24 March 2008Thumbnail for version as of 11:10, 24 March 20081,600 × 1,198 (167 KB)Avenue== Summary == {{Information |Description=Graph showing support for political parties in New Zealand since the 2005 election, according to various political polls. See w:Opinion_polling_for_the_New_Zealand_general_election,_2008 for details of the po
02:07, 24 March 2008Thumbnail for version as of 02:07, 24 March 20081,528 × 1,166 (207 KB)Avenue{{Information |Description=Graph showing support for political parties in New Zealand since the 2005 election, according to various political polls. See w:Opinion_polling_for_the_New_Zealand_general_election,_2008 for details of the polling data. |S

Global file usage

The following other wikis use this file: