Is anyone familiar with a way to implement Main Path Analysis (Hummon and Doreian 1989) using igraph in R?
Here is an example from the original Hummon and Doreian article. It tracks the citations from 40 journal articles on DNA. Arrows move forward in time (information from old articles 'flows to' new ones).
dna_edges <- data.frame(from=c(1,2,3,3,3,5,6,9,12,12,15,15,10,11,11,13,14,14,14,16,16,17,19,19,19,19,19,20,20,20,20,24,24,21,21,23,22,26,27,29,30,31,31,32,32,32,33,33,35,35,36,36,36),
to=c(8,18,4,5,21,12,9,12,15,29,29,22,17,13,20,20,16,20,31,17,20,34,20,24,25,21,25,31,22,30,22,28,37,22,32,27,27,27,32,32,40,32,40,36,38,33,32,35,38,39,38,39,40))
dna_g <- graph_from_data_frame(dna_edges, directed=T)
plot(dna_g,
layout=layout_with_sugiyama(dna_g,
layers = V(dna_g)$name)$layout)
Liu et al (2019) explain that in a citation network nodes can be one of 3 things:
- Sources: are cited but cite no one
- Sinks: cite others but are never cited
- Intermediates: cite and are cited
So in this example, we have ten articles that are 'sources' and ten others that are 'sinks':
dna_sources <- V(dna_g)$name[which(degree(dna_g, mode="in")==0)] # sources
[1] "8" "18" "4" "34" "25" "28" "37" "40" "38" "39"
dna_sinks <- V(dna_g)$name[which(degree(dna_g, mode="out")==0)] # sinks
[1] "1" "2" "3" "6" "10" "11" "14" "19" "23" "26"
A Main Path is the most used path connecting a source to a sink. Search Path Count (SPC) is one of the ways to do it.
"A citation link’s SPC is the number of times the link is traversed if one runs through all the possible citation chains from all the sources to all the sinks in a citation network. To find SPC for a specific link, one needs to enumerate all the possible citation chains that emanate from all the sources and terminate at all the sinks" (Liu et al. 2019: 381)
So it would seem that in order to proceed one needs to (i) pick a source-sink pair, (ii) find all paths connecting this two nodes and add +1 weight to each edge when it is crossed, (iii) repeat for the other source-sink pairs.
Any thoughts on how to perform (i) to (iii)?


