I am working currently in a small passion project to understand citation network. After some research, I came across three types of major citation analyses: direct citation, co-citation and bibliographic coupling.
I was able to produce direct citation network in python. But creating co-citation and bibliographic coupling has been little trickier, though I understand their differences.
I have a dataframe consisting of two columns: article column and a second column of list of articles that cites the main article column.
Can someone provide me a code based example to create these kinds of networks? Appreciate the help! Thank you
Code example I used for direct citation:
data = {
'cited_articles': ['A', 'B', 'C', 'D'],
'citing_articles': [['B', 'C'], ['C'], ['A', 'B', 'D'], ['B']]
}
df = pd.DataFrame(data)
G=nx.DiGraph()
G.add_nodes_from(df['cited_articles'])
for idx, row in df.iterrows():
cited_article = row['cited_articles']
citations = row['citing_articles']
for citation in citations:
G.add_edge(citation, cited_article)