Analyzing Temporal Variations and Public Sentiment on X: A Clustering Analysis of the 2024 Pakistan Elections

Authors

  • Veena Kumari Department of Software Engineering, Mehran University of Engineering and Technology, Pakistan
  • Areej Fatemah Meghjib Department of Software Engineering, Mehran University of Engineering and Technology, Pakistan
  • Sania Bhattic Department of Software Engineering, Mehran University of Engineering and Technology, Pakistan
  • Dua Aghad Department of Software Engineering, Mehran University of Engineering and Technology, Pakistan

DOI:

https://doi.org/10.51239/jictra.v15i1.346

Keywords:

Clustering, Machine learning, Sentiment analysis, Social media, User engagement

Abstract

X serve as vital arena for public discourse on current affairs, politics, and geopolitical events, as it encapsulate individual’s experiences and preferences, analysing public opinion within these digital spaces provides critical insights for shaping informed decision-making. This research examines public sentiments surrounding the 2024 Pakistan General Elections through the analysis of tweets collected within the due period. We employ a multi-faceted approach, integrating temporal analysis to pinpoint peak engagement periods, K-means clustering to identify distinct topical clusters, and VADER sentiment analysis to assess the prevailing emotions within each thematic group. The research explores the utility of common election-related hashtags to ensure the retrieval of an equally representative and non-influence opinion. Our findings reveal four prominent topics of discussion revolving around two main political parties, electoral processes, and public enthusiasm. Sentiment analysis indicated predominantly mixed sentiments towards the political parties. The integration of temporal patterns, topical clustering, and sentiment analysis exhibits practical and hands-on recommendations, offering political stakeholders and analysts a nuanced understanding of public sentiment dynamics, which can shape electoral strategies and decision-making processes.

Downloads

Published

2025-12-15

Issue

Section

Original Articles

How to Cite

[1]
V. Kumari, A. F. Meghjib, S. Bhattic, and D. Aghad, “Analyzing Temporal Variations and Public Sentiment on X: A Clustering Analysis of the 2024 Pakistan Elections”, jictra, vol. 15, no. 1, pp. 1–16, Dec. 2025, doi: 10.51239/jictra.v15i1.346.