Graph Databases and Advanced Data Visualisation · 1. A Survey on Network Analysis and...

Post on 27-May-2020

12 views 0 download

transcript

Graph Databases and Advanced Data Visualisation

1. A Survey on Network Analysis and Visualisation Tools

2. Graph Databases

3. Querying a Graph Database

4. Practical Examples using Neo4J, Cypher, D3JS and VISJS

Outline

1. A Survey on Network Analysis and Visualisation Tools

2. Graph Databases

3. Querying a Graph Database

4. Practical Examples using Neo4J, Cypher, D3JS and VISJS

Outline

● Useful for analysing big networks

● A lot of functionalities accessibles through dropdown menus

● Free

● Only for Windows

Tools - Pajek

http://pajek.imfm.si/doku.php

- An Excel plugin for analysing networks

- Free

- Only for Windows

Tools - NodeXL

http://nodexl.codeplex.com

- Highly used in sociology studies

- Students $40; Governments: $150; Other: $200

- Only for Windows

Tools - UCINet

https://sites.google.com/site/ucinetsoftware/home

- Special for big networks

- A set of Python libraries

- Open Source

- Free

Tools - NetworkX

https://networkx.github.io

- Powerful statistical analysis tool

- A set of R libraries

- Open Source

- Free

Tools - R Network Packages

http://cran.r-project.org/web/packages/sna

- Social Network Animation Tool

- Specialised in longitudinal analysis

- Developed by Stanford

- Free

Tools - SoNIA

http://www.stanford.edu/group/sonia

- User oriented network analysis tool

- Interactive

- Multiplatform

- Free

Tools - Gephi

http://gephi.org

- A set of libraries for data visualisation

- JQuery + HTML5

- Open Source

- Free

Tools - D3js

http://d3js.org

- A set of libraries for data visualisation

- JQuery + HTML5

- Open Source

- Free

Tools - VISjs

http://visjs.org

- Graph visualisation with D3js (http://d3js.org)

- Graph visualisation with VISjs (http://visjs.org)

Tools - Practice

1. A Survey on Network Analysis and Visualisation Tools

2. Graph Databases

3. Querying a Graph Database

4. Practical Examples using Neo4J, Cypher, D3js and VISjs

Graph Databases

Graph Databases - Relational databases

lack relationships

Bob’s friends

Alice’s friends-of-friends

What about big data?

Graph Databases - NOSQL databases also

lack relationships

Relationships can be emulated by aggregated fields, but:

- They should be maintained (update and delete)

programmatically.

- Aggregated links are not reflexive: there is no point

backward (e.g. to know who bought a product).

A graph is a collection of vertices representing entities and

edges representing the relationships among them.

In a property graph both nodes and relationships can have

properties.

Graph data model means that data are modelled such a graph.

A (property) graph database is an online database management

system with Create, Read, Update and Delete methods that

expose a (property) graph data model.

Graph Databases - Definitions

Graph Databases - Property graph

Node with a property which value

is “Harry”

Relationship with a property which

value is “Follows”

Graph Databases - Magic Quadrant

● Neo4J local installation (http://neo4j.com/download)

Graph Databases - Practice

1. A Survey on Network Analysis and Visualisation Tools

2. Graph Databases

3. Querying a Graph Database

4. Practical Examples using Neo4J, Cypher, D3js and VISjs

Querying a Graph Database

Cypher is an expressive graph database query language.

Cypher is designed to be easily read and understood by

developers, database professionals and business stakeholders.

The key of Cypher is that enables to find data that matches a

specific pattern, following our intuition to describe graphs using

diagrams.

Querying a Graph Database - Cypher

Relation type

and direction

Querying a Graph Database - Cypher

Nodes

Separation among

subgraphs

The simplest query:

- a START clause followed by a MATCH and a RETURN clauses

Querying a Graph Database - Cypher

- START: specifies the starting point(s) in the graph (e.g.

nodes or relationships)

- MATCH: describes the specification by example, using

characters to represent nodes and relationships, in order to

draw the data we are interested in.

- RETURN: defines the nodes, relationships and/or attributes

that should be returned.

Querying a Graph Database - Cypher

OTHER CYPHER CLAUSES

- WHERE: provides criteria for filtering.

- CREATE (UNIQUE): for the creation of nodes and relationships.

- DELETE: removes nodes, relationships and properties.

- SET: sets property values to nodes and relations.

- FOREACH: allows to perform an updating action for a list of

elements.

- UNION: merges results from different queries.

- WITH: allows to pipe results from one query to the next.

Querying a Graph Database - Cypher