Errata

Graph Algorithms

Errata for Graph Algorithms

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
ePub
Page Chapter 7
Data Import section

As a suggestion, it greatly helps newbies to see a step by step example of how to use the Import tool. Also, the link to the Yelp Dataset challenge is not working anymore.

I found one in kaggle:
https://www.kaggle.com/yelp-dataset/yelp-dataset
but when I expanded the zip file, it was in JSON format.

then there is the challenge of connecting NEO4J to python. I wish there was more meat in this section to guide us with more step by step procedures to follow.




Note from the Author or Editor:
I have updated in Atlas to add a note on first use of Yelp and update the link.
"Yelp makes a subset of their data available for personal, educational, and academic purposes. The Yelp dataset is periodically updated which may make it necessary for you to alter how you load updated data and will likely alter some algorithm results."

Wilson L. Chua  Apr 15, 2020  Jun 05, 2020
2-11
Figure 2-11, Graph 2

Figure 2-11, Graph 2- "Projection of Viewers" must have a relationship between Bev and Don with a weight of 1.

Note from the Author or Editor:
This is a mistake that can be fixed exactly as stated in the error description.
FIX:
Figure 2-11, Graph 2- "Projection of Viewers" draw a straight vertical line between Bev and Don and add a number "1" next to it.

Anonymous  Aug 06, 2019  Jun 05, 2020
PDF
Page 11
Figure 1-8

Hi,

I enjoyed reading the book.

Shouldn't the text on the upper right-hand side be "Normal Distribution" as opposed to "Power-Law Distribution" which is already present on the left hand side? Apart from that, it _looks like_ a normal distribution ;-).

Regards
Christian

Note from the Author or Editor:
The error description is correct.
FIX:
Figure 1-8, change the bold text, "Power-Law Distribution" on the upper right to "Normal Distribution". Leave as-is, the upper left text.

Christian Winkler  May 28, 2019  Jun 05, 2020
PDF,
Page 11
Figure 1-8

Both curves in the figure are captioned as "Power-Law Distribution". The left one follows a power-law distribution, but the right one is a normal distribution, also known as Gaussian distribution.

Note from the Author or Editor:
This has been corrected in Atlas.

Gabor Szarnyas  May 17, 2019  Jun 05, 2020
PDF
Page 23
4nd paragraph

in 4nd paragraph:
"Of these variations, spanning trees are the most relevant for this book. A spanning tree is a subgraph that includes all the nodes of a larger acyclic graph but not all the relationships. A minimum spanning tree connects all the nodes of a graph with either the least number of hops or least weighted paths."

is it
includes all the nodes of a larger "cyclic" graph ?

Note from the Author or Editor:
There is an error in this sentence: "A spanning tree is a subgraph that includes all the nodes of a larger acyclic graph but not all the relationships."

Change to: "A spanning tree is an acyclic subgraph that includes all the nodes of a larger graph but not all the relationships."

RBK  Jun 14, 2019  Jun 17, 2020
PDF
Page 44
Importing the Data into Neo4j

In the URI definition is missing the last slash on the first line of the definition:

WITH "https://github.com/neo4j-graph-analytics/book/raw/master/data" AS base

the correct version is:
WITH "https://github.com/neo4j-graph-analytics/book/raw/master/data/" AS base

Note from the Author or Editor:
Both the original URI definition and the described correction works. We should update to align with the O'Reilly style guides.

Valerio Ruggeri  May 23, 2019  Jun 17, 2020
PDF
Page 44
Importing the Data into Neo4j

When you run the script for loading nodes, the html file is read and not the csv file
as in the following example:

WITH "https://github.com/neo4j-graph-analytics/book/blob/master/data/" AS base
WITH base + "transport-nodes.csv" AS uri
LOAD CSV FROM uri AS row WITH row
RETURN row
LIMIT 5;

["<!DOCTYPE html>"]
["<html lang="en">"]
[" <head>"]
[" <meta charset="utf-8">"]
[" <link rel="dns-prefetch" href="https://github.githubassets.com">"]

Note from the Author or Editor:
Hey,
Yes you're right. That line should be:
WITH "https://github.com/neo4j-graph-analytics/book/raw/master/data/" AS bas

Instead of:
WITH "https://github.com/neo4j-graph-analytics/book/blob/master/data/" AS base
Cheers, Mark

Valerio Ruggeri  May 23, 2019  Jun 17, 2020
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 44
Code under Importing the Data into Neo4j

Use of "Double Quotes" in places where 'Single Quotes' is preferred syntax for literal strings in the Cypher language. (Code still works but we should correct it.)

CHANGE TO:
WITH 'https://github.com/neo4j-graph-analytics/book/raw/master/data/' AS base WITH base + 'transport-nodes.csv' AS uri

CHANGE TO:
WITH 'https://github.com/neo4j-graph-analytics/book/raw/master/data/' AS base WITH base + 'transport-relationships.csv' AS uri

Amy Hodler
Amy Hodler
 
Apr 20, 2021  Apr 23, 2021
PDF
Page 55
2

The Aggregate_Messages module is part of the GraphFrames library and contains some useful helper functions.

there is a underline in module name "AggregateMessages"

Note from the Author or Editor:
This sentence should be corrected, "The Aggregate_Messages module is part of the GraphFrames library and contains some useful helper functions."

Change to, "The aggregateMessages module is part of the GraphFrames library and contains some useful helper functions." (Yes, it is the lower case "a" and upper case "M".)

RBK  Jun 20, 2019  Jun 17, 2020
PDF
Page 112
1 paragraph

judge from the context, there should a word "relationships" missing.

"You can download the nodes and (here missing relationships) files from the book’s GitHub repository (https://bit.ly/2FPgGVV)."

Note from the Author or Editor:
The error description is correct.
We should change this sentence from, "You can download the nodes and files from the book’s GitHub repository (https://bit.ly/2FPgGVV)."

To
"You can download the nodes and relationships files from the book’s GitHub repository (https://bit.ly/2FPgGVV)."

張靜雯  Jun 25, 2019  Jun 17, 2020
PDF
Page 126
Connected Component with Neo4J

In the query :

CALL algo.unionFind.stream("Library", "DEPENDS_ON")
YIELD nodeId,setId
RETURN setId, collect(algo.getNodeById(nodeId)) AS libraries
ORDER BY size(libraries) DESC

the definition of the field for the collect is missing.

the correct version is as follows:

CALL algo.unionFind.stream("Library", "DEPENDS_ON")
YIELD nodeId,setId
RETURN setId, collect(algo.getNodeById(nodeId).id) AS libraries
ORDER BY size(libraries) DESC

Note from the Author or Editor:
Hi,

Yep you're right, that does look like a typo.

Cheers, Mark

Valerio Ruggeri  May 27, 2019  Jun 17, 2020
PDF
Page 132
Figure 6-9

Figure 6-9 shows 4 groups only, not 6 as the result in table

Note from the Author or Editor:
We show a subset of the results in Figure 6-9.

Two corrections can help clarify:
1) Figure 6-9 text can be updated to, "Clusters with more than 1 node found by the Label Propagation algorithm"

2) Page 131, change this sentence, "The results, which can also be seen visually in Figure 6-9, are fairly similar to those we got with Apache Spark."

To, "A subset of the results can be seen visually in Figure 6-9 and are similar to those we got with Apache Spark."

張靜雯  Jun 26, 2019  Jun 17, 2020
PDF
Page 148
4nd paragraph

incorrect font setting, this line should be a pip cmd
"pip install neo4j-driver tabulate pandas matplotlib"

Note from the Author or Editor:
The description of the error is correct. Font needs to be updated.

張靜雯  Jun 26, 2019  Jun 17, 2020
PDF
Page 156
2nd paragraph

"99.99% reflects the influence rank for the top 0.0001% reviewers and 100% is simply the highest PageRank score."

should be

"99.99% reflects the influence rank for the top 0.01% reviewers" ??

Note from the Author or Editor:
Yes, it should be 0.01% and not 0.0001%.

RBK  Jul 23, 2019  Jun 17, 2020
PDF
Page 156
Last paragraph

Because we’re interested in finding only the most influential users, we’ll write a query
that only finds users with a PageRank score in the top 0.001% of all users.

should say:

Because we’re interested in finding only the most influential users, we’ll write a query
that only finds users with a PageRank score in the top 0.1% of all users.

And:

// Only find users that have a hotelPageRank score in the top 0.001% of users
MATCH (u:User)
WHERE u.hotelPageRank > 1.64951

should say:

// Only find users that have a hotelPageRank score in the top 0.1% of users
MATCH (u:User)
WHERE u.hotelPageRank > 1.64951

Mark Needham
 
Sep 23, 2019  Jun 17, 2020
Mobi
Page 832
Importing the Data into Neo4j, "Now for Neo4j."

Kindle location 832, don't know the page number.

Within the code, second to last line it states:
place.longitude = toFloat(row.latitude)

It should be:
place.longitude = toFloat(row.longitude)

This error also exists within the associated code file located in the GitHub repository:
/path_finding/import.cypher

Note from the Author or Editor:
This has been corrected in Atlas in this file: https://atlas.oreilly.com/oreillymedia/graph-algorithms/editor/master/scripts/path_finding/import.cypher

We assume that this will get updated in the GitHub repo?

Joe Comeau  Oct 07, 2019  Jun 05, 2020