test_networks.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pysmap 作者: SMAPPNYU 项目源码 文件源码
def test_make_retweet_network_graph(self):
        output_path = '{}/chart_tests/network-{}-retweet.graphml'.format(os.path.dirname(os.path.realpath(__file__)), datetime.now())
        file_path = '{}/{}'.format(os.path.dirname(os.path.realpath(__file__)), config['json']['valid'])
        collection = SmappCollection('json', file_path)
        digraph = networks.retweet_network(collection, ['id_str', 'retweeted_status.id_str', 'created_at', 'text', 'lang'], ['id_str', 'screen_name', 'location', 'description'])
        nx.write_graphml(digraph, output_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号