File:SA Opinion Polling for 2022 Election.png

Original file (865 × 454 pixels, file size: 10 KB, MIME type: image/png)

Summary

edit
File information
Description

English: Primary vote opinion polling for the 2022 South Australian state election with a local regression (LOESS) trendline for each party.

Source

Own work

Date

2025-03-09

Author

Milkk7

Permission
(Reusing this file)

See below.


Inspired by File:WA Opinion Polling for 2025 Election.png by Samsam21amb

Graph relies on published opinion polls from 2022 South Australian state election#Polling. Written in R.

library(ggplot2)

data <- data.frame(
  Date = as.Date(c("2022-03-11", "2022-03-07", "2022-02-18", "2022-02-01", "2021-07-15", 
                   "2021-02-24", "2020-09-10", "2020-03-06", "2019-03-12")),
  ALP = c(41, 41, 39, 37, 34, 36, 35, 38, 37),
  LIB = c(38, 33, 37, 35, 38, 43, 46, 39, 42),
  GRN = c(9, 11, 10, 7, 10, 10, 10, 11, 7),
  BST = c(NA, NA, NA, 4, 5, 6, 5, 7, 7),
  OTH = c(12, 15, 14, 17, 12, 5, 4, 5, 10)
)

data_long <- data.frame(
  Date = rep(data$Date, 5),
  Party = rep(c("ALP", "LIB", "GRN", "BST", "OTH"), each = nrow(data)),
  Vote = c(data$ALP, data$LIB, data$GRN, data$BST, data$OTH)
)

data_long <- data_long[!is.na(data_long$Vote), ]

ggplot(data_long, aes(x = Date, y = Vote, color = Party)) +
  geom_point() +
  geom_smooth(method = "loess", se = FALSE) +
  scale_color_manual(values = c("ALP" = "red", "LIB" = "blue", "BST" = "orange", 
                                "GRN" = "green", "OTH" = "grey")) +
  labs(title = "2022 South Australian State Election Primary Vote Opinion Polling",
       x = "Date",
       y = "Primary Vote (%)",
       color = "Party") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Licensing

edit
I, the copyright holder of this work, hereby publish it under the following license:

File history

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

Date/TimeThumbnailDimensionsUserComment
current01:52, 9 March 2025Thumbnail for version as of 01:52, 9 March 2025865 × 454 (10 KB)Milkk7 (talk | contribs){{Information |description={{en|1=Primary vote opinion polling for the 2022 South Australian state election with a local regression (LOESS) trendline for each party.}} |date=2025-03-09 |source={{own}} |author=Milkk7 }} Inspired by [https://commons.wikimedia.org/wiki/File:WA_Opinion_Polling_for_2025_Election.png File:WA Opinion Polling for 2025 Election.png] by Samsam21amb Graph relies on published opinion polls from [[2022 South Australian state election...

The following page uses this file:

Metadata