Graph Algorithms Sandbox (Degree Centrality)

My data science team was playing in the Algorithms sandbox and noticed that the "Degree Centrality" is currently missing. Can someone take a look? It could be we're just missing it somehow.


1 Like

I tried out this sandbox as well and get errors and generally no data when running the queries in the tutorial.

The tutorial examples don't work, but there is some data loaded for example MATCH (n) RETURN n LIMIT 25 shows me some nodes.

1 Like

This is a known issue, the degree centrality algorithm was added in graph algos version, and the sandbox is currently using graph algos version 3.5.3 so it doesn't have it.

You may need to try out Neo4j Desktop, spin up your own graph and install the graph algos plugin (should be a one-click install from the plugins tab for the db instance, should grab the latest version).

1 Like

I appreciate the info, I'll try it out locally. Is there a way to get the same dataset into my local db?

Also, maybe put a note in the html guide for that so other people don't have to search for answers.

1 Like

Let me ask some of the developer relations folks, we'll see if we can fix this up a bit.

1 Like

@preston.hendrickson and @james-cullison

Apologies for the bug.

This has now been resolved:

  • Load script has been updated for the Algorithms library
  • Algorithms library has been updated sandbox-wide

If you want the load script for local execution, you can use the Cypher below. Note that it requires multiple statements to be turned on in Browser config if using Browser.

UNWIND range(1,7) AS season
LOAD CSV WITH HEADERS FROM "" + season + "-nodes.csv" AS row
MERGE (c:Character {id: row.Id})
ON CREATE SET = row.Label;

UNWIND range(1,7) AS season
LOAD CSV WITH HEADERS FROM "" + season + "-edges.csv" AS row
MATCH (source:Character {id: row.Source})
MATCH (target:Character {id: row.Target})
CALL apoc.merge.relationship(source, "INTERACTS_SEASON" + season, {}, {}, target) YIELD rel
SET rel.weight = toInteger(row.Weight);

For the Sandboxes -- if you have the Algorithms sandbox currently running, you'll need to go to the Sandbox homepage and select 'Advanced' and 'Shutdown' and then start up the Graph Algorithms sandbox again.


PS, thanks much for @preston.hendrickson @james-cullison and @andrew.bowman for bringing this to our attention!

Thank you for fixing that :smile: