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.

Thanks,
Preston

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 3.5.3.2, 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.

CREATE CONSTRAINT ON (c:Character) ASSERT c.id IS UNIQUE;
UNWIND range(1,7) AS season
LOAD CSV WITH HEADERS FROM "https://github.com/neo4j-apps/neuler/raw/master/sample-data/got/got-s" + season + "-nodes.csv" AS row
MERGE (c:Character {id: row.Id})
ON CREATE SET c.name = row.Label;

UNWIND range(1,7) AS season
LOAD CSV WITH HEADERS FROM "https://github.com/neo4j-apps/neuler/raw/master/sample-data/got/got-s" + 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.

Cheers,
-Ryan

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

Thank you for fixing that :smile: