Analysing and Visualizing Tweets for U.S. President Popularity

Ernesto De Luca, Francesca Fallucchi, Romeo Giuliano, Giuseppe Incarnato, Franco Mazzenga


In our society we are continually invested by a stream of information (opinions, preferences, comments, etc.). This shows how Twitter users react to news or events that they attend or take part in real time and with interest. In this context it becomes essential to have the appropriate tools in order to be able to analyze and extract data and information hidden in their large number of tweets. Social networks are a source of information with no rivals in terms of amount and variety of information that can be extracted from them. We propose an approach to analyze, with the help of automated tools, comments and opinions taken from social media in a real time environment. We developed a software system in R based on the Bayesian approach for text categorization. We aim of identifying sentiments expressed by the tweets posted on the Twitter social platform. The analysis of sentiment spread on social networks allows to identify the free thoughts, expressed authentically. In particular, we analyze the sentiments related to U.S President popularity by also visualizing tweets on a map. This allows to make an additional analysis of the real time reactions of people by associating the reaction of the single person who posted the tweet to his real time position in Unites States. In particular, we provide a visualization based on the geographical analysis of the sentiments of the users who posted the tweets.


Twitter; Russiagate; sentiment analysis; U.S. President popularity.

Full Text:



F. Nasution, N. E. Nazira Bazin, - Daliyusmanto, and A. Zulfikar, “Big Data’s Tools for Internet Data Analytics: Modelling of System Dynamics,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 3, p. 745, 2017.

G. Fei, Z. Chen, A. Mukherjee, and B. Liu, “Discovering Correspondence of Sentiment Words and Aspects,†2018, pp. 233–245.

Z. Ansari, M. F. Azeem, A. V. Babu, and W. Ahmed, “A Fuzzy Approach for Feature Evaluation and Dimensionality Reduction to Improve the Quality of Web Usage Mining Results,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 2, no. 6, p. 477, 2016.

M. A. Taiye, S. S. Kamaruddin, and F. K. Ahmad, “Representing Semantics of Text by Acquiring its Canonical Form,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 3, p. 808, 2017.

F. Fallucchi, M. Tarquini, and E. W. De Luca, “Supporting Humanitarian Logistics with Intelligent Applications for Disaster Management,†INTELLI 2016, p. 64, 2016.

D. Zhang, L. Zhou, and J. F. Nunamaker Jr, “A Knowledge Management Framework for the Support of Decision Making in Humanitarian Assistance/Disaster Relief,†Knowl. Inf. Syst., vol. 4, no. 3, pp. 370–385, 2002.

F. Fallucchi, M. Tarquini, and E. W. De Luca, Knowledge management for the support of logistics during Humanitarian Assistance and Disaster Relief (HADR), vol. 265. 2016.

Y. Sato and I. Waragai, “The Function of Religious Language in the Media: A Comparative Analysis of the Japanese, German and American Newspaper Coverage about the 2011 Great East Japan Earthquake and Tsunami,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 2, p. 406, Apr. 2017.

L. Zhang, S. Wang, and B. Liu, “Deep Learning for Sentiment Analysis : A Survey,†Jan. 2018.

A. Tavanaei, M. Ghodrati, S. R. Kheradpisheh, T. Masquelier, and A. S. Maida, “Deep Learning in Spiking Neural Networks,†Apr. 2018.

E. W. De Luca and A. Nürnberger, “Using clustering methods to improve ontology-based query term disambiguation,†Int. J. Intell. Syst., vol. 21, no. 7, pp. 693–709, Jul. 2006.

L. Bracciale, P. Loreti, A. Detti, R. Paolillo, and N. B. Melazzi, “Lightweight Named Object: an ICN-based Abstraction for IoT Device Programming and Management,†IEEE Internet Things J., pp. 1–1, 2019.

A. Detti et al., “Application of Information-Centric Networking to NoSQL databases: The spatiotemporal use case,†in 2017 IEEE International Symposium on Local and Metropolitan Area Networks (LANMAN), 2017, pp. 1–6.

A. Detti, L. Bracciale, P. Loreti, G. Rossi, and N. Blefari Melazzi, “A cluster-based scalable router for information-centric networks,†Comput. Networks, vol. 142, pp. 24–32, Sep. 2018.

L. Bracciale, P. Loreti, and G. Bianchi, “Human time-scale duty cycle for opportunistic WiFi-based mobile networks,†in 2013 24th Tyrrhenian International Workshop on Digital Communications - Green ICT (TIWDC), 2013, pp. 1–6.

G. C. Cardarilli, A. Cristini, L. Di Nunzio, M. Re, M. Salerno, and G. Susi, “Spiking neural networks based on LIF with latency: Simulation and synchronization effects,†in 2013 Asilomar Conference on Signals, Systems, and Computers, 2013, pp. 1838–1842.

S. Acciarito, A. Cristini, L. Di Nunzio, G. M. Khanal, and G. Susi, “An a VLSI driving circuit for memristor-based STDP,†in 2016 12th Conference on Ph.D. Research in Microelectronics and Electronics (PRIME), 2016, pp. 1–4.

G. M. Khanal et al., “Synaptic behavior in ZnO–rGO composites thin film memristor,†Electron. Lett., vol. 53, no. 5, pp. 296–298, Mar. 2017.

S. Acciarito et al., “Hardware design of LIF with Latency neuron model with memristive STDP synapses,†Integration, vol. 59, pp. 81–89, Sep. 2017.

A. Pieroni, N. Scarpato, L. Di Nunzio, F. Fallucchi, and M. Raso, “Smarter City: Smart energy grid based on Blockchain technology,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 8, no. 1, 2018.

H. M. Rahman, N. Arbaiy, M. S. Che Lah, and N. Hassan, “Exploratory Study of Kohonen Network for Human Health State Classification,†JOIV Int. J. Informatics Vis., vol. 2, no. 3–2, p. 209, Jun. 2018.

J. Mir et al., “Comparative Analysis for Heart Disease Prediction,†JOIV Int. J. Informatics Vis., vol. 1, no. 4–2, p. 227, 2018.

K. Madadipouya, “A Survey on Data Mining Algorithms and Techniques in Medicine,†JOIV Int. J. Informatics Vis., vol. 1, no. 3, p. 61, Jun. 2017.

I. Gupta et al., “Towards Building a Virtual Assistant Health Coach,†in 2018 IEEE International Conference on Healthcare Informatics (ICHI), 2018, pp. 419–421.

F. A. Pozzi, E. Fersini, E. Messina, and B. Liu, “Challenges of Sentiment Analysis in Social Networks,†in Sentiment Analysis in Social Networks, Elsevier, 2017, pp. 1–11.

F. Fallucchi, E. Alfonsi, A. Ligi, and M. Tarquini, Ontology-driven public administration web hosting monitoring system, vol. 8842. 2014.

F. Fallucchi, M. Petito, and E. W. De Luca, “Analysing and Visualising Open Data within the Data and Analytics Framework,†Springer, Cham, 2019, pp. 135–146.

F. Cena, A. Dattolo, E. W. De Luca, P. Lops, T. Plumbaum, and J. Vassileva, “Semantic Adaptive Social Web,†in Proceedings of the 19th international conference on Advances in User Modeling, Springer-Verlag, 2012, pp. 176–180.

T. Plumbaum, S. Wu, W. De Luca, Ernesto, and S. Albayrak, “User modeling for the social semantic web,†Proceedings of the Second International Conference on Semantic Personalized Information Management: Retrieval and Recommendation - Volume 781., pp. 78–89, 2011.

M. Viviani and G. Pasi, “Credibility in social media: opinions, news, and health information-a survey,†Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 7, no. 5, p. e1209, Sep. 2017.

S. Y. Syn and S. U. Kim, “The impact of source credibility on young adults’ Health information activities on Facebook: Preliminary findings,†Proc. Am. Soc. Inf. Sci. Technol., vol. 50, no. 1, pp. 1–4, Jan. 2013.

K. Ab Kadir, N. Sahari @ Ashaari, and J. Salim, “Credibility Dimensions for Islamic Information in Social Media,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 8, no. 5, p. 1864, Oct. 2018.

K. Bade, E. W. De Luca, A. Nürnberger, and S. Stober, “CARSA – An Architecture for the Development of Context Adaptive Retrieval Systems,†Springer, Berlin, Heidelberg, 2006, pp. 91–101.

I. Korkontzelos, T. Zesch, T. U. Darmstadt, F. M. Zanzotto, and C. Biemann, “SemEval-2013 task 5: Evaluating phrasal semantics,†Proc. 7th Int. Work. Semant. Eval. (SemEval, vol. 2, no. SemEval, pp. 39–47, 2013.

M. Bianchi, M. Draoli, F. Fallucchi, and A. Ligi, “Service level agreement constraints into processes for document classification,†in ICEIS 2014 - Proceedings of the 16th International Conference on Enterprise Information Systems, 2014, vol. 1.

B. Liu, Sentiment analysis and opinion mining. Morgan & Claypool, 2012.

S. N. Khan, N. Mohd Nawi, M. Imrona, A. Shahzad, A. Ullah, and A.- Rahman, “Opinion Mining Summarization and Automation Process: A Survey,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 8, no. 5, p. 1836, Oct. 2018.

B. Liu, Sentiment analysis : mining opinions, sentiments, and emotions.

S. Saad and B. Saberi, “Sentiment Analysis or Opinion Mining: A Review,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 5, p. 1660, 2017.

P. D. Turney, “Thumbs Up or Thumbs Down? Semantic Orientation Applied to Unsupervised Classification of Reviews,†Proc. 40th Annu. Meet. Assoc. Comput. Linguist. No. July, pp. 417–424, 2002.

B. Pang and L. Lee, “Opinion mining and sentiment analysis,†Found. Trends Inf. Retr., vol. Vol. 2, no. No 1-2, pp. 1–135, 2008.

M. Chong, “Analyzing political information network of the U.S. Partisan public on twitter,†Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 10766 LNCS, pp. 453–463, 2018.

S. Narr, E. W. De Luca, and S. Albayrak, “Extracting semantic annotations from twitter,†in Proceedings of the fourth workshop on Exploiting semantic annotations in information retrieval - ESAIR ’11, 2011, p. 15.

A. Said, S. Berkovsky, and E. W. De Luca, “Introduction to special section on CAMRa2010,†ACM Trans. Intell. Syst. Technol., vol. 4, no. 1, pp. 1–9, Jan. 2013.

M. M. Altawaier and S. Tiun, “Comparison of Machine Learning Approaches on Arabic Twitter Sentiment Analysis,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 6, no. 6, p. 1067, 2016.

H. Amnur, “Customer Relationship Management and Machine Learning Technology for Identifying the Customer,†JOIV Int. J. Informatics Vis., vol. 1, no. 4, p. 12, 2018.

S. Aciar, D. Zhang, S. Simoff, and J. Debenham, “Informed Recommender: Basing Recommendations on Consumer Product Reviews,†IEEE Intell. Syst., vol. 22, no. 3, pp. 39–47, May 2007.

A. Erianda and I. Rahmayuni, “Improvement of Email And Twitter Classification Accuracy Based On Preprocessing Bayes Naive Classifier Optimization In Integrated Digital Assistant,†JOIV Int. J. Informatics Vis., vol. 1, no. 2, p. 53, 2018.

R. Heimann and N. Danneman, Social Media Mining with R. Birmingham: Packt Publishing, 2014.

D. V. Shah, J. Cho, W. P. Eveland, and N. Kwak, Information and expression in a digital age: Modeling internet effects on civic participation, vol. 32, no. 5. 2005.

A. Makazhanov and D. Rafiei, “Predicting political preference of Twitter users,†in Proceedings of the 2013 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining - ASONAM ’13, 2013, pp. 298–305.

R. H. Lasseter, “MicroGrids,†2002 IEEE Power Eng. Soc. Winter Meet. Conf. Proc. (Cat. No.02CH37309), vol. 1, pp. 305–308, 2002.

C. B. Williams and G. J. Gulati, “Communicating with Constituents in 140 Characters or Less : by,†Polit. Sci., 2010.

J. Golbeck, C. Park, and D. L. Hansen, “Computing Political Preference among Twitter Followers,†Hum. Factors, pp. 1105–1108, 2011.

A. Ceron, L. Curini, and S. M. Iacus, “Using Social Media To Forecast Electoral Results: a Review of the State of the Art,†Ital. J. Appl. Stat., vol. 25, no. 3, 2014.

M. J. Jensen and N. Anstead, “Psephological investigations: Tweets, votes, and unknown unknowns in the republican nomination process,†Policy & Internet, vol. 5, no. 2, pp. 161–182, Jun. 2013.

H. Wang, D. Can, A. Kazemzadeh, F. Bar, and S. Narayanan, “A System for Real-time Twitter Sentiment Analysis of 2012 U.S. Presidential Election Cycle,†Proc. 50th Annu. Meet. Assoc. Comput. Linguist., no. July, pp. 115–120, 2012.

C. Monti, A. Arvidsson, A. Rozza, M. Zignani, E. Colleoni, and G. Zappella, “Modelling political disaffection from Twitter data,†pp. 1–9, 2013.

J. DiGrazia, K. McKelvey, J. Bollen, and F. Rojas, “More tweets, more votes: Social media as a quantitative indicator of political behavior,†PLoS One, vol. 8, no. 11, pp. 1–11, 2013.

T. Graham, M. Broersma, K. Hazelhoff, and G. van ’t Haar, Between Broadcasting Political Messages and Interacting With Voters, vol. 16, no. 5. 2013.

A. Bruns and T. Highfield, “POLITICAL NETWORKS ON TWITTER: Tweeting the Queensland state election,†Inf. Commun. Soc., vol. 16, no. 5, pp. 667–691, 2013.

“Push Attack: Binding Virtual and Real Identities Using Mobile Push Notifications,†Futur. Internet, vol. 10, no. 2, p. 13, Jan. 2018.

D. Gayo-Avello, “No, you cannot predict elections with twitter,†IEEE Internet Comput., vol. 16, no. 6, pp. 91–94, 2012.

M. A. Razzaq, A. M. Qamar, and H. S. M. Bilal, “Prediction and analysis of Pakistan election 2013 based on sentiment analysis,†ASONAM 2014 - Proc. 2014 IEEE/ACM Int. Conf. Adv. Soc. Networks Anal. Min., no. Asonam, pp. 700–703, 2014.

M. Broersma and T. Graham, “Tweets as news source during the 2010 British and Dutch elections,†Journal. Pract., vol. 6 (3), no. June 2010, pp. 403–419, 2012.

D. Pace, H. Thayer, and H. Thayer, “21st Century Propaganda : The Age of Twitter,†2018.

N. Idris, S. Z. Mohd Hashim, R. Samsudin, and N. B. Hj Ahmad, “Intelligent Learning Model Based On Significant Weight Of Domain Knowledge Concept For Adaptive E-Learning,†Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 4–2, p. 1486, Sep. 2017.

T. M. Mitchell, Thomas Mitchell-Machine learning-McGraw Hill Higher Education (1997).



  • There are currently no refbacks.

Published by INSIGHT - Indonesian Society for Knowledge and Human Development