Reader small image

You're reading from  Graph Data Processing with Cypher

Product typeBook
Published inDec 2022
PublisherPackt
ISBN-139781804611074
Edition1st Edition
Concepts
Right arrow
Author (1)
Ravindranatha Anthapu
Ravindranatha Anthapu
author image
Ravindranatha Anthapu

Ravindranatha Anthapu has more than 25 years of experience in working with W3C standards or building cutting-edge technologies like integrating speech with mobile applications in the 2000s. He is a technology enthusiast who worked from operating system device drivers to writing compilers for C language to modern web technologies, transitioning seamlessly and bringing experience from each of these domains and technologies to deliver successful solutions today. As a Principal Consultant at Neo4j today, Ravindranatha works with large enterprise customers to make sure they are able to leverage graph technologies effectively across various domains.
Read more about Ravindranatha Anthapu

Right arrow

Cypher Ecosystem

In the previous chapters, we looked at all the aspects of querying graph databases using Cypher. This chapter focuses on the Cypher ecosystem. You will be introduced to a selection of tools and packages available for more advanced data processing, along with visualizing the results as graphs, tables, and more.

We will look at the following topics in this chapter:

  • Using Neo4j extensions
  • Using visualization tools
  • Using Kafka and Spark connectors
  • Using Graph Data Science
  • Using Neo4j Workspace

First, we will take a look at the Neo4j extensions.

Using Neo4j extensions

While Cypher is a very powerful language for expressing graph traversal in a simple manner, it is difficult to implement complex graph analytics or handle different kinds of data effectively. This is where Neo4j extensions come into the picture. Neo4j provides the ability to build and register plugins with procedures that can be invoked from Cypher to perform more complex operations.

In the following screenshot, we can see the plugins available to install for the selected database in Neo4j Desktop:

Figure 11.1 – Plugin management in Neo4j Desktop

Let’s review what these plugins provide in the following list:

  • APOC: APOC is short for Awesome Procedures On Cypher and is an add-on library that provides a lot of functions and procedures that add useful functionality to Cypher. We discussed the important features of this extension in detail in Chapter 10, Using APOC Utilities.

You can find more details on this...

Using visualization tools

We will take a look at the visualization tools available to present the results. The visualization tools available from Neo4j are already installed in Neo4j Desktop by default. These are as follows:

  • Neo4j Browser: We have looked at using Neo4j Browser to interact with databases in Chapter 1, Introduction to Neo4j and Cypher. It is a very good tool for developers to interact with databases.
  • Bloom: Bloom is a more powerful graph visualization tool than Neo4j Browser. While Neo4j Browser is aimed more at developers, Bloom is aimed at end users exploring graphs using more natural language queries. It provides the following capabilities:
    • High-performance, GPU-powered rendering to create large graphs with physics-based layouts.
    • Data exploration functionality without needing to learn Cypher with the ability to use near-natural language search phrases.
    • The ability to selectively expand the nodes and relationships along with inspecting the properties.
    • The ability...

Using Kafka and Spark connectors

Neo4j has official support for Kafka and Spark connectors that can read and write data to graphs. The Kafka connector makes it easy to ingest data into Neo4j at scale, without needing to build custom client code. Spark connector simplifies the reading and writing of data to graphs using dataframes. Let’s take a look at the core features provided by these connectors:

  • Kafka connector:
    • Provides the capability to ingest data into Neo4j using templatized Cypher queries
    • Can handle streaming data efficiently
    • Runs as a plugin on existing Kafka installations
    • You can read more about this connector at https://neo4j.com/labs/kafka/4.1/kafka-connect/
  • Spark connector:
    • Makes it easier to read nodes and relationships into a dataframe
    • Makes it possible to take the data from dataframes and write it into Neo4j easily
    • Supports using Python or R as the language of choice in Spark
    • Makes it easier to leverage all the capabilities of Spark to massage the data before...

Using Graph Data Science

Neo4j’s Graph Data Science (GDS) library implements a lot of graph algorithms to help users derive intelligence from data. They are implemented to run in parallel, allowing algorithms to run fast and provide results quickly.

The algorithms included are as follows:

  • Node centrality algorithm
  • Community detection algorithm
  • Similarity algorithms including the Jaccard, Cosine, Pearson, Euclidean and k-nearest neighbor algorithms
  • Path-finding algorithms including the Dijkstra, A* shortest path, Yen’s shortest path, breadth-first, depth-first, and random walk algorithms
  • Node embedding algorithms including FastRP, GraphSAGE, and Node2Vec
  • Link prediction algorithms

Along with these graph algorithms, this library also provides the following machine learning pipelines:

  • Node classifications
  • Link predictions

This library is a must-have tool in any data scientist’s toolkit to process graph data...

Using Neo4j Workspace

Neo4j Workspace is a new tool to help developers quickly map and load the data and analyze it with visual tools such as Neo4j Browser and Bloom without needing any coding experience. It makes it easy for graph enthusiasts, explorers, and data scientists who lack coding experience or knowledge of Cypher to get started very quickly. It includes other tools such as Data Importer, which provides a UI to map CSV/TSV data to a graph model and load the data into a graph. Browser and Bloom are also included to help explore the data visually in a single place. Workspace is still in early access; users can register for access at https://neo4j.com/product/workspace/.

Now, let’s summarize what we’ve learned in this chapter.

Summary

In this chapter, we took a brief look at Neo4j extensions including APOC, the Graph Data Science library, Neosemantics, and Neo4j streams, which can enhance Cypher’s capabilities to handle complex activities in Neo4j. We also talked about visualization tools such as Bloom, NeoDash, and others that are available to explore graph data using charts and maps, among other things.

In the next chapter, we will take a look at some tips and tricks to help you get the most out of Cypher.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Graph Data Processing with Cypher
Published in: Dec 2022Publisher: PacktISBN-13: 9781804611074
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Ravindranatha Anthapu

Ravindranatha Anthapu has more than 25 years of experience in working with W3C standards or building cutting-edge technologies like integrating speech with mobile applications in the 2000s. He is a technology enthusiast who worked from operating system device drivers to writing compilers for C language to modern web technologies, transitioning seamlessly and bringing experience from each of these domains and technologies to deliver successful solutions today. As a Principal Consultant at Neo4j today, Ravindranatha works with large enterprise customers to make sure they are able to leverage graph technologies effectively across various domains.
Read more about Ravindranatha Anthapu