Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Hands-On Graph Analytics with Neo4j

You're reading from   Hands-On Graph Analytics with Neo4j Perform graph processing and visualization techniques using connected data across your enterprise

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781839212611
Length 510 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Scifo Scifo
Author Profile Icon Scifo
Scifo
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Graph Modeling with Neo4j
2. Graph Databases FREE CHAPTER 3. The Cypher Query Language 4. Empowering Your Business with Pure Cypher 5. Section 2: Graph Algorithms
6. The Graph Data Science Library and Path Finding 7. Spatial Data 8. Node Importance 9. Community Detection and Similarity Measures 10. Section 3: Machine Learning on Graphs
11. Using Graph-based Features in Machine Learning 12. Predicting Relationships 13. Graph Embedding - from Graphs to Matrices 14. Section 4: Neo4j for Production
15. Using Neo4j in Your Web Application 16. Neo4j at Scale 17. Other Books You May Enjoy

Importing the data into Neo4j

The data we are going to use in the rest of this chapter is a randomly generated geometric graph. This kind of graph has many interesting features, one of them being its ability to reproduce the behavior of some real-life graphs such as social graphs.

After downloading the data and placing it in the import folder of our graph, we can use the following Cypher statement to import it into Neo4j:

LOAD CSV FROM "file:///graph_T2.edgelist" AS row
FIELDTERMINATOR " "
MERGE (u:Node {id: toInteger(row[0])})
MERGE (v:Node {id: toInteger(row[1])})
MERGE (u)-[:KNOWS_T2]->(v)
The graph contains only 500 nodes and 3,565 relationships, which is the reason why we can ignore the warning regarding the Eager operator in the preceding query.

The training set contains edges that were already present in the graph at time t2. So let's also import the graph at a prior time, t1. At that moment, the nodes are the same as the already existing ones, so we...

lock icon The rest of the chapter is locked
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.
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
Visually different images