SlideShare uma empresa Scribd logo
1 de 25
GRAPHGENLe générateur de graphes
#Neo4j Meetup Lyon
18-12-2014
graphgen.neoxygen.io
#whoami
Christophe Willemsen
Senior Consultant
Expert Neo4j
@graph_aware
graphaware.com
POURQUOI GRAPHGEN ?
RETOUR RAPIDE SUR LES FONCTIONS
NATIVES A NEO4J POUR CRÉER
SON GRAPHE
A LA MAIN
CREATE (n:Personne {prenom: ‘Roger’, nom:’Laguadec’})
A ECRIRE
100XPour avoir 100 noeuds
AVEC UNE BOUCLE
FOREACH ( i in range(0,99) | CREATE (n:Personne {id:i} ) )
LOAD CSV
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM FILE
‘file:///Users/me/docs/import.csv’ AS csv
MERGE (n:Personne {prenom: csv.prenom} )
ET AVEC GRAPHGEN ALORS ?
(p:Personne {prenom: firstName, nom: lastName} *100)
(p)-[:CONNAIS *n..n]->(p)
DEMO 1
SYNTAXE DES NOEUDS
BASEE SUR LE LANGAGE CYPHER !
(p:Personne {prenom: firstName} *100 )
identifiant
label
propriété du noeud
faker type
quantité
SYNTAXE DES RELATIONS
BASEE SUR LE LANGAGE CYPHER !
-[:CONNAIS {depuis: unixTime} *n..n ]->
type
propriété de la relation
faker type
cardinalité
PARAMETRES DE PROPRIETES
Exemple: Je veux 100 personnes avec une date de naissance,
mais ces personnes doivent être majeures et pas encore à l’âge
De la retraite.
(p:Personne {nom: fullName, ddn: { dateTimeBetween: [‘’-65 years’’, ‘’-18 years’’]}} *100)
YAML inline
!!!
Les faker types
• word
• sentence
• dateTime
• dateTimeBetween
• text
• unixTime
• randomDigit
• numberBetween
• company
• firstName, lastName
• country
• city
• address
• latitude, longitude
• url
• username
• password
• creditCardNumber
• ip
• userAgent
• uuid
• ean13
• fileExtension
• hashTag
• …… et plein d’autres
DEMO 2
GRAPHGEN ENCORE PLUS FORT !
NŒUDS TYPES
ECRIRE CA :
(user:User:Person {
_id: uuid,
login: userName,
password: password,
email: email,
prenom: firstName,
nom: lastName,
ddn: { dateTimeBetween: [‘’-50 years’’, ‘’-18 years’’]}} *100)
C’EST LOOOOOOOOOOONG !
NŒUDS TYPES
COMME CA C’EST COOL :
(user:#User:#Person *100)
# = Activation du nœud type
NŒUDS TYPES
• #Person
• #User
• #Tweet
• #File
• #HashTag
• #BlogPost
• #Company
• … et plein d’autres à venir
TRUCS & ASTUCES
ASTUCE 1
Utiliser une propriété avec valeur fixe que je définis pour tous les nœuds Personne
SOLUTION: randomElement avec 1 seul élément
(p:Personne:Administrateur {groupe: {randomElement:[‘’ADMIN’’]}} *20)
ASTUCE 2
Suggestions (groupes de personnes qui ne peuvent pas se connaître)
SOLUTION: Créer deux groupes de nœuds distincts avec le même label
(p:#Person *20)-[:A_TRAVAILLE_POUR *n..1]->(c:#Company *10)
(autres:#Person *20)-[:A_TRAVAILLE_POUR *n..1]->(c)
GRAPHGEN LES POINTS FORTS
• BASE SUR LA SPEC CYPHER (PAS DE NOUVELLE SYNTAXE A APPRENDRE)
• DESTINE A TOUT LE MONDE
• GENERATION DE VALEURS
• VISUALISATION IMMEDIATE DE VOTRE GRAPHE
• IMPORTATION DU GRAPHE DANS VOTRE BASE
• EXPORT
MOINS FORTS
GRAPHGEN LES POINTS FAIBLES
• LE PROJET EST ENCORE JEUNE (10 OCTOBRE)
• S’ADAPTE A +- 75% DE COMPLEXITE
• QUELQUES FONCTIONS CLES AVANT UNE STABLE RELEASE
• LIMITE A 1000 NŒUDS POUR LA VISUALISATION
Faut pas exagérer
non plus !
A VENIR DANS GRAPHGEN
• User Dashboard pour sauver vos graphes
• Définir vos propres nœuds types
• Définir les pourcentages des relations x..n
• Génération GraphGist en 1 clic
• Public API
• Export vers d’autres formats
QUESTIONS ?
MERCI 
Graphgen : http://graphgen.neoxygen.io
Composants PHP pour Neo4j : https://github.com/neoxygen
Follow me : @ikwattro

Mais conteúdo relacionado

Semelhante a Graphgen - le générateur de graphes

Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab ElasticsearchDavid Pilato
 
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops)
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops) Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops)
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops) Joël Séguillon
 
Elasticsearch - Esme sudria
Elasticsearch - Esme sudriaElasticsearch - Esme sudria
Elasticsearch - Esme sudriaDavid Pilato
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanMicrosoft
 
Introduction au langage Ruby
Introduction au langage RubyIntroduction au langage Ruby
Introduction au langage RubyJulien Blin
 
La puissance des pseudo-éléments
La puissance des pseudo-élémentsLa puissance des pseudo-éléments
La puissance des pseudo-élémentsGeoffrey Croftє
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Partie1 TypeScript
Partie1 TypeScriptPartie1 TypeScript
Partie1 TypeScriptHabib Ayad
 
The Hour of Code by Leanbase
The Hour of Code by LeanbaseThe Hour of Code by Leanbase
The Hour of Code by Leanbasemaxlacro
 
vue j'avais pas vu !!
vue j'avais pas vu !!vue j'avais pas vu !!
vue j'avais pas vu !!Manuel Adele
 
Vue, j’avais pas vu !
Vue, j’avais pas vu !Vue, j’avais pas vu !
Vue, j’avais pas vu !Bruno Bonnin
 
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et JavascriptCodedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascriptcodedarmor
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2Horacio Gonzalez
 
Lyon JUG - Elasticsearch
Lyon JUG - ElasticsearchLyon JUG - Elasticsearch
Lyon JUG - ElasticsearchDavid Pilato
 

Semelhante a Graphgen - le générateur de graphes (20)

Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab Elasticsearch
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Ruby Pour RoR
Ruby Pour RoRRuby Pour RoR
Ruby Pour RoR
 
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops)
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops) Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops)
Terraform OpenStack : Mise en pratique sur infrastructure OVH (Rennes devops)
 
Elasticsearch - Esme sudria
Elasticsearch - Esme sudriaElasticsearch - Esme sudria
Elasticsearch - Esme sudria
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet Spartan
 
Introduction au langage Ruby
Introduction au langage RubyIntroduction au langage Ruby
Introduction au langage Ruby
 
La puissance des pseudo-éléments
La puissance des pseudo-élémentsLa puissance des pseudo-éléments
La puissance des pseudo-éléments
 
Introduction à node.js
Introduction à node.js Introduction à node.js
Introduction à node.js
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Partie1 TypeScript
Partie1 TypeScriptPartie1 TypeScript
Partie1 TypeScript
 
The Hour of Code by Leanbase
The Hour of Code by LeanbaseThe Hour of Code by Leanbase
The Hour of Code by Leanbase
 
Jade dimax
Jade dimaxJade dimax
Jade dimax
 
vue j'avais pas vu !!
vue j'avais pas vu !!vue j'avais pas vu !!
vue j'avais pas vu !!
 
Vue, j’avais pas vu !
Vue, j’avais pas vu !Vue, j’avais pas vu !
Vue, j’avais pas vu !
 
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et JavascriptCodedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
 
Presentation
PresentationPresentation
Presentation
 
Lyon JUG - Elasticsearch
Lyon JUG - ElasticsearchLyon JUG - Elasticsearch
Lyon JUG - Elasticsearch
 

Mais de Christophe Willemsen

Knowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4jKnowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4jChristophe Willemsen
 
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Christophe Willemsen
 
Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16Christophe Willemsen
 
Recommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHPRecommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHPChristophe Willemsen
 
Moteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareRecoMoteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareRecoChristophe Willemsen
 
Recommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation EngineRecommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation EngineChristophe Willemsen
 
Neo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected ThingsNeo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected ThingsChristophe Willemsen
 
Graph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with GraphgenGraph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with GraphgenChristophe Willemsen
 
Analysing Github events with Neo4j
Analysing Github events with Neo4jAnalysing Github events with Neo4j
Analysing Github events with Neo4jChristophe Willemsen
 

Mais de Christophe Willemsen (11)

Knowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4jKnowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4j
 
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
 
Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16
 
Recommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHPRecommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHP
 
Moteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareRecoMoteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareReco
 
Recommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation EngineRecommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation Engine
 
Neo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected ThingsNeo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected Things
 
Graph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with GraphgenGraph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with Graphgen
 
Analysing Github events with Neo4j
Analysing Github events with Neo4jAnalysing Github events with Neo4j
Analysing Github events with Neo4j
 
Présentation symfony drupal
Présentation symfony drupalPrésentation symfony drupal
Présentation symfony drupal
 
GMDSS - Practice1
GMDSS - Practice1GMDSS - Practice1
GMDSS - Practice1
 

Graphgen - le générateur de graphes

  • 1. GRAPHGENLe générateur de graphes #Neo4j Meetup Lyon 18-12-2014 graphgen.neoxygen.io
  • 2. #whoami Christophe Willemsen Senior Consultant Expert Neo4j @graph_aware graphaware.com
  • 3. POURQUOI GRAPHGEN ? RETOUR RAPIDE SUR LES FONCTIONS NATIVES A NEO4J POUR CRÉER SON GRAPHE
  • 4. A LA MAIN CREATE (n:Personne {prenom: ‘Roger’, nom:’Laguadec’}) A ECRIRE 100XPour avoir 100 noeuds
  • 5. AVEC UNE BOUCLE FOREACH ( i in range(0,99) | CREATE (n:Personne {id:i} ) )
  • 6. LOAD CSV USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM FILE ‘file:///Users/me/docs/import.csv’ AS csv MERGE (n:Personne {prenom: csv.prenom} )
  • 7. ET AVEC GRAPHGEN ALORS ? (p:Personne {prenom: firstName, nom: lastName} *100) (p)-[:CONNAIS *n..n]->(p)
  • 9. SYNTAXE DES NOEUDS BASEE SUR LE LANGAGE CYPHER ! (p:Personne {prenom: firstName} *100 ) identifiant label propriété du noeud faker type quantité
  • 10. SYNTAXE DES RELATIONS BASEE SUR LE LANGAGE CYPHER ! -[:CONNAIS {depuis: unixTime} *n..n ]-> type propriété de la relation faker type cardinalité
  • 11. PARAMETRES DE PROPRIETES Exemple: Je veux 100 personnes avec une date de naissance, mais ces personnes doivent être majeures et pas encore à l’âge De la retraite. (p:Personne {nom: fullName, ddn: { dateTimeBetween: [‘’-65 years’’, ‘’-18 years’’]}} *100) YAML inline !!!
  • 12. Les faker types • word • sentence • dateTime • dateTimeBetween • text • unixTime • randomDigit • numberBetween • company • firstName, lastName • country • city • address • latitude, longitude • url • username • password • creditCardNumber • ip • userAgent • uuid • ean13 • fileExtension • hashTag • …… et plein d’autres
  • 15. NŒUDS TYPES ECRIRE CA : (user:User:Person { _id: uuid, login: userName, password: password, email: email, prenom: firstName, nom: lastName, ddn: { dateTimeBetween: [‘’-50 years’’, ‘’-18 years’’]}} *100) C’EST LOOOOOOOOOOONG !
  • 16. NŒUDS TYPES COMME CA C’EST COOL : (user:#User:#Person *100) # = Activation du nœud type
  • 17. NŒUDS TYPES • #Person • #User • #Tweet • #File • #HashTag • #BlogPost • #Company • … et plein d’autres à venir
  • 19. ASTUCE 1 Utiliser une propriété avec valeur fixe que je définis pour tous les nœuds Personne SOLUTION: randomElement avec 1 seul élément (p:Personne:Administrateur {groupe: {randomElement:[‘’ADMIN’’]}} *20)
  • 20. ASTUCE 2 Suggestions (groupes de personnes qui ne peuvent pas se connaître) SOLUTION: Créer deux groupes de nœuds distincts avec le même label (p:#Person *20)-[:A_TRAVAILLE_POUR *n..1]->(c:#Company *10) (autres:#Person *20)-[:A_TRAVAILLE_POUR *n..1]->(c)
  • 21. GRAPHGEN LES POINTS FORTS • BASE SUR LA SPEC CYPHER (PAS DE NOUVELLE SYNTAXE A APPRENDRE) • DESTINE A TOUT LE MONDE • GENERATION DE VALEURS • VISUALISATION IMMEDIATE DE VOTRE GRAPHE • IMPORTATION DU GRAPHE DANS VOTRE BASE • EXPORT
  • 22. MOINS FORTS GRAPHGEN LES POINTS FAIBLES • LE PROJET EST ENCORE JEUNE (10 OCTOBRE) • S’ADAPTE A +- 75% DE COMPLEXITE • QUELQUES FONCTIONS CLES AVANT UNE STABLE RELEASE • LIMITE A 1000 NŒUDS POUR LA VISUALISATION Faut pas exagérer non plus !
  • 23. A VENIR DANS GRAPHGEN • User Dashboard pour sauver vos graphes • Définir vos propres nœuds types • Définir les pourcentages des relations x..n • Génération GraphGist en 1 clic • Public API • Export vers d’autres formats
  • 25. MERCI  Graphgen : http://graphgen.neoxygen.io Composants PHP pour Neo4j : https://github.com/neoxygen Follow me : @ikwattro