Python 对Twitter中指定话题的被转载Tweet数量的频谱分析
来源:互联网 发布:方维社区o2o系统 源码 编辑:程序博客网 时间:2024/06/10 03:54
CODE:
#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-7-10@author: guaguastd@name: retweet_frequency_map.py'''if __name__ == '__main__': # import visualize from visualize import visualize_frequency_map # pip install prettytable # from prettytable import PrettyTable # import search from search import search_for_tweet # import login, see http://blog.csdn.net/guaguastd/article/details/31706155 from login import twitter_login # get the twitter access api twitter_api = twitter_login() # import tweet from tweet import popular_retweets while 1: query = raw_input('\nInput the query (eg. #MentionSomeoneImportantForYou, exit to quit): ') if query == 'exit': print 'Successfully exit!' break statuses = search_for_tweet(twitter_api, query) retweets = popular_retweets(statuses) counts = [count for count, _, _ in retweets] sTitle = "Retweets" xLabel = "Bins (number of times retweeted)" yLabel = "Number of tweets in bin" visualize_frequency_map(counts, sTitle, xLabel, yLabel)
RESULT:
Input the query (eg. #MentionSomeoneImportantForYou, exit to quit): #MentionSomeoneImportantForYouLength of statuses 95Input the query (eg. #MentionSomeoneImportantForYou, exit to quit):
0 0
- Python 对Twitter中指定话题的被转载Tweet数量的频谱分析
- Python 对Twitter中指定话题的Tweet基本元素的频谱分析
- Python 可视化Twitter中指定话题中Tweet的词汇频率
- Python 提取Twitter特定话题中转载tweet的用户
- Python 查找Twitter中特定话题中最流行(转载最多)的10个Tweet
- Python 对Twitter tweet的元素 (Word, Screen Name, Hash Tag)的频率分析
- Python 对Twitter tweet的元素 (Word, Screen Name, Hash Tag)的词汇多样性分析
- Python 查找Twitter中特定话题中最流行的10个转发Tweet
- Python 提取Twitter用户的Tweet
- 对正弦信号相加的频谱分析
- 【转】java对音频文件的频谱分析
- 如何用python读取文本中指定行的内容
- python 使用-读取文件、替换文件中指定的内容
- 求字符串中指定开始和结束字符串的子串数量
- 使用Python对音频进行频谱分析
- C#返回在字典或列表中指定的序列中满足条件的元素数量 dictionary.count
- Python 获取Twitter话题 (API)
- 删除文件中指定的部分内容
- 4.1.2 Longest Valid Parentheses
- Disruptor 3种EventProcessor实现类
- 地火明夷
- 如何选项目?
- Android studio for mac 安装
- Python 对Twitter中指定话题的被转载Tweet数量的频谱分析
- 3Sum
- Spring容器初始化
- Direct3D 纹理使用
- 程序员生存定律--表达背后的力量(1)
- 发的技术特点
- linux命令大全watch命令详解(监测命令运行结果)
- linux命令大全 ss命令用详解 (获取socket统计信息)
- 禁止win7安装更新后自动重启