In [1]:
import sys
sys.path.append('/Users/erickpeirson/tethne')
In [2]:
import matplotlib.pyplot as plt
In [3]:
datapath = '/Users/erickpeirson/Dropbox/Research/Genecology/wos'
In [ ]:
from tethne.readers import wos
MyCorpus = wos.corpus_from_dir(datapath)
In [ ]:
print len(MyCorpus.papers) # How many Papers?
print len(MyCorpus.citations) # How many citations?
In [ ]:
MyCorpus.slice('date', 'time_window', window_size=4)
In [ ]:
from tethne import GraphCollection
method_kwargs = { 'threshold': 2, 'topn': 100 }
G = GraphCollection().build(MyCorpus, 'date', 'papers', 'cocitation', method_kwargs=method_kwargs)
In [ ]:
from tethne.analyze import collection
bc = collection.algorithm(G, 'betweenness_centrality')
In [ ]:
G.graphs[2001].nodes(data=True)
In [ ]:
citations = collection.node_history(G, 161, 'citations')
In [ ]:
bc = collection.node_history(G, 161, 'betweenness_centrality')
In [ ]:
deltas = collection.delta(G, 'citations')
In [ ]:
G[2000].nodes(data=True)
In [ ]:
In [ ]: