SlideShare a Scribd company logo
Language of Politics on Twitter
Summer School in AI
American University Beirut
June 16, 2015
Yelena Mejova
@yelenamm
Social Computing Group
Qatar Computing Research Institute, HBKU
political
twitter
analysis
Users
individuals
news
organizations
bots
…
#hashtags
word or phrase preceded by a hash mark (#),
used within a message to identify a keyword
or topic of interest and facilitate a search for it
links
all links are shortened by Twitter to form t.co/…
shorter
control for spam, malware, phishing
collect clickthrough information
MEME
an idea, behavior, or style that spreads
from person to person within a culture
Richard Dawkins
MEME
Monthly active users
302 million (4/28/2015)
Total number of Twitter registered users
“about a billion” (9/16/13)
Unique monthly visitors to Twitter.com (desktop)
36 million (10/3/13)
Daily active twitter users
100 million (10/3/13)
Number of Twitter accounts that have
ever sent a tweet
550 million (4/14/14)
TWITTER
TWITTER RESEARCH
Google Trends
users
tweets
relationships
Twitter API
https://dev.twitter.com/overview/documentation
users
try it yourself
• go to https://apigee.com/console/twitter
• select OAuth1 from Authentication and log in
using your Twitter account
Select
api.twitter.com/1.1
from Service
Click on the
on the left to see a
list of API methods
• select
• enter your Twitter handle into screen_name
and click
http://jsonviewer.stack.hu/
http://www.faceplusplus.com/demo-detect/
More info from picture
questions
where are you from?
are you male or female?
what job do you have?
when did you join?
how active are you?
what do you look like?
are you a bot?
tweets
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import sys
import urllib
# Go to http://dev.twitter.com and create an app.
# The consumer key and secret will be generated for you after
consumer_key = '4x8XS232ncHXewIOPa50eZZWz'
consumer_secret = '0rjF9c34QgjK6nlL9zSpptAmVntDDsXRKV5JS3sQ0bi15flq5Y'
# After the step above, you will be redirected to your app's page.
# Create an access token under the the "Your access token" section
access_token = '2958638362-6VIJ2S7zSX7ellLHvrFLbsJKBKimIDuk62O8ZNP'
access_token_secret='EwqIjYNJKDGhJskYHdMS8nX7dBqpxB94qmmarJL058B9I'
class StdOutListener(StreamListener):
""" A listener handles tweets are the received from the stream.
This is a basic listener that just prints received tweets to
stdout.
"""
def on_data(self, data):
print data[:-1]
return True
def on_error(self, status):
print status
Querying public stream
using python
(1)
https://tinyurl.com/aiss
15-gettweets
def auto_restart_stream(auth,listner,l_keywords):
while True:
try:
sapi = Stream(auth, l)
sapi.filter(track=l_keywords)
except:
#print 'Restarting ;)'
continue
if __name__ == '__main__':
keywords =
[u'Cátar',u'Catar',u'Katar',u'Katara',u'Kataras',u'Katari',u'Kataro',u'Qadar',u'Qatar',u'
‫,'ﺭﻃﻖ‬u'कतर',u'ਕਤਰ',u'卡塔尔',u'卡塔爾',u'카타르',u'‫,'קטאר‬u'कतार',u'કતાર''కతర్',u'ກາຕາ',u'カタ
ール',u'Κατάρ',u'Катар',u'Қатар',u'ատար',u'কাতার',u'ಕತಾರ್',u'ഖത്തർ',u'කටාර්',u'
กาตาร์',u'‫,'קַאטַאר‬u'கத்தார்',u'ប្រទេសកាតា',u'ကာတာနိုင်ငံ']
l = StdOutListener()
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
auto_restart_stream(auth,l,keywords)
Querying public stream
using python
(2)
https://tinyurl.com/aiss
15-gettweets
{"created_at":"Wed May 13 11:44:24 +0000 2015","id":598453736839598080,"id_str":"598453736839598080","text":"Don't get star struck often but I
like this guy @Mo_Farah you the man boss! Much respect to you! #Doha #qatar http://t.co/wf8nc0C527","source":"u003ca
href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for
iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_i
d_str":null,"in_reply_to_screen_name":null,"user":{"id":788413,"id_str":"788413","name":"Mohsin Ali","screen_name":"mohsin","location":"Doha,
Qatar","url":"http://mohsinali.com","description":"Digital story telling, infogrpahics, interactives, R&D, Emerging Technologies, Future Trends,
Innovation @ajlabs, Global Nomad, Likes Maps. LBA, DHA, BHA,
DOH","protected":false,"verified":false,"followers_count":2422,"friends_count":645,"listed_count":69,"favourites_count":889,"statuses_count":10756,
"created_at":"Thu Feb 22 11:11:01 +0000
2007","utc_offset":10800,"time_zone":"Riyadh","geo_enabled":true,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background
_color":"C0DEED","profile_background_image_url":"http://pbs.twimg.com/profile_background_images/462946198211407873/xWaKYtpF.jpeg","p
rofile_background_image_url_https":"https://pbs.twimg.com/profile_background_images/462946198211407873/xWaKYtpF.jpeg","profile_backgr
ound_tile":true,"profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333
333","profile_use_background_image":true,"profile_image_url":"http://pbs.twimg.com/profile_images/1249217364/n504379828_3076_normal.j
pg","profile_image_url_https":"https://pbs.twimg.com/profile_images/1249217364/n504379828_3076_normal.jpg","profile_banner_url":"https:
//pbs.twimg.com/profile_banners/788413/1399210132","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent
":null,"notifications":null},"geo":{"type":"Point","coordinates":[25.316197,51.498302]},"coordinates":{"type":"Point","coordinates":[51.498302,25.3161
97]},"place":{"id":"0181f32937df0de8","url":"https://api.twitter.com/1.1/geo/id/0181f32937df0de8.json","place_type":"admin","name":"Doha","
full_name":"Doha, Qatar","country_code":"QA","country":"u062fu0648u0644u0629
u0642u0637u0631","bounding_box":{"type":"Polygon","coordinates":[[[51.4477039,25.2216],[51.4477039,25.4263938],[51.630581,25.4263938],[5
1.630581,25.2216]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"Doha","indices":[97,102]}
,{"text":"qatar","indices":[103,109]}],"trends":[],"urls":[],"user_mentions":[{"screen_name":"Mo_Farah","name":"Mo
Farah","id":83855918,"id_str":"83855918","indices":[48,57]}],"symbols":[],"media":[{"id":598453717596119040,"id_str":"598453717596119040","indi
ces":[110,132],"media_url":"http://pbs.twimg.com/media/CE4ifEPUIAAhCsG.jpg","media_url_https":"https://pbs.twimg.com/media/CE4ifEPUIA
AhCsG.jpg","url":"http://t.co/wf8nc0C527","display_url":"pic.twitter.com/wf8nc0C527","expanded_url":"http://twitter.com/mohsin/status/59
8453736839598080/photo/1","type":"photo","sizes":{"small":{"w":340,"h":453,"resize":"fit"},"medium":{"w":600,"h":800,"resize":"fit"},"thumb":{"w
":150,"h":150,"resize":"crop"},"large":{"w":768,"h":1024,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":598453717596119040,"id_str":"5984537
17596119040","indices":[110,132],"media_url":"http://pbs.twimg.com/media/CE4ifEPUIAAhCsG.jpg","media_url_https":"https://pbs.twimg.com
/media/CE4ifEPUIAAhCsG.jpg","url":"http://t.co/wf8nc0C527","display_url":"pic.twitter.com/wf8nc0C527","expanded_url":"http://twitter.com/
mohsin/status/598453736839598080/photo/1","type":"photo","sizes":{"small":{"w":340,"h":453,"resize":"fit"},"medium":{"w":600,"h":800,"resize"
:"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":768,"h":1024,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":fal
se,"filter_level":"low","lang":"en","timestamp_ms":"1431517464252"}
https://tinyurl.com/aiss15-tweetjson
http://jsonviewer.stack.hu/
JSON Tweet Object
JSON Tweet Object
http://jsonviewer.stack.hu/
JSON Tweet Object
http://jsonviewer.stack.hu/
JSON Tweet Object
http://jsonviewer.stack.hu/
import json
import codecs
from geopy import *
fin = open("rawTweets.txt",'r')
fout = open("parsedTweets.txt",'w')
line = fin.readline().rstrip()
while (line):
jdict = json.loads(line)
if jdict['coordinates'] != None or jdict['place'] != None:
# Coordinates
if jdict['coordinates'] != None:
longitude = jdict['coordinates']['coordinates'][0]
latitude = jdict['coordinates']['coordinates'][1]
fout.write(str(longitude)+'t’)
fout.write(str(latitude)+'t')
# Tweet id
fout.write(str(jdict['id'])+'t’)
# User screen name
fout.write(jdict['user']['screen_name'].encode("UTF-8")+'t’)
# Timestamp
fout.write(str(jdict['timestamp_ms'])+'t’)
# User's language
fout.write(jdict['user']['lang']+'t’)
# Text
fout.write(jdict['text'].encode("UTF-8").replace('n'," ").replace('rn',""))
fout.write('n')
line = fin.readline().rstrip()
fin.close()
fout.close()
Extracting individual
fields from JSON
https://tinyurl.com/aiss
15-cleanjson
Tab Separated Value (TSV) format
Language Model
http://tweetcloud.icodeforlove.com/
workshop 25
twitter 20
religion 17
interaction 12
online 12
dyad 9
research 9
accepted 7
…
Activity
http://www.tweetails.com/
Mentions
http://www.tweetails.com/
questions
what are you interested in?
how do you eat/sleep/work/hang out?
how happy are you?
what political opinions do you have?
what outside sources do you link to?
what new emerging topics are you mentioning?
how do you behave?
are you a bot?
network
network
nodes
edges
User Network
User Network
Follower Network
Mention Network
Mention Network
for hashtags
questions
how influential are you?
how influential are your connections?
who influences you?
what are people around you like?
do you bring together different communities?
how fast will you know about a piece of news?
are you an opinion leader?
are you a bot?
resources
https://dev.twitter.com/overview/documentation
https://apigee.com
try it in your favorite language
https://dev.twitter.com/overview/api/twitter-libraries
next
using Twitter data for
real-world political speech mining

More Related Content

Viewers also liked

新建文件
新建文件新建文件
新建文件
SlideideaSoft02
 
Jaringan komp
Jaringan kompJaringan komp
Jaringan komp
desra putra
 
Task 3
Task 3Task 3
Идея города
Идея городаИдея города
Идея города
lukoshka
 
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin WangBeyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
FindSpark
 
Orion powerpoint
Orion powerpointOrion powerpoint
Orion powerpointManda Perez
 
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-a
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-aCatalogul proiectelor Cercul de Donatori Cluj, editia a IV-a
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-aFundatia Comunitara Cluj
 
Revista em quadrinhos - trabalho fgv - HQ
Revista em quadrinhos - trabalho fgv - HQRevista em quadrinhos - trabalho fgv - HQ
Revista em quadrinhos - trabalho fgv - HQ
Denis Rocha Borges
 
Task 6
Task 6Task 6
New Presentation
New PresentationNew Presentation
New Presentation
SlideideaSoft02
 
Stm c8 1st_year pt_group-e
Stm c8 1st_year pt_group-eStm c8 1st_year pt_group-e
Stm c8 1st_year pt_group-e
Siddharth Kumar Kadamb
 
تحقیق پیرامون محاکم قانونی افغانستان
تحقیق پیرامون محاکم قانونی افغانستانتحقیق پیرامون محاکم قانونی افغانستان
تحقیق پیرامون محاکم قانونی افغانستانIDCOAFGHANISTAN
 
Metroko irteera ibon
Metroko  irteera   ibonMetroko  irteera   ibon
Metroko irteera ibonibonlaka
 

Viewers also liked (17)

Task 7
Task 7Task 7
Task 7
 
新建文件
新建文件新建文件
新建文件
 
Senthil _Updated _Resume_V1
Senthil _Updated _Resume_V1Senthil _Updated _Resume_V1
Senthil _Updated _Resume_V1
 
Jaringan komp
Jaringan kompJaringan komp
Jaringan komp
 
Task 3
Task 3Task 3
Task 3
 
Transcript+Cer
Transcript+CerTranscript+Cer
Transcript+Cer
 
Идея города
Идея городаИдея города
Идея города
 
QUESTION 3
QUESTION 3QUESTION 3
QUESTION 3
 
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin WangBeyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
Beyond LinkedIn: How to Use Niche Social Media to Find a Job: By Kevin Wang
 
Orion powerpoint
Orion powerpointOrion powerpoint
Orion powerpoint
 
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-a
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-aCatalogul proiectelor Cercul de Donatori Cluj, editia a IV-a
Catalogul proiectelor Cercul de Donatori Cluj, editia a IV-a
 
Revista em quadrinhos - trabalho fgv - HQ
Revista em quadrinhos - trabalho fgv - HQRevista em quadrinhos - trabalho fgv - HQ
Revista em quadrinhos - trabalho fgv - HQ
 
Task 6
Task 6Task 6
Task 6
 
New Presentation
New PresentationNew Presentation
New Presentation
 
Stm c8 1st_year pt_group-e
Stm c8 1st_year pt_group-eStm c8 1st_year pt_group-e
Stm c8 1st_year pt_group-e
 
تحقیق پیرامون محاکم قانونی افغانستان
تحقیق پیرامون محاکم قانونی افغانستانتحقیق پیرامون محاکم قانونی افغانستان
تحقیق پیرامون محاکم قانونی افغانستان
 
Metroko irteera ibon
Metroko  irteera   ibonMetroko  irteera   ibon
Metroko irteera ibon
 

Similar to Language of Politics on Twitter - 02 Twitter

Tcat
TcatTcat
Tcat
Ke Jiang
 
Thou Shalt not Share Collections of Tweets: Should we give a TOS?
Thou Shalt not Share Collections of Tweets: Should we give a TOS?Thou Shalt not Share Collections of Tweets: Should we give a TOS?
Thou Shalt not Share Collections of Tweets: Should we give a TOS?
Andrew Long
 
Lsu tcat
Lsu tcatLsu tcat
Lsu tcat
Ke Jiang
 
twtData ChatGPT Plugin
twtData ChatGPT PlugintwtData ChatGPT Plugin
twtData ChatGPT Plugin
AvinashRulz
 
John Conroy
John ConroyJohn Conroy
John Conroyblogtalk
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and Insight
Matthew Russell
 
Unleashing twitter data for fun and insight
Unleashing twitter data for fun and insightUnleashing twitter data for fun and insight
Unleashing twitter data for fun and insight
Digital Reasoning
 
Twitter for business
Twitter for businessTwitter for business
Twitter for businessAckermann PR
 
American Majority Twitter Manual
American Majority Twitter ManualAmerican Majority Twitter Manual
American Majority Twitter Manual
Jennifer Raiffie
 
Twitter
TwitterTwitter
Tweeting and Texting
Tweeting and TextingTweeting and Texting
Tweeting and Texting
St. Petersburg College
 
20100327 Fewa Presented Slides
20100327 Fewa Presented Slides20100327 Fewa Presented Slides
20100327 Fewa Presented SlidesJohn Larkin
 
Twitter for Nonprofits
Twitter for NonprofitsTwitter for Nonprofits
Twitter for Nonprofits
Social Strategies
 
HR Technology Conference & Expo Twitterversity
HR Technology Conference & Expo TwitterversityHR Technology Conference & Expo Twitterversity
HR Technology Conference & Expo Twitterversityvoice of hr
 
The Value of Twitter
The Value of TwitterThe Value of Twitter
The Value of Twitter
Adam Blackwood
 
Get Twitter Data With The Best Twitter Profile Scraper.pdf
Get Twitter Data With The Best Twitter Profile Scraper.pdfGet Twitter Data With The Best Twitter Profile Scraper.pdf
Get Twitter Data With The Best Twitter Profile Scraper.pdf
AqsaBatool21
 
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors Thesis
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors ThesisData-Mining Twitter for Political Science -Hickman, Alfredo - Honors Thesis
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors ThesisAlfredo Hickman
 

Similar to Language of Politics on Twitter - 02 Twitter (20)

Tcat
TcatTcat
Tcat
 
Thou Shalt not Share Collections of Tweets: Should we give a TOS?
Thou Shalt not Share Collections of Tweets: Should we give a TOS?Thou Shalt not Share Collections of Tweets: Should we give a TOS?
Thou Shalt not Share Collections of Tweets: Should we give a TOS?
 
Lsu tcat
Lsu tcatLsu tcat
Lsu tcat
 
twtData ChatGPT Plugin
twtData ChatGPT PlugintwtData ChatGPT Plugin
twtData ChatGPT Plugin
 
John Conroy
John ConroyJohn Conroy
John Conroy
 
Twitter
TwitterTwitter
Twitter
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and Insight
 
Unleashing twitter data for fun and insight
Unleashing twitter data for fun and insightUnleashing twitter data for fun and insight
Unleashing twitter data for fun and insight
 
Twitter for business
Twitter for businessTwitter for business
Twitter for business
 
Twitter for PR and Journalism - Fall 2010
Twitter for PR and Journalism - Fall 2010Twitter for PR and Journalism - Fall 2010
Twitter for PR and Journalism - Fall 2010
 
Twitter Basics
Twitter BasicsTwitter Basics
Twitter Basics
 
American Majority Twitter Manual
American Majority Twitter ManualAmerican Majority Twitter Manual
American Majority Twitter Manual
 
Twitter
TwitterTwitter
Twitter
 
Tweeting and Texting
Tweeting and TextingTweeting and Texting
Tweeting and Texting
 
20100327 Fewa Presented Slides
20100327 Fewa Presented Slides20100327 Fewa Presented Slides
20100327 Fewa Presented Slides
 
Twitter for Nonprofits
Twitter for NonprofitsTwitter for Nonprofits
Twitter for Nonprofits
 
HR Technology Conference & Expo Twitterversity
HR Technology Conference & Expo TwitterversityHR Technology Conference & Expo Twitterversity
HR Technology Conference & Expo Twitterversity
 
The Value of Twitter
The Value of TwitterThe Value of Twitter
The Value of Twitter
 
Get Twitter Data With The Best Twitter Profile Scraper.pdf
Get Twitter Data With The Best Twitter Profile Scraper.pdfGet Twitter Data With The Best Twitter Profile Scraper.pdf
Get Twitter Data With The Best Twitter Profile Scraper.pdf
 
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors Thesis
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors ThesisData-Mining Twitter for Political Science -Hickman, Alfredo - Honors Thesis
Data-Mining Twitter for Political Science -Hickman, Alfredo - Honors Thesis
 

More from Yelena Mejova

Social Media for Lifestyle Health: Multimedia
Social Media for Lifestyle Health: MultimediaSocial Media for Lifestyle Health: Multimedia
Social Media for Lifestyle Health: Multimedia
Yelena Mejova
 
Modeling Human Values with Social Media
Modeling Human Values with Social MediaModeling Human Values with Social Media
Modeling Human Values with Social Media
Yelena Mejova
 
Capturing social media signals for health research
Capturing social media signals for health researchCapturing social media signals for health research
Capturing social media signals for health research
Yelena Mejova
 
Information Sources and Needs in the Obesity and Diabetes Twitter Discourse
Information Sources and Needs in the Obesity and DiabetesTwitter DiscourseInformation Sources and Needs in the Obesity and DiabetesTwitter Discourse
Information Sources and Needs in the Obesity and Diabetes Twitter Discourse
Yelena Mejova
 
Social Media and Tech for Health Research
Social Media and Tech for Health ResearchSocial Media and Tech for Health Research
Social Media and Tech for Health Research
Yelena Mejova
 
Social Medial for Health Research: Interventions
Social Medial for Health Research: InterventionsSocial Medial for Health Research: Interventions
Social Medial for Health Research: Interventions
Yelena Mejova
 
Language of Politics on Twitter - 03 Analysis
Language of Politics on Twitter - 03 AnalysisLanguage of Politics on Twitter - 03 Analysis
Language of Politics on Twitter - 03 Analysis
Yelena Mejova
 
Language of Politics on Twitter - 01 Political
Language of Politics on Twitter - 01 PoliticalLanguage of Politics on Twitter - 01 Political
Language of Politics on Twitter - 01 Political
Yelena Mejova
 
Religion on Social Media ICWSM 2015 Workshop Introduction
Religion on Social Media ICWSM 2015 Workshop IntroductionReligion on Social Media ICWSM 2015 Workshop Introduction
Religion on Social Media ICWSM 2015 Workshop Introduction
Yelena Mejova
 
Giving is Caring: Understanding Donation Behavior through Email
Giving is Caring: Understanding Donation Behavior through EmailGiving is Caring: Understanding Donation Behavior through Email
Giving is Caring: Understanding Donation Behavior through Email
Yelena Mejova
 

More from Yelena Mejova (10)

Social Media for Lifestyle Health: Multimedia
Social Media for Lifestyle Health: MultimediaSocial Media for Lifestyle Health: Multimedia
Social Media for Lifestyle Health: Multimedia
 
Modeling Human Values with Social Media
Modeling Human Values with Social MediaModeling Human Values with Social Media
Modeling Human Values with Social Media
 
Capturing social media signals for health research
Capturing social media signals for health researchCapturing social media signals for health research
Capturing social media signals for health research
 
Information Sources and Needs in the Obesity and Diabetes Twitter Discourse
Information Sources and Needs in the Obesity and DiabetesTwitter DiscourseInformation Sources and Needs in the Obesity and DiabetesTwitter Discourse
Information Sources and Needs in the Obesity and Diabetes Twitter Discourse
 
Social Media and Tech for Health Research
Social Media and Tech for Health ResearchSocial Media and Tech for Health Research
Social Media and Tech for Health Research
 
Social Medial for Health Research: Interventions
Social Medial for Health Research: InterventionsSocial Medial for Health Research: Interventions
Social Medial for Health Research: Interventions
 
Language of Politics on Twitter - 03 Analysis
Language of Politics on Twitter - 03 AnalysisLanguage of Politics on Twitter - 03 Analysis
Language of Politics on Twitter - 03 Analysis
 
Language of Politics on Twitter - 01 Political
Language of Politics on Twitter - 01 PoliticalLanguage of Politics on Twitter - 01 Political
Language of Politics on Twitter - 01 Political
 
Religion on Social Media ICWSM 2015 Workshop Introduction
Religion on Social Media ICWSM 2015 Workshop IntroductionReligion on Social Media ICWSM 2015 Workshop Introduction
Religion on Social Media ICWSM 2015 Workshop Introduction
 
Giving is Caring: Understanding Donation Behavior through Email
Giving is Caring: Understanding Donation Behavior through EmailGiving is Caring: Understanding Donation Behavior through Email
Giving is Caring: Understanding Donation Behavior through Email
 

Recently uploaded

一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 

Recently uploaded (20)

一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 

Language of Politics on Twitter - 02 Twitter

  • 1. Language of Politics on Twitter Summer School in AI American University Beirut June 16, 2015 Yelena Mejova @yelenamm Social Computing Group Qatar Computing Research Institute, HBKU
  • 4. #hashtags word or phrase preceded by a hash mark (#), used within a message to identify a keyword or topic of interest and facilitate a search for it
  • 5. links all links are shortened by Twitter to form t.co/… shorter control for spam, malware, phishing collect clickthrough information
  • 6. MEME an idea, behavior, or style that spreads from person to person within a culture Richard Dawkins MEME
  • 7. Monthly active users 302 million (4/28/2015) Total number of Twitter registered users “about a billion” (9/16/13) Unique monthly visitors to Twitter.com (desktop) 36 million (10/3/13) Daily active twitter users 100 million (10/3/13) Number of Twitter accounts that have ever sent a tweet 550 million (4/14/14)
  • 8.
  • 12.
  • 14. users
  • 15.
  • 16.
  • 17. try it yourself • go to https://apigee.com/console/twitter • select OAuth1 from Authentication and log in using your Twitter account
  • 18. Select api.twitter.com/1.1 from Service Click on the on the left to see a list of API methods
  • 19. • select • enter your Twitter handle into screen_name and click
  • 20.
  • 23. questions where are you from? are you male or female? what job do you have? when did you join? how active are you? what do you look like? are you a bot?
  • 25.
  • 26.
  • 27.
  • 28. #!/usr/bin/env python # -*- coding: utf-8 -*- from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import sys import urllib # Go to http://dev.twitter.com and create an app. # The consumer key and secret will be generated for you after consumer_key = '4x8XS232ncHXewIOPa50eZZWz' consumer_secret = '0rjF9c34QgjK6nlL9zSpptAmVntDDsXRKV5JS3sQ0bi15flq5Y' # After the step above, you will be redirected to your app's page. # Create an access token under the the "Your access token" section access_token = '2958638362-6VIJ2S7zSX7ellLHvrFLbsJKBKimIDuk62O8ZNP' access_token_secret='EwqIjYNJKDGhJskYHdMS8nX7dBqpxB94qmmarJL058B9I' class StdOutListener(StreamListener): """ A listener handles tweets are the received from the stream. This is a basic listener that just prints received tweets to stdout. """ def on_data(self, data): print data[:-1] return True def on_error(self, status): print status Querying public stream using python (1) https://tinyurl.com/aiss 15-gettweets
  • 29. def auto_restart_stream(auth,listner,l_keywords): while True: try: sapi = Stream(auth, l) sapi.filter(track=l_keywords) except: #print 'Restarting ;)' continue if __name__ == '__main__': keywords = [u'Cátar',u'Catar',u'Katar',u'Katara',u'Kataras',u'Katari',u'Kataro',u'Qadar',u'Qatar',u' ‫,'ﺭﻃﻖ‬u'कतर',u'ਕਤਰ',u'卡塔尔',u'卡塔爾',u'카타르',u'‫,'קטאר‬u'कतार',u'કતાર''కతర్',u'ກາຕາ',u'カタ ール',u'Κατάρ',u'Катар',u'Қатар',u'ատար',u'কাতার',u'ಕತಾರ್',u'ഖത്തർ',u'කටාර්',u' กาตาร์',u'‫,'קַאטַאר‬u'கத்தார்',u'ប្រទេសកាតា',u'ကာတာနိုင်ငံ'] l = StdOutListener() auth = OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) auto_restart_stream(auth,l,keywords) Querying public stream using python (2) https://tinyurl.com/aiss 15-gettweets
  • 30. {"created_at":"Wed May 13 11:44:24 +0000 2015","id":598453736839598080,"id_str":"598453736839598080","text":"Don't get star struck often but I like this guy @Mo_Farah you the man boss! Much respect to you! #Doha #qatar http://t.co/wf8nc0C527","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_i d_str":null,"in_reply_to_screen_name":null,"user":{"id":788413,"id_str":"788413","name":"Mohsin Ali","screen_name":"mohsin","location":"Doha, Qatar","url":"http://mohsinali.com","description":"Digital story telling, infogrpahics, interactives, R&D, Emerging Technologies, Future Trends, Innovation @ajlabs, Global Nomad, Likes Maps. LBA, DHA, BHA, DOH","protected":false,"verified":false,"followers_count":2422,"friends_count":645,"listed_count":69,"favourites_count":889,"statuses_count":10756, "created_at":"Thu Feb 22 11:11:01 +0000 2007","utc_offset":10800,"time_zone":"Riyadh","geo_enabled":true,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background _color":"C0DEED","profile_background_image_url":"http://pbs.twimg.com/profile_background_images/462946198211407873/xWaKYtpF.jpeg","p rofile_background_image_url_https":"https://pbs.twimg.com/profile_background_images/462946198211407873/xWaKYtpF.jpeg","profile_backgr ound_tile":true,"profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333 333","profile_use_background_image":true,"profile_image_url":"http://pbs.twimg.com/profile_images/1249217364/n504379828_3076_normal.j pg","profile_image_url_https":"https://pbs.twimg.com/profile_images/1249217364/n504379828_3076_normal.jpg","profile_banner_url":"https: //pbs.twimg.com/profile_banners/788413/1399210132","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent ":null,"notifications":null},"geo":{"type":"Point","coordinates":[25.316197,51.498302]},"coordinates":{"type":"Point","coordinates":[51.498302,25.3161 97]},"place":{"id":"0181f32937df0de8","url":"https://api.twitter.com/1.1/geo/id/0181f32937df0de8.json","place_type":"admin","name":"Doha"," full_name":"Doha, Qatar","country_code":"QA","country":"u062fu0648u0644u0629 u0642u0637u0631","bounding_box":{"type":"Polygon","coordinates":[[[51.4477039,25.2216],[51.4477039,25.4263938],[51.630581,25.4263938],[5 1.630581,25.2216]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"Doha","indices":[97,102]} ,{"text":"qatar","indices":[103,109]}],"trends":[],"urls":[],"user_mentions":[{"screen_name":"Mo_Farah","name":"Mo Farah","id":83855918,"id_str":"83855918","indices":[48,57]}],"symbols":[],"media":[{"id":598453717596119040,"id_str":"598453717596119040","indi ces":[110,132],"media_url":"http://pbs.twimg.com/media/CE4ifEPUIAAhCsG.jpg","media_url_https":"https://pbs.twimg.com/media/CE4ifEPUIA AhCsG.jpg","url":"http://t.co/wf8nc0C527","display_url":"pic.twitter.com/wf8nc0C527","expanded_url":"http://twitter.com/mohsin/status/59 8453736839598080/photo/1","type":"photo","sizes":{"small":{"w":340,"h":453,"resize":"fit"},"medium":{"w":600,"h":800,"resize":"fit"},"thumb":{"w ":150,"h":150,"resize":"crop"},"large":{"w":768,"h":1024,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":598453717596119040,"id_str":"5984537 17596119040","indices":[110,132],"media_url":"http://pbs.twimg.com/media/CE4ifEPUIAAhCsG.jpg","media_url_https":"https://pbs.twimg.com /media/CE4ifEPUIAAhCsG.jpg","url":"http://t.co/wf8nc0C527","display_url":"pic.twitter.com/wf8nc0C527","expanded_url":"http://twitter.com/ mohsin/status/598453736839598080/photo/1","type":"photo","sizes":{"small":{"w":340,"h":453,"resize":"fit"},"medium":{"w":600,"h":800,"resize" :"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":768,"h":1024,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":fal se,"filter_level":"low","lang":"en","timestamp_ms":"1431517464252"} https://tinyurl.com/aiss15-tweetjson
  • 35. import json import codecs from geopy import * fin = open("rawTweets.txt",'r') fout = open("parsedTweets.txt",'w') line = fin.readline().rstrip() while (line): jdict = json.loads(line) if jdict['coordinates'] != None or jdict['place'] != None: # Coordinates if jdict['coordinates'] != None: longitude = jdict['coordinates']['coordinates'][0] latitude = jdict['coordinates']['coordinates'][1] fout.write(str(longitude)+'t’) fout.write(str(latitude)+'t') # Tweet id fout.write(str(jdict['id'])+'t’) # User screen name fout.write(jdict['user']['screen_name'].encode("UTF-8")+'t’) # Timestamp fout.write(str(jdict['timestamp_ms'])+'t’) # User's language fout.write(jdict['user']['lang']+'t’) # Text fout.write(jdict['text'].encode("UTF-8").replace('n'," ").replace('rn',"")) fout.write('n') line = fin.readline().rstrip() fin.close() fout.close() Extracting individual fields from JSON https://tinyurl.com/aiss 15-cleanjson
  • 36. Tab Separated Value (TSV) format
  • 37. Language Model http://tweetcloud.icodeforlove.com/ workshop 25 twitter 20 religion 17 interaction 12 online 12 dyad 9 research 9 accepted 7 …
  • 40. questions what are you interested in? how do you eat/sleep/work/hang out? how happy are you? what political opinions do you have? what outside sources do you link to? what new emerging topics are you mentioning? how do you behave? are you a bot?
  • 48. questions how influential are you? how influential are your connections? who influences you? what are people around you like? do you bring together different communities? how fast will you know about a piece of news? are you an opinion leader? are you a bot?
  • 52. try it in your favorite language https://dev.twitter.com/overview/api/twitter-libraries
  • 53. next using Twitter data for real-world political speech mining

Editor's Notes

  1. https://support.twitter.com/entries/109623
  2. MEME an idea, behavior, or style that spreads from person to person within a culture Richard Dawkins
  3. http://expandedramblings.com/index.php/march-2013-by-the-numbers-a-few-amazing-twitter-stats/
  4. http://www.businessinsider.com/the-top-twitter-markets-in-the-world-2013-11 An amazing 41% of the online population in Saudi Arabia uses Twitter, a higher percentage than anywhere else in the world. Indonesia and the Philippines were close. Almost one-third of online audiences in India use Twitter. India, with 36.6 million people on the social network, is also Twitter's third-largest market right after the U.S. 14 countries — including Japan, the UK, South Africa, and Turkey — have heavier Twitter usage than the social network's home market, the U.S. 84.4 million Chinese Internet users report having used Twitter thanks to various hacks despite the fact that it's blocked in the country (along with just about every other Western social media service).
  5. Representational State Transfer (REST)
  6. http://mark-kay.net/2014/08/15/network-graph-of-twitter-followers/
  7. http://www.alex-hanna.com/tworkshops/lesson-7-mention-network-analysis/ Its complexity is quite remarkable, especially for only representing about 10 minutes of tweets. The larger nodes are those that have been mentioned more. The red edges are people who have interacted more than three times. So you see a pretty low incidence of interaction in this short time period, but a lot of mentions of elite users. You can also see a bit of a polarization developed around the two big nodes in the center, which are Obama and Romney. Once you run these analysis across time I’m sure more patterns will emerge.
  8. http://twittertoolsbook.com/10-awesome-twitter-analytics-visualization-tools/