skip to main content
research-article
Open access

Location-based Sentiment Analyses and Visualization of Twitter Election Data

Published: 09 April 2020 Publication History

Abstract

In this article, we perform sentiment analyses of Twitter location data. We use two case studies: US presidential elections of 2016 and UK general elections of 2017. For US elections, we plot state-wise user sentiment towards Hillary Clinton and Donald Trump. For UK elections, we download two disparate datasets, using keywords and location coordinates, looking for similar tendencies in sentiment towards political candidates and parties. The overall objective of the two case studies is to evaluate similarity between sentiment of location-based tweets and on-ground public opinion reflected in election results. We discover Twitter location sentiment does indeed corroborate with the election result in both cases. We also discover similar tendencies in Twitter sentiment towards political candidates and parties regardless of the methodology adopted for data collection.

References

[1]
Lorien C. Abroms and R. Craig Lefebvre. 2009. Obama’s wired campaign: Lessons for public health communication. J. Health Commun. 14, 5 (2009), 415--423.
[2]
Sitaram Asur and Bernardo A. Huberman. 2010. Predicting the future with social media. In Proceedings of the IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT’10), Vol. 1. IEEE, 492--499.
[3]
BBC. 2017. UK election. Retrieved from https://www.bbc.com/news/uk-wales-politics-40195154.
[4]
BBC. 2017. UK election results. Retrieved from https://www.bbc.com/news/election/2017/results.
[5]
Steven Bird, Ewan Klein, and Edward Loper. 2009. Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit. O’Reilly Media, Inc.
[6]
Javier Borondo, A. J. Morales, Juan Carlos Losada, and Rosa M. Benito. 2012. Characterizing and modeling an electoral campaign in the context of Twitter: 2011 Spanish presidential election as a case study. Chaos Interdisc. J. Nonlin. Sci. 22, 2 (2012), 023138.
[7]
Lori Brainard and Mariglynn Edlins. 2015. Top 10 US municipal police departments and their social media usage. Amer. Rev. Pub. Admin. 45, 6 (2015), 728--745.
[8]
Guido Caldarelli, Alessandro Chessa, Fabio Pammolli, Gabriele Pompa, Michelangelo Puliga, Massimo Riccaboni, and Gianni Riotta. 2014. A multi-level geographical study of Italian political elections from Twitter data. PloS One 9, 5 (2014), e95809.
[9]
Nadya A. Calderon, Brian Fisher, Jeff Hemsley, Billy Ceskavich, Greg Jansen, Richard Marciano, and Victoria L. Lemieux. 2015. Mixed-initiative social media analytics at the World Bank: Observations of citizen sentiment in Twitter data to explore “trust” of political actors and state institutions and its relationship to social protest. In Proceedings of the IEEE International Conference on Big Data (Big Data’15). IEEE, 1678--1687.
[10]
Zhiyuan Cheng, James Caverlee, and Kyumin Lee. 2010. You are where you tweet: A content-based approach to geo-locating Twitter users. In Proceedings of the 19th ACM International Conference on Information and Knowledge Management. ACM, 759--768.
[11]
Zi Chu, Steven Gianvecchio, Haining Wang, and Sushil Jajodia. 2012. Detecting automation of Twitter accounts: Are you a human, bot, or cyborg?IEEE Trans. Depend. Sec. Comput. 9, 6 (2012), 811--824.
[12]
Elanor Colleoni, Alessandro Rozza, and Adam Arvidsson. 2014. Echo chamber or public sphere? Predicting political orientation and measuring political homophily in Twitter using big data. J. Commun. 64, 2 (2014), 317--332.
[13]
Brett Edkin. 2016. Study: Trump Benefited From ‘Overwhelmingly Negative’ Tone Of Election News Coverage. https://www.forbes.com/sites/brettedkins/2016/12/13/trump-benefited-from-overwhelmingly-negative-tone-of-election-news-coverage-study-finds/#43ab79f93202.
[14]
Emilio Ferrara and Zeyao Yang. 2015. Quantifying the effect of sentiment on information diffusion in social media. PeerJ Comput. Sci. 1 (2015), e26.
[15]
Daniel Gayo Avello, Panagiotis T. Metaxas, and Eni Mustafaraj. 2011. Limits of electoral predictions using Twitter. In Proceedings of the 5th International AAAI Conference on Weblogs and Social Media. Association for the Advancement of Artificial Intelligence.
[16]
Matthew Glassman, Jacob R. Straus, and Colleen J. Shogan. 2010. Social networking and constituent communication: Member use of Twitter during a two-week period in the 111th Congress. 66.
[17]
Jennifer Golbeck, Justin M. Grimes, and Anthony Rogers. 2010. Twitter use by the US Congress. J. Amer. Soc. Inf. Sci. Technol. 61, 8 (2010), 1612--1621.
[18]
Stefanie Haustein, Timothy D. Bowman, Kim Holmberg, Andrew Tsou, Cassidy R. Sugimoto, and Vincent Larivière. 2016. Tweets as impact indicators: Examining the implications of automated “bot” accounts on Twitter. J. Assoc. Inf. Sci. Technol. 67, 1 (2016), 232--238.
[19]
Sara Hofmann, Michael Räckers, Daniel Beverungen, and Jörg Becker. 2013. Old blunders in new media? How local governments communicate with citizens in online social networks. In Proceedings of the 46th Hawaii International Conference on System Sciences (HICSS’13). IEEE, 2023--2032.
[20]
Vishal Kharde, Prof Sonawane et al. 2016. Sentiment analysis of Twitter data: A survey of techniques. Arxiv Preprint Arxiv:1601.06971 (2016).
[21]
Soonhee Kim and Jooho Lee. 2012. E-participation, transparency, and trust in local government. Publ. Admin. Rev. 72, 6 (2012), 819--828.
[22]
Rob Kitchin. 2014. The real-time city? Big data and smart urbanism. GeoJournal 79, 1 (2014), 1--14.
[23]
Nan Li and Desheng Dash Wu. 2010. Using text mining and sentiment analysis for online forums hotspot detection and forecast. Dec. Supp. Syst. 48, 2 (2010), 354--368.
[24]
Ana Carolina E. S. Lima, Leandro Nunes de Castro, and Juan M. Corchado. 2015. A polarity analysis framework for Twitter messages. Appl. Math. Comput. 270 (2015), 756--767.
[25]
David Lorenzi, Jaideep Vaidya, Basit Shafiq, Soon Chun, Neelima Vegesna, Zamil Alzamil, Nabil Adam, Seth Wainer, and Vijayalakshmi Atluri. 2014. Utilizing social media to improve local government responsiveness. In Proceedings of the 15th International Conference on Digital Government Research. ACM, 236--244.
[26]
Laura McKenna and Antoinette Pole. 2008. What do bloggers do: An average day on an average political blog. Pub. Choice 134, 1 (2008), 97--108.
[27]
Panagiotis T. Metaxas, Eni Mustafaraj, and Dani Gayo-Avello. 2011. How (not) to predict elections. In Proceedings of the IEEE 3rd International Conference on Privacy, Security, Risk and Trust (PASSAT’11) and the IEEE 3rd International Conference on Social Computing (SocialCom’11). IEEE, 165--171.
[28]
Anshul Mittal and Arpit Goel. 2012. Stock prediction using Twitter sentiment analysis. Retrieved from http://cs229.stanford.edu/proj2011/GoelMittal-StockMarketPredictionUsingTwitterSentimentAnalysis.pdf).
[29]
A. J. Morales, J. C. Losada, and R. M. Benito. 2012. Users structure and behavior on an online social network during a political protest. Physica A: Stat. Mech. Applic. 391, 21 (2012), 5244--5253.
[30]
Fred Morstatter, Jürgen Pfeffer, Huan Liu, and Kathleen M. Carley. 2013. Is the sample good enough? Comparing data from Twitter’s streaming API with Twitter’s firehose. In Proceedings of the International Conference on Web and Social Media (ICWSM’13).
[31]
Brendan O’Connor, Ramnath Balasubramanyan, Bryan R. Routledge, and Noah A. Smith. 2010. From tweets to polls: Linking text sentiment to public opinion time series. In Proceedings of the International Conference on Web and Social Media (ICWSM’10) 11, 122-129 (2010), 1--2.
[32]
John H. Parmelee. 2013. Political journalists and Twitter: Influences on norms and practices. J. Media Pract. 14, 4 (2013), 291--305.
[33]
Nitesh Sharma, Rachit Pabreja, Ussama Yaqub, Vijayalakshmi Atluri, Soon Chun, and Jaideep Vaidya. 2018. Web-based application for sentiment analysis of live tweets. In Proceedings of the 19th International Conference on Digital Government Research: Governance in the Data Age. ACM, 120.
[34]
Lei Shi, Neeraj Agarwal, Ankur Agrawal, Rahul Garg, and Jacob Spoelstra. 2012. Predicting US primary elections with Twitter. Retrieved from http://snap. stanford. edu/social2012/papers/shi.pdf.
[35]
Internet Live Stats. 2017. SentiStrength. Retrieved from http://sentistrength.wlv.ac.uk/.
[36]
Internet Live Stats. 2019. Twitter Statistics. Retrieved from http://www.internetlivestats.com.
[37]
Mike Thelwall, Kevan Buckley, Georgios Paltoglou, Di Cai, and Arvid Kappas. 2010. Sentiment strength detection in short informal text. J. Assoc. Inf. Sci. Technol. 61, 12 (2010), 2544--2558.
[38]
Andranik Tumasjan, Timm Oliver Sprenger, Philipp G. Sandner, and Isabell M. Welpe. 2010. Predicting elections with Twitter: What 140 characters reveal about political sentiment. In Proceedings of the International Conference on Web and Social Media (ICWSM’10) 10, 1 (2010), 178--185.
[39]
Alessandro Vespignani. 2009. Predicting the behavior of techno-social systems. Science 325, 5939 (2009), 425--428.
[40]
Katrin Weller. 2016. Trying to understand social media users and usage: The forgotten features of social media platforms. Online Inf. Rev. 40, 2 (2016), 256--264.
[41]
Janyce Wiebe, Theresa Wilson, Rebecca Bruce, Matthew Bell, and Melanie Martin. 2004. Learning subjective language. Computat. Ling. 30, 3 (2004), 277--308.
[42]
Ussama Yaqub, Soon Chun, Vijayalakshmi Atluri, and Jaideep Vaidya. 2017. Sentiment-based analysis of tweets during the US presidential elections. In Proceedings of the 18th International Conference on Digital Government Research. ACM, 1--10.
[43]
Ussama Yaqub, Soon Ae Chun, Vijayalakshmi Atluri, and Jaideep Vaidya. 2017. Analysis of political discourse on Twitter in the context of the 2016 US presidential elections. Gov. Inf. Quart. 34, 4 (2017), 613--626.
[44]
Ussama Yaqub, Nitesh Sharma, Rachit Pabreja, Soon Chun, Vijayalakshmi Atluri, and Jaideep Vaidya. 2018. Analysis and visualization of subjectivity and polarity of Twitter location data. In Proceedings of the 19th International Conference on Digital Government Research: Governance in the Data Age. ACM, 67.
[45]
Xiaohua Zeng and Liyuan Wei. 2013. Social ties and user content generation: Evidence from Flickr. Inf. Syst. Res. 24, 1 (2013), 71--87.

Cited By

View all
  • (2025)A comprehensive analysis of forecasting elections using social media textMultimedia Tools and Applications10.1007/s11042-024-20528-wOnline publication date: 27-Jan-2025
  • (2024)Sentiment Analysis on YouTube Comment Data for the Candidate Debate in the 2024 Presidential Election of the Republic of Indonesia2024 5th International Conference on Artificial Intelligence and Data Sciences (AiDAS)10.1109/AiDAS63860.2024.10730443(392-397)Online publication date: 3-Sep-2024
  • (2023)280 characters to the White House: predicting 2020 U.S. presidential elections from twitter dataComputational & Mathematical Organization Theory10.1007/s10588-023-09376-529:4(542-569)Online publication date: 28-Mar-2023
  • Show More Cited By

Index Terms

  1. Location-based Sentiment Analyses and Visualization of Twitter Election Data

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Digital Government: Research and Practice
    Digital Government: Research and Practice  Volume 1, Issue 2
    Special Issue on Government and Social Media and Regular Papers
    April 2020
    120 pages
    EISSN:2639-0175
    DOI:10.1145/3394083
    Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 09 April 2020
    Accepted: 01 May 2019
    Received: 01 March 2019
    Published in DGOV Volume 1, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Twitter
    2. location data
    3. sentiment analysis

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Funding Sources

    • National Research Foundation of Korea
    • National Science Foundation

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)752
    • Downloads (Last 6 weeks)42
    Reflects downloads up to 20 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2025)A comprehensive analysis of forecasting elections using social media textMultimedia Tools and Applications10.1007/s11042-024-20528-wOnline publication date: 27-Jan-2025
    • (2024)Sentiment Analysis on YouTube Comment Data for the Candidate Debate in the 2024 Presidential Election of the Republic of Indonesia2024 5th International Conference on Artificial Intelligence and Data Sciences (AiDAS)10.1109/AiDAS63860.2024.10730443(392-397)Online publication date: 3-Sep-2024
    • (2023)280 characters to the White House: predicting 2020 U.S. presidential elections from twitter dataComputational & Mathematical Organization Theory10.1007/s10588-023-09376-529:4(542-569)Online publication date: 28-Mar-2023
    • (2023)NLP-Based Sentiment Analysis with Machine Learning Model for Election Campaign—A SurveyThird Congress on Intelligent Systems10.1007/978-981-19-9379-4_43(595-612)Online publication date: 19-May-2023
    • (2022)Examination of the Public’s Reaction on Twitter to the Over-Turning of Roe v Wade and Abortion BansHealthcare10.3390/healthcare1012239010:12(2390)Online publication date: 29-Nov-2022
    • (2022)We Know You Are Living in Bali: Location Prediction of Twitter Users Using BERT Language ModelBig Data and Cognitive Computing10.3390/bdcc60300776:3(77)Online publication date: 7-Jul-2022
    • (2022)Note: A Sociomaterial Perspective on Trace Data Collection: Strategies for Democratizing and Limiting BiasProceedings of the 5th ACM SIGCAS/SIGCHI Conference on Computing and Sustainable Societies10.1145/3530190.3534835(569-573)Online publication date: 29-Jun-2022
    • (2022)Detecting Extremism on Twitter During U.S. Capitol Riot Using Deep Learning TechniquesIEEE Access10.1109/ACCESS.2022.322796210(133052-133077)Online publication date: 2022
    • (2022)Analysis of Bitcoin’s price spike in context of Elon Musk’s Twitter activityGlobal Knowledge, Memory and Communication10.1108/GKMC-09-2021-015472:4/5(341-355)Online publication date: 1-Feb-2022
    • (2022)Predicting US presidential elections and impact on Indian economyINTERNATIONAL CONFERENCE ON RESEARCH IN SCIENCES, ENGINEERING & TECHNOLOGY10.1063/5.0081825(020023)Online publication date: 2022
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Login options

    Full Access

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media