Leveraging Graph Algorithms In Visualizations With Neovis.js - - PowerPoint PPT Presentation

leveraging graph algorithms in visualizations with neovis
SMART_READER_LITE
LIVE PREVIEW

Leveraging Graph Algorithms In Visualizations With Neovis.js - - PowerPoint PPT Presentation

Leveraging Graph Algorithms In Visualizations With Neovis.js William Lyon @lyonwj lyonwj.com bit.ly/neovisalgos William Lyon @lyonwj Neo4j Labs Engineer Graph Visualization + Graph Algorithms Graph Visualization + Graph Algorithms


slide-1
SLIDE 1

Leveraging Graph Algorithms In Visualizations With Neovis.js

William Lyon @lyonwj lyonwj.com bit.ly/neovisalgos

slide-2
SLIDE 2

William Lyon

@lyonwj

Neo4j Labs Engineer

slide-3
SLIDE 3

Graph Visualization + Graph Algorithms

slide-4
SLIDE 4

Graph Visualization + Graph Algorithms

Node size relative to centrality (PageRank) Nodes colored by community (Label Propagation)

Relationship thickness relative to relationship property (# of interactions)

slide-5
SLIDE 5

Graph & ML Algorithms in Neo4j

+40

neo4j.com/

graph-algorithms- book/

Pathfinding & Search Centrality / Importance Community Detection Link Prediction

Finds optimal paths

  • r evaluates route

availability and quality Determines the importance of distinct nodes in the network Detects group clustering or partition

  • ptions

Evaluates how alike nodes are Estimates the likelihood

  • f nodes forming a

future relationship

Similarity

slide-6
SLIDE 6

Graph and ML Algorithms in Neo4j

  • Parallel Breadth First Search &

DFS

  • Shortest Path
  • Single-Source Shortest Path
  • All Pairs Shortest Path
  • Minimum Spanning Tree
  • A* Shortest Path
  • Yen’s K Shortest Path
  • K-Spanning Tree (MST)
  • Random Walk
  • Degree Centrality
  • Closeness Centrality
  • CC Variations: Harmonic, Dangalchev,

Wasserman & Faust

  • Betweenness Centrality
  • Approximate Betweenness Centrality
  • PageRank
  • Personalized PageRank
  • ArticleRank
  • Eigenvector Centrality
  • Triangle Count
  • Clustering Coefficients
  • Connected Components (Union Find)
  • Strongly Connected Components
  • Label Propagation
  • Louvain Modularity – 1 Step &

Multi-Step

  • Balanced Triad (identification)
  • Euclidean Distance
  • Cosine Similarity
  • Jaccard Similarity
  • Overlap Similarity
  • Pearson Similarity

Pathfinding & Search Centrality / Importance Community Detection Similarity

neo4j.com/docs/

graph-algorithms/current/

Updated April 2019

Link Prediction

  • Adamic Adar
  • Common Neighbors
  • Preferential Attachment
  • Resource Allocations
  • Same Community
  • Total Neighbors
slide-7
SLIDE 7
  • 1. Call as Cypher procedure
  • 2. Pass in specification (Label, Prop, Query) and

configuration

  • 3. stream variant returns (a lot) of results

CALL algo.<name>.stream('Label','TYPE',{conf}) YIELD nodeId, score

  • 4. non-stream variant writes results to graph returns

statistics CALL algo.<name>('Label','TYPE',{conf})

How To…

Pathfinding & Search Centrality / Importance Community Detection Link Prediction Similarity

slide-8
SLIDE 8

Pass in Cypher statement for node- and relationship-lists. CALL algo.<name>( 'MATCH ... RETURN id(n)', 'MATCH (n)-->(m) RETURN id(n) as source, id(m) as target', {graph:'cypher'})

Cypher Projection

slide-9
SLIDE 9

Cypher Projection Example

Russian Twitter Trolls

https://www.nbcnews.com/tech/social-media/russian-trolls-went-attack-during-key-election-moments-n827176

slide-10
SLIDE 10

Inferred Relationships

AMPLIFIED

slide-11
SLIDE 11

CALL algo.pageRank("MATCH (r1:Troll)-[:POSTED]->(:Tweet)<-[:RETWEETED]-(:Tweet)<-[:POSTED]-(r2:Troll) RETURN id(r2) as source, id(r1) as target", {graph:'cypher'})

PageRank on Inferred AMPLIFIED Graph

slide-12
SLIDE 12

neo4jsandbox.com

slide-13
SLIDE 13

neovis.js

https://www.npmjs.com/package/neovis.js

npm install neovis.js

slide-14
SLIDE 14

Initial visualization

slide-15
SLIDE 15

Initial visualization

slide-16
SLIDE 16

Initial visualization

slide-17
SLIDE 17

Initial visualization

slide-18
SLIDE 18

Initial visualization

slide-19
SLIDE 19

Initial visualization

slide-20
SLIDE 20

Adding relationship thickness

slide-21
SLIDE 21

Adding centrality and community detection

slide-22
SLIDE 22

NEuler: Graph Algorithms Playground

Run Graph Algorithms with no code in Neo4j Desktop! Embeds Neovis.js for visualizing algorithm results

https://medium.com/neo4j/introducing-neuler-the-graph-algorithms-playground-d81042cfcd56

install.graphapp.io

slide-23
SLIDE 23

neovis.js

https://www.npmjs.com/package/neovis.js

npm install neovis.js

slide-24
SLIDE 24

Hunger Games Questions for

"Leveraging Graph Algorithms In Visualizations With Neovis.js"

1. True or False: results of Graph Algorithms can be used in graph visualizations?

a. True b. False

2. What is the command to install neovis.js?

a. sudo apt-get install williviz b. npm install neovis.js c. wget http://grandstack.io/docs

3. Which of the following algorithms is used to find communities in a graph?

a. PageRank b. Label Propagation c. Eigenvector Centrality

Answer here: r.neo4j.com/hunger-games