DATA SCIENCE / PYTHON CODE SNIPPETS
From Dataframe to Knowledge Graph
Using networkx and matplotlib
I stumbled upon an article exploring the relationships in the Mahabharata using a knowledge graph, and it made me wonder if the same can be done with the Bible. I searched Kaggle for a suitable dataset, and once I found it, I began to embark on a journey into the world of knowledge graphs.
In this post, I will visualize and analyze the Bible characters’ relationships using networkx and matplotlib.
Let’s begin.
Introduction
A Knowledge Graph is a way of organizing information by connecting related things, like people, places, or ideas, in a web-like structure. It shows how different things are related, making finding, understanding, and using that information easier. The things or entities are called nodes, and the relationships between them are called edges. Below, the circles are the nodes, and the lines are the edges.
A Knowledge Graph is a powerful tool for modeling, organizing, and reasoning about data, particularly when you need to capture the…