-
-
Save peterneubauer/7676795 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Influence within the same Philosophic school type | |
== The setup | |
[source,cypher] | |
---- | |
CREATE | |
( plato:Philosopher {name:'Plato', uri: 'http://dbpedia.org/resource/Plato' }) | |
, ( aristotle:Philosopher { name: 'Aristotle' , uri: 'http://dbpedia.org/resource/Aristotle' }) | |
, ( platonism_school:School { name: 'Platonism', uri: 'http://dbpedia.org/resource/Platonism' }) | |
, ( peripatetic_school:School { name: 'Peripatetic school', uri: 'http://dbpedia.org/resource/Peripatetic_school' }) | |
, ( philo_tradition:SchoolType { name: 'Philosophical traditions', uri: 'http://dbpedia.org/class/yago/PhilosophicalTraditions' }) | |
, ( philo_movement:SchoolType { name: 'Philosophical movements', uri: 'http://dbpedia.org/class/yago/PhilosophicalMovements' }) | |
, ( philo_ancient_school:SchoolType { name: 'Ancient philosophical schools and traditions', uri: 'http://dbpedia.org/class/yago/AncientPhilosophicalSchoolsAndTraditions' }) | |
, plato-[:INFLUENCES]->aristotle | |
, plato-[:MEMBER_OF]->platonism_school | |
, aristotle-[:MEMBER_OF]->peripatetic_school | |
, platonism_school-[:TYPE_OF]->philo_tradition | |
, platonism_school-[:TYPE_OF]->philo_movement | |
, peripatetic_school-[:TYPE_OF]->philo_movement | |
, peripatetic_school-[:TYPE_OF]->philo_ancient_school | |
---- | |
//graph | |
query for influential philosophers from the same school type | |
[source,cypher] | |
---- | |
MATCH (st2:SchoolType)<-[:TYPE_OF]-(s2:School)<-[:MEMBER_OF]-(p2:Philosopher)<-[:INFLUENCES]-(p1:Philosopher)-[:MEMBER_OF]->(s1:School)-[:TYPE_OF]->(st1:SchoolType) | |
WHERE st2 = st1 // node equality | |
RETURN p1.name as p1Name, s1.name as s1Name, st1.name as st1Name, p2.name as p2Name, s2.name as s2Name, st2.name as st2Name | |
---- | |
//table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment