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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
PDF Page 44
Importing the Data into Neo4j

WITH "https://github.com/neo4j-graph-analytics/book/raw/master/data"
WITH base + "transport-nodes.csv" AS url
LOAD CSV WITH HEADERS FROM url AS row
MERGE (place:Place {id:row.id})
SET place.latitude = toFloat(row.latitude),
place.longitude = toFloat(row.latitude),
place.population = toInteger(row.population)

place.longitude = toFloat(row.latitude) should be place.longitude = toFloat(row.longitude)

Jose  Aug 03, 2022 
PDF Page 44
Importing the Data into Neo4j

WITH "https://github.com/neo4j-graph-analytics/book/raw/master/data"
WITH base + "transport-nodes.csv" AS url
LOAD CSV WITH HEADERS FROM url AS row
MERGE (place:Place {id:row.id})
SET place.latitude = toFloat(row.latitude),
place.longitude = toFloat(row.latitude),
place.population = toInteger(row.population)

place.longitude = toFloat(row.latitude) should be place.longitude = toFloat(row.longitude)

and

WITH base + "transport-nodes.csv" AS url should be
WITH base + "/transport-nodes.csv" AS url

Jose Luis Rodriguez Ales  Aug 03, 2022 
PDF Page 87
Code

At Closeness Spark code following line is cut
paths_type = ArrayType(
StructType([StructField("id", StringType()), StructField("distance",

Meanwhile at github code* is:
paths_type = ArrayType(StructType([
StructField("id", StringType()),
StructField("distance", IntegerType())
]))

* https://github.com/neo4j-graph-analytics/book/blob/master/scripts/centrality/closeness/cc.py

Jose Luis Rodriguez Ales  Aug 04, 2022 
PDF Page 93
Figure 5-7

On page 93 Pivotal nodes are introduced. "if you remove a pivotal node, the new shortest path for the original node pairs will be longer and more costly". However, in Figure 5-7, the third graph marks as pivotal a node that can be removed without increasing the length of the shortest path for A-B.

Marta Dávila Mateu  Apr 16, 2022 
PDF Page 97
Figure 5-7

Figure 5-7 presents a small graph and highlights in blue the pivotal nodes between two nodes A and B. The page indicates that a node is considered pivotal if it lies on *every* shortest path between two nodes, but in each case there is an alternate route with the minimum number of intermediate nodes (3) through the upper node connected to B. Therefore, the rightmost blue node ought to be grey in each of the three graphs.

Will Duke  Jan 13, 2022