Book Image

Graph Data Modeling in Python

By : Gary Hutson, Matt Jackson
Book Image

Graph Data Modeling in Python

By: Gary Hutson, Matt Jackson

Overview of this book

Graphs have become increasingly integral to powering the products and services we use in our daily lives, driving social media, online shopping recommendations, and even fraud detection. With this book, you’ll see how a good graph data model can help enhance efficiency and unlock hidden insights through complex network analysis. Graph Data Modeling in Python will guide you through designing, implementing, and harnessing a variety of graph data models using the popular open source Python libraries NetworkX and igraph. Following practical use cases and examples, you’ll find out how to design optimal graph models capable of supporting a wide range of queries and features. Moreover, you’ll seamlessly transition from traditional relational databases and tabular data to the dynamic world of graph data structures that allow powerful, path-based analyses. As well as learning how to manage a persistent graph database using Neo4j, you’ll also get to grips with adapting your network model to evolving data requirements. By the end of this book, you’ll be able to transform tabular data into powerful graph data models. In essence, you’ll build your knowledge from beginner to advanced-level practitioner in no time.
Table of Contents (16 chapters)
Part 1: Getting Started with Graph Data Modeling
Part 2: Making the Graph Transition
Part 3: Storing and Productionizing Graphs
Part 4: Graphing Like a Pro

The use of graphs across various industries

Graph data science is prevalent across a wide array of industries.

The main areas where graphs are being used effectively are as follows:

  • Finance: To look at fraud detection and portfolio risk.
  • Government: To aid with intelligence profiling and supply chain analytics.
  • Life sciences: For looking at patient journeys through a hospital (the transition of a patient through various services), drug response rates, and the transition of infections through a population.
  • Network & IT: Security networks and user access management (nodes on a network represent each user logging into a network).
  • Telecoms: Through network optimization and churn prediction.
  • Marketing: Mainly for customer and market segmentation purposes.
  • Social media analysis: We work for a company that specializes in platform moderation, online harm protection, and brand defense. By creating graphs to defend against attacks on brands, we can find vulnerable people or moderate the most severe type of content.

In terms of graphs in industry, they are pervasive due to the reasons we have already explored in this chapter. The ability to quickly link nodes and edges, and create relationships between them, is the reason why more problems in data science are being modeled as graphs or network science problems. In addition, the underlying data can be queried at a rapid rate. This can be done instead of using traditional database solutions, which, as we have already identified, are slow to query compared to GDBs.

Following this, in the next section, we will introduce the main two driving packages for graph analytics and modeling. We will show you the basic usage of the packages. In the subsequent chapters, we will keep building on why these packages are powerful.