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)
评论列表
文章目录