A Novel Method of Generating Geospatial Intelligence from Social Media Posts of Political Leaders
Abstract
:1. Introduction
- This study reported the longest interval of monitoring political tweets from 1 January 2020 till 6 February 2022;
- This study represented the largest collection of multilingual tweets, covering 63 distinct languages. Of these different languages, 578,706 tweets were in Arabic, 320,221 tweets in English, 71,983 tweets were in French, 65,430 tweets were in Farsi/Persian, 29,103 tweets were in Spanish, and 22,219 tweets were in German, among many others;
- This study recorded the largest collection of locations, with over 95K locations automatically extracted using NER and mapped on both ESRI ArcGIS Maps and Microsoft Bing Maps;
2. Background
3. Materials and Methods
Algorithm 1: Create location-centric sentiments for selected keywords from social media feeds of political leaders. | ||||||
Input: | Incoming Social Media Message,, List of Handles as Keywords, | |||||
Output: | Sentiment on the topic of the keywords on each country mentioned within the input Social Media Messages | |||||
1. | For Eachtn ∈ T, n = 1 to |T| | |||||
2. | For Each Wm ∈ K, m = 1 to |K| | |||||
3. | If Wm ∈ tn Then | |||||
4. | si = ti//Add tn to S (i.e.,) | |||||
5. | End If | |||||
6. | Loop | |||||
7. | Loop | |||||
8. | For Eachsi ∈ S, i = 1 to I | |||||
9. | If Detect_Language(si)= ‘en’ | |||||
10. | ei = si//Add to E (i.e., ) | |||||
11. | Else | |||||
12. | ei= Translate_English(si)//Add Translate_English(si) to E (i.e., ) | |||||
13. | End if | |||||
14. | Loop | |||||
15. | For Eachei ∈ E, i = 1 to I | |||||
16. | If Detect_Entity(ei)= ‘Location’ | |||||
17. | Add ei to F (i.e., ) | |||||
18. | End If | |||||
19. | Loop | |||||
20. | For Eachfj ∈ F, j = 1 to J | |||||
21. | ||||||
22. | ||||||
23. | For Each location, cn in bj | |||||
24. | (i.e., Add Cn to locations master list C, only if C does not already include Cn) | |||||
25. | Loop | |||||
26. | Loop | |||||
27. | For Eachcn ∈ C, n = 1 to N | |||||
28. | For Each bj ∈ B, j = 1 to J | |||||
29. | Collate a list of M number of Sentiments hj where cn ∈ bj to compute: | |||||
30. | Loop | |||||
31. | Loop |
Code 1: DAX code for retrieving filtered tweets from SQL server | ||
1. | let | |
2. | Source = Sql.Database(“drsufiserver.database.windows.net”, “SUFITWEETDB”, [Query = “SELECT * FROM [dbo]. [Tweets] WHERE TweetSourceType like ‘%Regional Political Leader%’”, CreateNavigationProperties = false]), | |
3. | #”Added Conditional Column” = Table.AddColumn(Source, “MasterTweet”, each if [TweetLanguage] = “en” then [TweetText] else if [TweetLanguage] <> “en” then [TranslatedText] else null), | |
4. | #”Filtered Rows” = Table.SelectRows(#”Added Conditional Column”, each ([TwitterHandle] = “BA_Yildirim”) and ([Sentiment] = “negative”)), | |
5. | #”Invoked Custom Function” = Table.AddColumn(#”Filtered Rows”, “EntityDetection”, each EntityDetection ([MasterTweet])), | |
6. | #”Expanded EntityDetection” = Table.ExpandTableColumn(#”Invoked Custom Function”, “EntityDetection”, {“name”, “wikipediaScore”, “text”, “offset”, “length”, “entityTypeScore”, “wikipediaLanguage”, “wikipediaId”, “wikipediaUrl”, “bingId”, “type”}, {“name”, “wikipediaScore”, “text”, “offset”, “length”, “entityTypeScore”, “wikipediaLanguage”, “wikipediaId”, “wikipediaUrl”, “bingId”, “type”}) | |
7. | in | |
8. | #”Expanded EntityDetection” |
Code 2: DAX code for calling NERAPI of Microsoft Cognitive Services Text Analytics | ||
1. | (text) =>let | |
2. | apikey = “##API-Keys-Goes-Here##”, | |
3. | endpoint = “https://uaenorth.api.cognitive.microsoft.com/text/analytics/v2.1/entities”, | |
4. | jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))), | |
5. | jsonbody = “{ documents: [ { language: ““en”“, id: ““0”“, text: “ & jsontext & “ } ] }”, | |
6. | bytesbody = Text.ToBinary(jsonbody), | |
7. | headers = [#”Ocp-Apim-Subscription-Key” = apikey], | |
8. | bytesresp = Web.Contents(endpoint, [Headers = headers, Content = bytesbody]), | |
9. | jsonresp = Json.Document(bytesresp), | |
10. | doc = jsonresp[documents]{0}, | |
11. | result = doc[entities], | |
12. | #”Converted to Table” = Table.FromList(result, Splitter.SplitByNothing(), null, null, ExtraValues.Error), | |
13. | #”Expanded Column1” = Table.ExpandRecordColumn(#”Converted to Table”, “Column1”, {“name”, “matches”, “wikipediaLanguage”, “wikipediaId”, “wikipediaUrl”, “bingId”, “type”}, {“name”, “matches”, “wikipediaLanguage”, “wikipediaId”, “wikipediaUrl”, “bingId”, “type”}), | |
14. | #”Expanded matches” = Table.ExpandListColumn(#”Expanded Column1”, “matches”), | |
15. | #”Expanded matches1” = Table.ExpandRecordColumn(#”Expanded matches”, “matches”, {“wikipediaScore”, “text”, “offset”, “length”, “entityTypeScore”}, {“wikipediaScore”, “text”, “offset”, “length”, “entityTypeScore”}) | |
16. | in | |
17. | #”Expanded matches1” |
4. Results
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- James, J. What ‘Data Never Sleeps 9.0’ Proves about the Pandemic. 4 October 2021. Available online: https://www.domo.com/blog/what-data-never-sleeps-9-0-proves-about-the-pandemic/ (accessed on 6 February 2022).
- Twiplomacy. Twiplomacy Study 2020. July 2020. Available online: https://twiplomacy.com/blog/twiplomacy-study-2020/ (accessed on 27 January 2022).
- Trussler, M.; Soroka, S. Consumer Demand for Cynical and Negative News Frames. Int. J. Press 2014, 19, 360–379. [Google Scholar] [CrossRef]
- Vashisht, G.; Sinha, Y.N. Sentimental study of CAA by location-based tweets. Int. J. Inf. Technol. 2021, 13, 1555–1567. [Google Scholar] [CrossRef]
- Ebrahimi, M.; Yazdavar, A.H.; Sheth, A. Challenges of Sentiment Analysis for Dynamic Events. IEEE Intell. Syst. 2017, 32, 70–75. [Google Scholar] [CrossRef] [Green Version]
- Benecke, M.; DeYoung, S.E. Anti-Vaccine Decision-Making and Measles Resurgence in the United States. Glob. Pediatr. Health 2019, 6, 2333794X19862949. [Google Scholar] [CrossRef] [Green Version]
- Rajabi, A.; Mantzaris, A.V.; Atwal, K.S.; Garibay, I. Exploring the disparity of influence between users in the discussion of Brexit on Twitter. J. Comput. Soc. Sci. 2021, 4, 903–917. [Google Scholar] [CrossRef]
- Abkenar, S.B.; Kashani, M.H.; Mahdipour, E.; Jameii, S.M. Big data analytics meets social media: A systematic review of techniques, open issues, and future directions. Telemat. Inform. 2021, 57, 101517. [Google Scholar] [CrossRef]
- Sufi, F.K.; Alsulami, M. Knowledge Discovery of Global Landslides Using Automated Machine Learning Algorithms. IEEE Access 2021, 9, 131400–131419. [Google Scholar] [CrossRef]
- Sufi, F.K. AI-Landslide: Software for acquiring hidden insights from global landslide data using Artificial Intelligence. Softw. Impacts 2021, 10, 100177. [Google Scholar] [CrossRef]
- Sufi, F.K.; Alsulami, M. Automated Multidimensional Analysis of Global Events with Entity Detection, Sentiment Analysis and Anomaly Detection. IEEE Access 2021, 9, 152449–152460. [Google Scholar] [CrossRef]
- Sufi, F.K. AI-GlobalEvents: A Software for analyzing, identifying and explaining global events with Artificial Intelligence. Softw. Impacts 2022, 11, 100218. [Google Scholar] [CrossRef]
- Sufi, F.; Fang, Q.; Khalil, I.; Mahmoud, S.S. Novel methods of faster cardiovascular diagnosis in wireless telecardiology. IEEE J. Sel. Areas Commun. 2009, 27, 537–552. [Google Scholar] [CrossRef]
- Sufi, F.; Khalil, I. Diagnosis of cardiovascular abnormalities from compressed ECG: A data mining-based approach. IEEE Trans. Inf. Technol. Biomed. 2010, 15, 33–39. [Google Scholar] [CrossRef]
- Sufi, F.; Khalil, I.; Mahmood, A.N. A clustering based system for instant detection of cardiac abnormalities from compressed ECG. Expert Syst. Appl. 2011, 38, 4705–4713. [Google Scholar] [CrossRef]
- Sufi, F.; Khalil, I. Faster person identification using compressed ECG in time critical wireless telecardiology applications. J. Netw. Comput. Appl. 2011, 34, 282–293. [Google Scholar] [CrossRef]
- Sufi, F.K.; Razzak, I.; Khalil, I. Tracking Anti-Vax Social Movement Using AI based Social Media Monitoring. IEEE Transac-Tions Technol. Soc. 2022; submitted. [Google Scholar]
- Sufi, F.; Alsulami, M. AI-based Automated Extraction of Location-Oriented COVID-19 Sentiments. Comput. Mater. Contin. (CMC), 2022; 1–15, accepted; in press. [Google Scholar]
- Chi, G.; Yin, J.; Smith, M.L.; Bodovski, Y. Global Tweet Mentions of COVID-19. arXiv 2021, arXiv:2108.06385v3. [Google Scholar]
- Bidoki, N.H.; Mantzaris, A.V.; Sukthankar, G. An LSTM Model for Predicting Cross-Platform Bursts of Social Media Activity. Information 2019, 10, 394. [Google Scholar] [CrossRef] [Green Version]
- Jungherr, A. Twitter use in election campaigns: A systematic literature review. J. Inf. Technol. Politics 2016, 13, 72–91. [Google Scholar] [CrossRef]
- Johnson, N.F.; Velásquez, N.; Restrepo, N.J.; Leahy, R.; Gabriel, N.; El Oud, S.; Zheng, M.; Manrique, P.; Wuchty, S.; Lupu, Y. The online competition between pro- and anti-vaccination views. Nature 2020, 582, 230–233. [Google Scholar] [CrossRef]
- Lim, W.L.; Ho, C.C.; Ting, C.-Y. Sentiment Analysis by Fusing Text and Location Features of Geo-Tagged Tweets. IEEE Access 2020, 8, 181014–181027. [Google Scholar] [CrossRef]
- Golder, S.; Ahmed, S.; Norman, G.; Booth, A. Attitudes Toward the Ethics of Research Using Social Media: A Systematic Review. J. Med. Internet Res. 2017, 19, e195. [Google Scholar] [CrossRef]
- Mikal, J.; Hurst, S.; Conway, M. Ethical issues in using Twitter for population-level depression monitoring: A qualitative study. BMC Med. Ethic. 2016, 17, 22. [Google Scholar] [CrossRef]
- Microsoft Documentation. What Is Language Detection in Azure Cognitive Service for Language? 2 July 2021. Available online: https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-language-detection (accessed on 20 August 2021).
- Microsoft Documentation. Microsoft Text Analytics API: Languate Detection. Available online: https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support?tabs=language-detection (accessed on 10 August 2021).
- Microsoft Documentation. Microsoft Power Automate. 2021. Available online: https://docs.microsoft.com/en-us/power-automate/ (accessed on 29 August 2021).
- Microsoft Documentation. Text Analytics API Documentation. 2021. Available online: https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/ (accessed on 3 August 2021).
- Goulart, R.R.V.; de Lima, V.L.S.; Xavier, C.C. A systematic review of named entity recognition in biomedical texts. J. Braz. Comput. Soc. 2011, 17, 103–116. [Google Scholar] [CrossRef] [Green Version]
Name | Screen Name | Country | Position | Figure Number |
---|---|---|---|---|
Abdelfattah Elsisi | AlsisiOfficial | Egypt | President | Figure 2 |
Barham Salih | BarhamSalih | Iraq | President | Figure 3 |
Fuad Hussein فؤاد حسين | Fuad_Hussein1 | Iraq | Minister of Foreign Affairs | Figure 4 |
Kingdom of Bahrain | Bahrain | Official tweet Account | Figure 5 | |
Mohammed Kareem PS | vic2pal | Palestine | Content Creator | Figure 6 |
Mustafa Al-Kadhimi مصطفى الكاظمي | MAKadhimi | Iraq | President | Figure 7 and Figure 8 |
Reuven Rivlin | PresidentRuvi | Israel | President | Figure 9 |
فيصل بن فرحان | FaisalbinFarhan | Saudi Arabia | Minister of Foreign Affairs | Figure 10 |
Tweet Name | Number of Tweets | Average Positive Confidence | Average Negative Confidence | Average Neutral Confidence | From | Till | Total Locations Mentioned | Unique Locations Mentioned |
---|---|---|---|---|---|---|---|---|
Abdelfattah Elsisi | 3598 | 0.615751 | 0.191437 | 0.19281 | 6 January 2020 | 30 March 2021 | 195 | 73 |
Barham Salih | 2409 | 0.374423 | 0.419358 | 0.233076 | 24 January 2020 | 28 March 2021 | 207 | 56 |
Fuad Hussein فؤاد حسين | 796 | 0.247032 | 0.351935 | 0.399548 | 12 January 2020 | 14 October 2020 | 122 | 44 |
Mohammed Kareem PS | 3736 | 0.303567 | 0.267702 | 0.22981 | 1 January 2020 | 20 March 2021 | 215 | 59 |
Mustafa Al-Kadhimi مصطفى الكاظمي | 1538 | 0.357464 | 0.310656 | 0.339746 | 9 April 2020 | 31 March 2021 | 1460 | 307 |
Reuven Rivlin | 2256 | 0.505517 | 0.462758 | 0.222013 | 2 January 2020 | 31 March 2021 | 1526 | 292 |
فيصل بن فرحان | 1618 | 0.542269 | 0.266382 | 0.315602 | 6 January 2020 | 28 March 2021 | 165 | 65 |
Twitter Handle | UserName | Number of Tweets | Confidence of Positive Sentiment | Confidence of Negative Sentiment | Confidence of Neutral Sentiment |
---|---|---|---|---|---|
NNALeb | National News Agency | 20,881 | 0.131523 | 0.391366 | 0.47711 |
OmanNewsAgency | وكالة الأنباء العمانية | 17,819 | 0.123863 | 0.169898 | 0.706237 |
Petranews | Jordan News Agency | 16,498 | 0.08586 | 0.201307 | 0.712832 |
wamnews | وكالة أنباء الإمارات | 13,915 | 0.124672 | 0.120952 | 0.754375 |
kuna_ar | KUNAكـــــــــــونا | 12,431 | 0.080433 | 0.286093 | 0.633473 |
APS_Algerie | ALGÉRIE PRESSE SERVICE | وكالة الأنباء الجزائرية | 9898 | 0.0906 | 0.17582 | 0.733578 |
bna_ar | وكالة أنباء البحرين | 9624 | 0.189876 | 0.095896 | 0.714227 |
tragency1 | وكالة أنباء تركيا | 6044 | 0.14363 | 0.261906 | 0.594463 |
MAP_Information | Agence MAP | 5781 | 0.080337 | 0.163698 | 0.755964 |
AgenceTAP | Agence Tunis-Afrique-Presse | 3021 | 0.048344 | 0.452062 | 0.499592 |
Leader Name | TP | TN | FP | FN | Precision | Recall | F1Score | Accuracy |
---|---|---|---|---|---|---|---|---|
Abdelfattah Elsisi | 70 | 826 | 14 | 18 | 0.833333 | 0.795455 | 0.813953 | 0.965517 |
Barham Salih | 49 | 847 | 4 | 6 | 0.924528 | 0.890909 | 0.907407 | 0.988962 |
Fuad Hussein فؤاد حسين | 42 | 854 | 2 | 7 | 0.954545 | 0.857143 | 0.903226 | 0.990055 |
Mohammed Kareem PS | 51 | 845 | 6 | 5 | 0.894737 | 0.910714 | 0.902655 | 0.987872 |
Mustafa Al-Kadhimi مصطفى الكاظمي | 299 | 597 | 32 | 25 | 0.903323 | 0.92284 | 0.912977 | 0.940189 |
Reuven Rivlin | 285 | 611 | 32 | 29 | 0.899054 | 0.907643 | 0.903328 | 0.936259 |
فيصل بن فرحان | 59 | 837 | 8 | 9 | 0.880597 | 0.867647 | 0.874074 | 0.98138 |
Overall | 855 | 5417 | 98 | 99 | 0.897167 | 0.896226 | 0.896696 | 0.969547 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sufi, F.; Alsulami, M. A Novel Method of Generating Geospatial Intelligence from Social Media Posts of Political Leaders. Information 2022, 13, 120. https://doi.org/10.3390/info13030120
Sufi F, Alsulami M. A Novel Method of Generating Geospatial Intelligence from Social Media Posts of Political Leaders. Information. 2022; 13(3):120. https://doi.org/10.3390/info13030120
Chicago/Turabian StyleSufi, Fahim, and Musleh Alsulami. 2022. "A Novel Method of Generating Geospatial Intelligence from Social Media Posts of Political Leaders" Information 13, no. 3: 120. https://doi.org/10.3390/info13030120
APA StyleSufi, F., & Alsulami, M. (2022). A Novel Method of Generating Geospatial Intelligence from Social Media Posts of Political Leaders. Information, 13(3), 120. https://doi.org/10.3390/info13030120