3

Bruggen Blog: Graphs are everywhere - also in Religious Texts - part 6 and close...

 2 years ago
source link: https://blog.bruggen.com/2022/07/graphs-are-everywhere-also-in-religious_99.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Tuesday, 5 July 2022

Graphs are everywhere - also in Religious Texts - part 6 and close - Analysing the Hadith Narrator Graph

So what we will do here, is we will start looking at some of the structural graph metrics that are going to give us a little bit more insight into the importance of different parts of the Hadith Narrator Graph. We will use the Neuler Graph Data Science playground to do that. Neuler is a so-called GraphApp that you can easily install into your Neo4j Desktop environment. You can download and install it, and learn more about it here.

Once installed, we will run a few easy algo's.

Pagerank centrality of the Scholars

Once of the advantages of the AGGREGATED_HADITH_CHAIN relationship, is that we now have a mono-partite, weighted subgraph that is very suitable for understanding which Scholars are actually more interesting than others - this is a great use case for the Pagerank algorithm. Here's how we configure it:

uc?export=view&id=1ZOdIrYWmVu9Cx7n86_VHrXTHDkEWH1z9

You will see that the results actually come back very quickly - the Neo4j Graph Data Science library just does a magnificent job at this. 

uc?export=view&id=1ZRzg4NW2BTajYcW0T3GwobvwakPEE3yy

The result can of course also be persisted back into the database, so that we can later use it again in some of our (modified) exploration activities.

Betweenness centrality of Scholars

Very similarly, we can run a different algorithm to understand the betweenness centrality of the different narrators. It's very well imaginable that there would be certain narrators that created like a bottleneck in the narrator network - all the narrations would potentially pass through them at one point in time? Wouldn't that be super interesting - as that bottleneck narrator would then clearly have an inordinate amount of influence in the bigger narration network, right?

Here's how we configure the algorithm and its results:

uc?export=view&id=1ZVoKxJRt14zgYD8QAeEoDm-6Ea5sUZCk
 
uc?export=view&id=1ZZ1h7WCpGLJKS4I8nhd8_VxeKXdNHccX

Closeness centrality of Scholars

Last but not least, here's a very similar exercise for closeness centrality of the different narrators. Here's how you can run that, and display the result both in graph and tabular output:

uc?export=view&id=1ZiHD7CuC6qQVJ8L0umT1ZXsZ9pbY-wZz uc?export=view&id=1Zizr1g13XSnzW3tod4s7_ly6PXf-0dHX uc?export=view&id=1ZmVq3azjSDAGT548IK99ZXM6vocx9mI4

Wrapping up

Waw - what an experience this whole exploration has been. I am a little overwhelmed by everything that I have written and explored in this blogpost - more so than has ever been the case before. This is such an interesting topic, and so much more could be done here if someone would actually have a better understanding of the domain and knew what they were looking for in some detail. As I have explained above - I don't have that, and I have no ambition to build that up. To me, this was just another example of how graphs are everywhere, literally, and how you can do super interesting stuff with innovative tools like Neo4j, all day long.

I hope this was as interesting for you as it was for me - and look forward to your feedback.

All the best

PS: as always all the code/queries are available on github!

PPS: you can find all the parts in this blogpost on the following links


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK