-
Notifications
You must be signed in to change notification settings - Fork 0
Lesson 4 Complex social network analysis
Christopher Rost edited this page Sep 4, 2020
·
8 revisions
Have a look at the Wiki pages of Gradoop for further details.
All labels start with a lowercase letter in our dataset, so please use 'person' instead of 'Person' in your tasks.
- Create a graph that show how many males and females are studying at the universities contained in the test data
Solution
graph = graph.vertexInducedSubgraph(new LabelIsIn<>(
"person", "university"));
graph = graph
.query(
"MATCH (p1:person)-[:studyAt]->(u:university)")
.reduce(new ReduceCombination<>());
// group on vertex and edge labels + count grouped edges
LogicalGraph groupedGraph = graph.callForGraph(
new Grouping.GroupingBuilder()
.setStrategy(GroupingStrategy.GROUP_COMBINE)
.addVertexGroupingKey("gender")
.addVertexGroupingKey("name")
.useEdgeLabel(true).useVertexLabel(true)
.addEdgeAggregateFunction(new Count())
.build());
How many persons know him? Answer: 2
- Play around with the operators Gradoop offers to learn more about the possibilities of distributed graph analytics.
- Execute different Operators and Algorithms on Logical Graphs or Graph Collections.
- Take a look at our publications about Gradoop