Title: “Australian Federal Election Trends” Author: “Evangeline Robert” Student Id:“s4067665”
Understanding Voter Shifts in Australian Federal Elections A data-driven story of party performance and voter alignment
The Australian federal election is a powerful reflection of national sentiment. This analysis investigates how first-preference votes have changed for key political parties — nationally and at the state level. With the 2025 election on the horizon, such trends offer insight into the evolving political landscape.
Research Question: What can the distribution of first-preference votes tell us about voter loyalty and political competition across Australian states?
library(readr)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
# Load data
election_data <- read_csv("~/new02 - Copy/first_prefs_division.csv")
## Rows: 1519 Columns: 7
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): State, DivisionAb, DivisionName, PartyAb, CandidateSurname
## dbl (2): DivisionId, Votes
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Define top 6 parties
top_parties <- c("ALP", "LP", "GRN", "LNP", "IND", "ON")
# Filter only top parties
filtered_data <- election_data |>
filter(PartyAb %in% top_parties)
Interpretation: ALP and LP lead the national vote, with Greens consistently third. Independent (IND) and minor parties still secure meaningful regional support.
nsw_votes <- filtered_data |>
filter(State == "NSW") |>
group_by(PartyAb) |>
summarise(Votes = sum(Votes), .groups = "drop")
ggplot(nsw_votes, aes(x = reorder(PartyAb, -Votes), y = Votes, fill = PartyAb)) +
geom_col(show.legend = FALSE) +
geom_text(aes(label = scales::comma(Votes)), vjust = -0.5, size = 4) +
labs(title = "Vote Distribution in NSW", x = "Party", y = "Votes") +
theme_minimal()
Interpretation: NSW shows a tighter contest between ALP and LP, with LNP
and IND playing key regional roles. Greens have a more moderate share
compared to ACT.
This analysis shows that while ALP and LP retain strong national presence, voter alignment shifts considerably at the state level. ACT leans progressive, while NSW remains a battleground. The growing relevance of independents and minor parties hints at a more fragmented electoral future.
Australian Electoral Commission. (2024). First preference votes by party by division. Retrieved from https://www.aec.gov.au/Elections/federal_elections/