InstaGraph
Social graph network of your Instagram account.
By Ahmadreza Zibaei (https://zibaei.net)
Special thanks to Prof. Babak Nasiri
Social Network Analysis
is the process of investigating social structures through the use of networks and graph theory.
It characterizes networked structures in terms of nodes (individual actors, people, or things within the network) and the ties, edges, or links (relationships or interactions) that connect them.
Instagram Network Structure
How to create and draw graph of users ?
Instagram Network Structure
How to create and draw graph of users ?
- Every person can follow another person
- You follow someone, someone follows you!
How to get this kind of data from Instagram ?
An introduction to crawlers.
Let's create graph network !
Using sigma.js
!
A storage system for big networks
What is Graph Database ?
- Graph database is a database that uses graph structures for semantic queries with nodes, edges and properties to represent and store data.
- Graph databases are part of the NoSQL databases created to address the limitations of the existing relational databases.
- A key concept of the system is the graph (or edge or relationship), which directly relates data items in the store a collection of nodes of data and edges representing the relationships between the nodes.
- Graph databases hold the relationships between data as a priority.
- Querying relationships within a graph database is fast because they are perpetually stored within the database itself.
An introduction to NEO4J database
List of queries
CREATE (a:Person {name: 'Ahmadreza'}) RETURN a
MERGE (a:Person {name: 'Alireza'}) RETURN a
START n=node(*) RETURN n;
MATCH (n) DETACH DELETE n
MATCH (a:Person {name: 'Ahmadreza'}) DETACH DELETE a;
MATCH (a:Person {name: 'Ahmadreza'}), (b:Person (name: 'Alireza')) CREATE (a)-[:KNOWS]->(b)
MATCH (a:Person {name: 'Ahmadreza'})-[f:FOLLOW]-(b:Person {name: 'Alireza'}) DELETE f;
An introduction to NEO4J database
Simple data-mining queries:
MATCH (a:Person {name: "Ahmadreza"}), (b:Person {name: "Alireza"}) MATCH path = allShortestPaths((a)-[*..4]-(b)) RETURN path
MATCH (a:Person {name: 'aidenzibaei'})--(other) RETURN count(other);
MATCH (a:Person)-[:FOLLOW]->(b:Person) WITH a, b WHERE b.name = 'aidenzibaei' RETURN a, b
MATCH (a:Person)-[:FOLLOW]->(b:Person) WITH a, collect(b) as collection, count(b) as c WHERE c > 1 RETURN a, collection
An introduction to NEO4J database
Simple data-mining queries:
MATCH (a:Person {name: "Ahmadreza"}), (b:Person {name: "Alireza"}) MATCH path = allShortestPaths((a)-[*..4]-(b)) RETURN path
MATCH (a:Person {name: 'aidenzibaei'})--(other) RETURN count(other);
MATCH (a:Person)-[:FOLLOW]->(b:Person) WITH a, b WHERE b.name = 'aidenzibaei' RETURN a, b
MATCH (a:Person)-[:FOLLOW]->(b:Person) WITH a, collect(b) as collection, count(b) as c WHERE c > 1 RETURN a, collection