Example graphs

How to use the example graphs built into ArangoDB

ArangoDB comes with a set of easy-to-understand graphs for demonstration purposes.

  • In the web interface, navigate to the Graphs section, click Add Graph, go to the Examples tab, and click the Create button of one of the listed graphs.

  • In arangosh, run require("@arangodb/graph-examples/example-graph").loadGraph("<name>"); with <name> substituted by the name of an example graph listed below.

You can visually explore the created graphs in the Graph viewer of the web interface.

You can take a look at the script that creates the example graphs on GitHub  for reference about how to manage graphs programmatically.

Knows Graph

The knows graph is a set of persons knowing each other:

Persons relation Example Graph

The graph consists of a persons node collection connected via a knows edge collection. There are five persons, Alice, Bob, Charlie, Dave, and Eve. They have the following directed relations:

  • Alice knows Bob
  • Bob knows Charlie
  • Bob knows Dave
  • Eve knows Alice
  • Eve knows Bob

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("knows_graph");
db.persons.toArray()
db.knows.toArray();
examples.dropGraph("knows_graph");
Show output
[ 
  { 
    "_key" : "alice", 
    "_id" : "persons/alice", 
    "_rev" : "_kgUuTa6---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "bob", 
    "_id" : "persons/bob", 
    "_rev" : "_kgUuTa6--_", 
    "name" : "Bob" 
  }, 
  { 
    "_key" : "charlie", 
    "_id" : "persons/charlie", 
    "_rev" : "_kgUuTa6--A", 
    "name" : "Charlie" 
  }, 
  { 
    "_key" : "dave", 
    "_id" : "persons/dave", 
    "_rev" : "_kgUuTa6--B", 
    "name" : "Dave" 
  }, 
  { 
    "_key" : "eve", 
    "_id" : "persons/eve", 
    "_rev" : "_kgUuTb----", 
    "name" : "Eve" 
  } 
]

[ 
  { 
    "_key" : "76792", 
    "_id" : "knows/76792", 
    "_from" : "persons/alice", 
    "_to" : "persons/bob", 
    "_rev" : "_kgUuTb---_", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "76794", 
    "_id" : "knows/76794", 
    "_from" : "persons/bob", 
    "_to" : "persons/charlie", 
    "_rev" : "_kgUuTb---A", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "76796", 
    "_id" : "knows/76796", 
    "_from" : "persons/bob", 
    "_to" : "persons/dave", 
    "_rev" : "_kgUuTb---B", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "76798", 
    "_id" : "knows/76798", 
    "_from" : "persons/eve", 
    "_to" : "persons/alice", 
    "_rev" : "_kgUuTbC---", 
    "vertex" : "eve" 
  }, 
  { 
    "_key" : "76800", 
    "_id" : "knows/76800", 
    "_from" : "persons/eve", 
    "_to" : "persons/bob", 
    "_rev" : "_kgUuTbC--_", 
    "vertex" : "eve" 
  } 
]

Note: With the default traversal depth of 2 of the graph viewer, you may not see all edges of this graph by default.

Traversal Graph

The traversalGraph has been designed to demonstrate filters in traversals. It has some labels to filter on it. The graph’s nodes are in a collection called circles, and it has an edge collection edges to connect them.

Traversal Graph

Circles have unique numeric labels. Edges have two boolean attributes (theFalse always being false, theTruth always being true) and a label sorting B - D to the left side, G - K to the right side. Left and right side split into paths - at B and G, which are each direct neighbors of the root-node A. Starting from A, the graph has a depth of 3 on all its paths.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("traversalGraph");
db.circles.toArray();
db.edges.toArray();
examples.dropGraph("traversalGraph");
Show output
[ 
  { 
    "_key" : "A", 
    "_id" : "circles/A", 
    "_rev" : "_kgUuTcW---", 
    "label" : "1" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "circles/B", 
    "_rev" : "_kgUuTca---", 
    "label" : "2" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "circles/C", 
    "_rev" : "_kgUuTca--_", 
    "label" : "3" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "circles/D", 
    "_rev" : "_kgUuTca--A", 
    "label" : "4" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "circles/E", 
    "_rev" : "_kgUuTca--B", 
    "label" : "5" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "circles/F", 
    "_rev" : "_kgUuTce---", 
    "label" : "6" 
  }, 
  { 
    "_key" : "G", 
    "_id" : "circles/G", 
    "_rev" : "_kgUuTce--_", 
    "label" : "7" 
  }, 
  { 
    "_key" : "H", 
    "_id" : "circles/H", 
    "_rev" : "_kgUuTce--A", 
    "label" : "8" 
  }, 
  { 
    "_key" : "I", 
    "_id" : "circles/I", 
    "_rev" : "_kgUuTce--B", 
    "label" : "9" 
  }, 
  { 
    "_key" : "J", 
    "_id" : "circles/J", 
    "_rev" : "_kgUuTce--C", 
    "label" : "10" 
  }, 
  { 
    "_key" : "K", 
    "_id" : "circles/K", 
    "_rev" : "_kgUuTci---", 
    "label" : "11" 
  } 
]

[ 
  { 
    "_key" : "76868", 
    "_id" : "edges/76868", 
    "_from" : "circles/A", 
    "_to" : "circles/B", 
    "_rev" : "_kgUuTci--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_bar" 
  }, 
  { 
    "_key" : "76870", 
    "_id" : "edges/76870", 
    "_from" : "circles/B", 
    "_to" : "circles/C", 
    "_rev" : "_kgUuTci--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blarg" 
  }, 
  { 
    "_key" : "76872", 
    "_id" : "edges/76872", 
    "_from" : "circles/C", 
    "_to" : "circles/D", 
    "_rev" : "_kgUuTci--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blorg" 
  }, 
  { 
    "_key" : "76874", 
    "_id" : "edges/76874", 
    "_from" : "circles/B", 
    "_to" : "circles/E", 
    "_rev" : "_kgUuTcm---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blub" 
  }, 
  { 
    "_key" : "76876", 
    "_id" : "edges/76876", 
    "_from" : "circles/E", 
    "_to" : "circles/F", 
    "_rev" : "_kgUuTcm--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_schubi" 
  }, 
  { 
    "_key" : "76878", 
    "_id" : "edges/76878", 
    "_from" : "circles/A", 
    "_to" : "circles/G", 
    "_rev" : "_kgUuTcm--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_foo" 
  }, 
  { 
    "_key" : "76880", 
    "_id" : "edges/76880", 
    "_from" : "circles/G", 
    "_to" : "circles/H", 
    "_rev" : "_kgUuTcm--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blob" 
  }, 
  { 
    "_key" : "76882", 
    "_id" : "edges/76882", 
    "_from" : "circles/H", 
    "_to" : "circles/I", 
    "_rev" : "_kgUuTcm--C", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blub" 
  }, 
  { 
    "_key" : "76884", 
    "_id" : "edges/76884", 
    "_from" : "circles/G", 
    "_to" : "circles/J", 
    "_rev" : "_kgUuTcq---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_zip" 
  }, 
  { 
    "_key" : "76886", 
    "_id" : "edges/76886", 
    "_from" : "circles/J", 
    "_to" : "circles/K", 
    "_rev" : "_kgUuTcq--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_zup" 
  } 
]

Note: With the default traversal depth of 2 of the graph viewer, you may not see all edges of this graph by default.

k Shortest Paths Graph

The nodes in the kShortestPathsGraph graph are train stations of cities in Europe and North America. The edges represent train connections between them, with the travel time for both directions as edge weight.

Train Connection Map

See the k Shortest Paths page for query examples.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("kShortestPathsGraph");
db.places.toArray();
db.connections.toArray();
examples.dropGraph("kShortestPathsGraph");
Show output
[ 
  { 
    "_key" : "Inverness", 
    "_id" : "places/Inverness", 
    "_rev" : "_kgUuTeS---", 
    "label" : "Inverness" 
  }, 
  { 
    "_key" : "Aberdeen", 
    "_id" : "places/Aberdeen", 
    "_rev" : "_kgUuTeS--_", 
    "label" : "Aberdeen" 
  }, 
  { 
    "_key" : "Leuchars", 
    "_id" : "places/Leuchars", 
    "_rev" : "_kgUuTeS--A", 
    "label" : "Leuchars" 
  }, 
  { 
    "_key" : "StAndrews", 
    "_id" : "places/StAndrews", 
    "_rev" : "_kgUuTeW---", 
    "label" : "StAndrews" 
  }, 
  { 
    "_key" : "Edinburgh", 
    "_id" : "places/Edinburgh", 
    "_rev" : "_kgUuTeW--_", 
    "label" : "Edinburgh" 
  }, 
  { 
    "_key" : "Glasgow", 
    "_id" : "places/Glasgow", 
    "_rev" : "_kgUuTeW--A", 
    "label" : "Glasgow" 
  }, 
  { 
    "_key" : "York", 
    "_id" : "places/York", 
    "_rev" : "_kgUuTeW--B", 
    "label" : "York" 
  }, 
  { 
    "_key" : "Carlisle", 
    "_id" : "places/Carlisle", 
    "_rev" : "_kgUuTeW--C", 
    "label" : "Carlisle" 
  }, 
  { 
    "_key" : "Birmingham", 
    "_id" : "places/Birmingham", 
    "_rev" : "_kgUuTeW--D", 
    "label" : "Birmingham" 
  }, 
  { 
    "_key" : "London", 
    "_id" : "places/London", 
    "_rev" : "_kgUuTea---", 
    "label" : "London" 
  }, 
  { 
    "_key" : "Brussels", 
    "_id" : "places/Brussels", 
    "_rev" : "_kgUuTea--_", 
    "label" : "Brussels" 
  }, 
  { 
    "_key" : "Cologne", 
    "_id" : "places/Cologne", 
    "_rev" : "_kgUuTea--A", 
    "label" : "Cologne" 
  }, 
  { 
    "_key" : "Toronto", 
    "_id" : "places/Toronto", 
    "_rev" : "_kgUuTea--B", 
    "label" : "Toronto" 
  }, 
  { 
    "_key" : "Winnipeg", 
    "_id" : "places/Winnipeg", 
    "_rev" : "_kgUuTea--C", 
    "label" : "Winnipeg" 
  }, 
  { 
    "_key" : "Saskatoon", 
    "_id" : "places/Saskatoon", 
    "_rev" : "_kgUuTee---", 
    "label" : "Saskatoon" 
  }, 
  { 
    "_key" : "Edmonton", 
    "_id" : "places/Edmonton", 
    "_rev" : "_kgUuTee--_", 
    "label" : "Edmonton" 
  }, 
  { 
    "_key" : "Jasper", 
    "_id" : "places/Jasper", 
    "_rev" : "_kgUuTee--A", 
    "label" : "Jasper" 
  }, 
  { 
    "_key" : "Vancouver", 
    "_id" : "places/Vancouver", 
    "_rev" : "_kgUuTee--B", 
    "label" : "Vancouver" 
  } 
]

[ 
  { 
    "_key" : "76961", 
    "_id" : "connections/76961", 
    "_from" : "places/Inverness", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_kgUuTeq---", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "76963", 
    "_id" : "connections/76963", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Inverness", 
    "_rev" : "_kgUuTeq--_", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "76965", 
    "_id" : "connections/76965", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Leuchars", 
    "_rev" : "_kgUuTeq--A", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "76967", 
    "_id" : "connections/76967", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_kgUuTeu---", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76969", 
    "_id" : "connections/76969", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_kgUuTeu--_", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "76971", 
    "_id" : "connections/76971", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Leuchars", 
    "_rev" : "_kgUuTeu--A", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "76973", 
    "_id" : "connections/76973", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Glasgow", 
    "_rev" : "_kgUuTeu--B", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76975", 
    "_id" : "connections/76975", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_kgUuTey---", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76977", 
    "_id" : "connections/76977", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/York", 
    "_rev" : "_kgUuTey--_", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "76979", 
    "_id" : "connections/76979", 
    "_from" : "places/York", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_kgUuTey--A", 
    "travelTime" : 4 
  }, 
  { 
    "_key" : "76981", 
    "_id" : "connections/76981", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Carlisle", 
    "_rev" : "_kgUuTey--B", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76983", 
    "_id" : "connections/76983", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Glasgow", 
    "_rev" : "_kgUuTe2---", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76985", 
    "_id" : "connections/76985", 
    "_from" : "places/Carlisle", 
    "_to" : "places/York", 
    "_rev" : "_kgUuTe2--_", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "76987", 
    "_id" : "connections/76987", 
    "_from" : "places/York", 
    "_to" : "places/Carlisle", 
    "_rev" : "_kgUuTe2--A", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "76989", 
    "_id" : "connections/76989", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Birmingham", 
    "_rev" : "_kgUuTe2--B", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "76991", 
    "_id" : "connections/76991", 
    "_from" : "places/Birmingham", 
    "_to" : "places/Carlisle", 
    "_rev" : "_kgUuTe6---", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "76993", 
    "_id" : "connections/76993", 
    "_from" : "places/Birmingham", 
    "_to" : "places/London", 
    "_rev" : "_kgUuTe6--_", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "76995", 
    "_id" : "connections/76995", 
    "_from" : "places/London", 
    "_to" : "places/Birmingham", 
    "_rev" : "_kgUuTe6--A", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "76997", 
    "_id" : "connections/76997", 
    "_from" : "places/Leuchars", 
    "_to" : "places/StAndrews", 
    "_rev" : "_kgUuTe6--B", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "76999", 
    "_id" : "connections/76999", 
    "_from" : "places/StAndrews", 
    "_to" : "places/Leuchars", 
    "_rev" : "_kgUuTf----", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "77001", 
    "_id" : "connections/77001", 
    "_from" : "places/York", 
    "_to" : "places/London", 
    "_rev" : "_kgUuTf---_", 
    "travelTime" : 1.8 
  }, 
  { 
    "_key" : "77003", 
    "_id" : "connections/77003", 
    "_from" : "places/London", 
    "_to" : "places/York", 
    "_rev" : "_kgUuTf---A", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "77005", 
    "_id" : "connections/77005", 
    "_from" : "places/London", 
    "_to" : "places/Brussels", 
    "_rev" : "_kgUuTf---B", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "77007", 
    "_id" : "connections/77007", 
    "_from" : "places/Brussels", 
    "_to" : "places/London", 
    "_rev" : "_kgUuTf---C", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "77009", 
    "_id" : "connections/77009", 
    "_from" : "places/Brussels", 
    "_to" : "places/Cologne", 
    "_rev" : "_kgUuTfC---", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "77011", 
    "_id" : "connections/77011", 
    "_from" : "places/Cologne", 
    "_to" : "places/Brussels", 
    "_rev" : "_kgUuTfC--_", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "77013", 
    "_id" : "connections/77013", 
    "_from" : "places/Toronto", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_kgUuTfC--A", 
    "travelTime" : 36 
  }, 
  { 
    "_key" : "77015", 
    "_id" : "connections/77015", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Toronto", 
    "_rev" : "_kgUuTfC--B", 
    "travelTime" : 35 
  }, 
  { 
    "_key" : "77017", 
    "_id" : "connections/77017", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_kgUuTfG---", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "77019", 
    "_id" : "connections/77019", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_kgUuTfG--_", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "77021", 
    "_id" : "connections/77021", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Edmonton", 
    "_rev" : "_kgUuTfG--A", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "77023", 
    "_id" : "connections/77023", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_kgUuTfG--B", 
    "travelTime" : 17 
  }, 
  { 
    "_key" : "77025", 
    "_id" : "connections/77025", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Jasper", 
    "_rev" : "_kgUuTfG--C", 
    "travelTime" : 6 
  }, 
  { 
    "_key" : "77027", 
    "_id" : "connections/77027", 
    "_from" : "places/Jasper", 
    "_to" : "places/Edmonton", 
    "_rev" : "_kgUuTfO---", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "77029", 
    "_id" : "connections/77029", 
    "_from" : "places/Jasper", 
    "_to" : "places/Vancouver", 
    "_rev" : "_kgUuTfO--_", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "77031", 
    "_id" : "connections/77031", 
    "_from" : "places/Vancouver", 
    "_to" : "places/Jasper", 
    "_rev" : "_kgUuTfO--A", 
    "travelTime" : 13 
  } 
]

Mps Graph

The mps_graph has been created to demonstrate shortest path algorithms and the abbreviation stands for multiple path search.

The example graph consists of nodes in the mps_verts collection and edges in the mps_edges collection. It is a simple traversal graph with start node A and end node C.

Mps Graph

With the Shortest Path algorithm, you either get the shortest path A - B - C or A - D - C. With the All Shortest Paths algorithm, both shortest paths are returned.

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("mps_graph");
db.mps_verts.toArray();
db.mps_edges.toArray();
examples.dropGraph("mps_graph");
Show output
[ 
  { 
    "_key" : "A", 
    "_id" : "mps_verts/A", 
    "_rev" : "_kgUuTgm---" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "mps_verts/B", 
    "_rev" : "_kgUuTgm--_" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "mps_verts/C", 
    "_rev" : "_kgUuTgq---" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "mps_verts/D", 
    "_rev" : "_kgUuTgq--_" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "mps_verts/E", 
    "_rev" : "_kgUuTgq--A" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "mps_verts/F", 
    "_rev" : "_kgUuTgq--B" 
  } 
]

[ 
  { 
    "_key" : "77094", 
    "_id" : "mps_edges/77094", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/B", 
    "_rev" : "_kgUuTgu---", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "77096", 
    "_id" : "mps_edges/77096", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/E", 
    "_rev" : "_kgUuTgu--_", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "77098", 
    "_id" : "mps_edges/77098", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/D", 
    "_rev" : "_kgUuTgu--A", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "77100", 
    "_id" : "mps_edges/77100", 
    "_from" : "mps_verts/B", 
    "_to" : "mps_verts/C", 
    "_rev" : "_kgUuTgu--B", 
    "vertex" : "B" 
  }, 
  { 
    "_key" : "77102", 
    "_id" : "mps_edges/77102", 
    "_from" : "mps_verts/D", 
    "_to" : "mps_verts/C", 
    "_rev" : "_kgUuTgy---", 
    "vertex" : "D" 
  }, 
  { 
    "_key" : "77104", 
    "_id" : "mps_edges/77104", 
    "_from" : "mps_verts/E", 
    "_to" : "mps_verts/F", 
    "_rev" : "_kgUuTgy--_", 
    "vertex" : "E" 
  }, 
  { 
    "_key" : "77106", 
    "_id" : "mps_edges/77106", 
    "_from" : "mps_verts/F", 
    "_to" : "mps_verts/C", 
    "_rev" : "_kgUuTgy--A", 
    "vertex" : "F" 
  } 
]

World Graph

The worldCountry graph has as node structure as follows:

world → continent → country → capital

World Graph

In some cases, edge directions aren’t forward. Therefore, it may get displayed disjunct in the graph viewer.

You can create the graph as a named graph using the name worldCountry, or as an anonymous graph (node and edge collections only) using the name worldCountryUnManaged.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("worldCountry");
db.worldVertices.toArray();
db.worldEdges.toArray();
examples.dropGraph("worldCountry");
var g = examples.loadGraph("worldCountryUnManaged");
examples.dropGraph("worldCountryUnManaged");
Show output
[ 
  { 
    "_key" : "world", 
    "_id" : "worldVertices/world", 
    "_rev" : "_kgUuThy---", 
    "name" : "World", 
    "type" : "root" 
  }, 
  { 
    "_key" : "continent-africa", 
    "_id" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuThy--_", 
    "name" : "Africa", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-asia", 
    "_id" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuThy--A", 
    "name" : "Asia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-australia", 
    "_id" : "worldVertices/continent-australia", 
    "_rev" : "_kgUuThy--B", 
    "name" : "Australia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-europe", 
    "_id" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTh2---", 
    "name" : "Europe", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-north-america", 
    "_id" : "worldVertices/continent-north-america", 
    "_rev" : "_kgUuTh2--_", 
    "name" : "North America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-south-america", 
    "_id" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTh2--A", 
    "name" : "South America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "country-afghanistan", 
    "_id" : "worldVertices/country-afghanistan", 
    "_rev" : "_kgUuTh2--B", 
    "name" : "Afghanistan", 
    "type" : "country", 
    "code" : "AFG" 
  }, 
  { 
    "_key" : "country-albania", 
    "_id" : "worldVertices/country-albania", 
    "_rev" : "_kgUuTh2--C", 
    "name" : "Albania", 
    "type" : "country", 
    "code" : "ALB" 
  }, 
  { 
    "_key" : "country-algeria", 
    "_id" : "worldVertices/country-algeria", 
    "_rev" : "_kgUuTh6---", 
    "name" : "Algeria", 
    "type" : "country", 
    "code" : "DZA" 
  }, 
  { 
    "_key" : "country-andorra", 
    "_id" : "worldVertices/country-andorra", 
    "_rev" : "_kgUuTh6--_", 
    "name" : "Andorra", 
    "type" : "country", 
    "code" : "AND" 
  }, 
  { 
    "_key" : "country-angola", 
    "_id" : "worldVertices/country-angola", 
    "_rev" : "_kgUuTh6--A", 
    "name" : "Angola", 
    "type" : "country", 
    "code" : "AGO" 
  }, 
  { 
    "_key" : "country-antigua-and-barbuda", 
    "_id" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_kgUuTh6--B", 
    "name" : "Antigua and Barbuda", 
    "type" : "country", 
    "code" : "ATG" 
  }, 
  { 
    "_key" : "country-argentina", 
    "_id" : "worldVertices/country-argentina", 
    "_rev" : "_kgUuTh6--C", 
    "name" : "Argentina", 
    "type" : "country", 
    "code" : "ARG" 
  }, 
  { 
    "_key" : "country-australia", 
    "_id" : "worldVertices/country-australia", 
    "_rev" : "_kgUuTi----", 
    "name" : "Australia", 
    "type" : "country", 
    "code" : "AUS" 
  }, 
  { 
    "_key" : "country-austria", 
    "_id" : "worldVertices/country-austria", 
    "_rev" : "_kgUuTi---_", 
    "name" : "Austria", 
    "type" : "country", 
    "code" : "AUT" 
  }, 
  { 
    "_key" : "country-bahamas", 
    "_id" : "worldVertices/country-bahamas", 
    "_rev" : "_kgUuTi---A", 
    "name" : "Bahamas", 
    "type" : "country", 
    "code" : "BHS" 
  }, 
  { 
    "_key" : "country-bahrain", 
    "_id" : "worldVertices/country-bahrain", 
    "_rev" : "_kgUuTi---B", 
    "name" : "Bahrain", 
    "type" : "country", 
    "code" : "BHR" 
  }, 
  { 
    "_key" : "country-bangladesh", 
    "_id" : "worldVertices/country-bangladesh", 
    "_rev" : "_kgUuTi---C", 
    "name" : "Bangladesh", 
    "type" : "country", 
    "code" : "BGD" 
  }, 
  { 
    "_key" : "country-barbados", 
    "_id" : "worldVertices/country-barbados", 
    "_rev" : "_kgUuTi---D", 
    "name" : "Barbados", 
    "type" : "country", 
    "code" : "BRB" 
  }, 
  { 
    "_key" : "country-belgium", 
    "_id" : "worldVertices/country-belgium", 
    "_rev" : "_kgUuTiC---", 
    "name" : "Belgium", 
    "type" : "country", 
    "code" : "BEL" 
  }, 
  { 
    "_key" : "country-bhutan", 
    "_id" : "worldVertices/country-bhutan", 
    "_rev" : "_kgUuTiC--_", 
    "name" : "Bhutan", 
    "type" : "country", 
    "code" : "BTN" 
  }, 
  { 
    "_key" : "country-bolivia", 
    "_id" : "worldVertices/country-bolivia", 
    "_rev" : "_kgUuTiG---", 
    "name" : "Bolivia", 
    "type" : "country", 
    "code" : "BOL" 
  }, 
  { 
    "_key" : "country-bosnia-and-herzegovina", 
    "_id" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_kgUuTiG--_", 
    "name" : "Bosnia and Herzegovina", 
    "type" : "country", 
    "code" : "BIH" 
  }, 
  { 
    "_key" : "country-botswana", 
    "_id" : "worldVertices/country-botswana", 
    "_rev" : "_kgUuTiG--A", 
    "name" : "Botswana", 
    "type" : "country", 
    "code" : "BWA" 
  }, 
  { 
    "_key" : "country-brazil", 
    "_id" : "worldVertices/country-brazil", 
    "_rev" : "_kgUuTiG--B", 
    "name" : "Brazil", 
    "type" : "country", 
    "code" : "BRA" 
  }, 
  { 
    "_key" : "country-brunei", 
    "_id" : "worldVertices/country-brunei", 
    "_rev" : "_kgUuTiK---", 
    "name" : "Brunei", 
    "type" : "country", 
    "code" : "BRN" 
  }, 
  { 
    "_key" : "country-bulgaria", 
    "_id" : "worldVertices/country-bulgaria", 
    "_rev" : "_kgUuTiK--_", 
    "name" : "Bulgaria", 
    "type" : "country", 
    "code" : "BGR" 
  }, 
  { 
    "_key" : "country-burkina-faso", 
    "_id" : "worldVertices/country-burkina-faso", 
    "_rev" : "_kgUuTiK--A", 
    "name" : "Burkina Faso", 
    "type" : "country", 
    "code" : "BFA" 
  }, 
  { 
    "_key" : "country-burundi", 
    "_id" : "worldVertices/country-burundi", 
    "_rev" : "_kgUuTiK--B", 
    "name" : "Burundi", 
    "type" : "country", 
    "code" : "BDI" 
  }, 
  { 
    "_key" : "country-cambodia", 
    "_id" : "worldVertices/country-cambodia", 
    "_rev" : "_kgUuTiK--C", 
    "name" : "Cambodia", 
    "type" : "country", 
    "code" : "KHM" 
  }, 
  { 
    "_key" : "country-cameroon", 
    "_id" : "worldVertices/country-cameroon", 
    "_rev" : "_kgUuTiO---", 
    "name" : "Cameroon", 
    "type" : "country", 
    "code" : "CMR" 
  }, 
  { 
    "_key" : "country-canada", 
    "_id" : "worldVertices/country-canada", 
    "_rev" : "_kgUuTiO--_", 
    "name" : "Canada", 
    "type" : "country", 
    "code" : "CAN" 
  }, 
  { 
    "_key" : "country-chad", 
    "_id" : "worldVertices/country-chad", 
    "_rev" : "_kgUuTiO--A", 
    "name" : "Chad", 
    "type" : "country", 
    "code" : "TCD" 
  }, 
  { 
    "_key" : "country-chile", 
    "_id" : "worldVertices/country-chile", 
    "_rev" : "_kgUuTiO--B", 
    "name" : "Chile", 
    "type" : "country", 
    "code" : "CHL" 
  }, 
  { 
    "_key" : "country-colombia", 
    "_id" : "worldVertices/country-colombia", 
    "_rev" : "_kgUuTiS---", 
    "name" : "Colombia", 
    "type" : "country", 
    "code" : "COL" 
  }, 
  { 
    "_key" : "country-cote-d-ivoire", 
    "_id" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_kgUuTiS--_", 
    "name" : "Cote d'Ivoire", 
    "type" : "country", 
    "code" : "CIV" 
  }, 
  { 
    "_key" : "country-croatia", 
    "_id" : "worldVertices/country-croatia", 
    "_rev" : "_kgUuTiS--A", 
    "name" : "Croatia", 
    "type" : "country", 
    "code" : "HRV" 
  }, 
  { 
    "_key" : "country-czech-republic", 
    "_id" : "worldVertices/country-czech-republic", 
    "_rev" : "_kgUuTiS--B", 
    "name" : "Czech Republic", 
    "type" : "country", 
    "code" : "CZE" 
  }, 
  { 
    "_key" : "country-denmark", 
    "_id" : "worldVertices/country-denmark", 
    "_rev" : "_kgUuTiS--C", 
    "name" : "Denmark", 
    "type" : "country", 
    "code" : "DNK" 
  }, 
  { 
    "_key" : "country-ecuador", 
    "_id" : "worldVertices/country-ecuador", 
    "_rev" : "_kgUuTiS--D", 
    "name" : "Ecuador", 
    "type" : "country", 
    "code" : "ECU" 
  }, 
  { 
    "_key" : "country-egypt", 
    "_id" : "worldVertices/country-egypt", 
    "_rev" : "_kgUuTiW---", 
    "name" : "Egypt", 
    "type" : "country", 
    "code" : "EGY" 
  }, 
  { 
    "_key" : "country-eritrea", 
    "_id" : "worldVertices/country-eritrea", 
    "_rev" : "_kgUuTiW--_", 
    "name" : "Eritrea", 
    "type" : "country", 
    "code" : "ERI" 
  }, 
  { 
    "_key" : "country-finland", 
    "_id" : "worldVertices/country-finland", 
    "_rev" : "_kgUuTiW--A", 
    "name" : "Finland", 
    "type" : "country", 
    "code" : "FIN" 
  }, 
  { 
    "_key" : "country-france", 
    "_id" : "worldVertices/country-france", 
    "_rev" : "_kgUuTiW--B", 
    "name" : "France", 
    "type" : "country", 
    "code" : "FRA" 
  }, 
  { 
    "_key" : "country-germany", 
    "_id" : "worldVertices/country-germany", 
    "_rev" : "_kgUuTia---", 
    "name" : "Germany", 
    "type" : "country", 
    "code" : "DEU" 
  }, 
  { 
    "_key" : "country-people-s-republic-of-china", 
    "_id" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_kgUuTia--_", 
    "name" : "People's Republic of China", 
    "type" : "country", 
    "code" : "CHN" 
  }, 
  { 
    "_key" : "capital-algiers", 
    "_id" : "worldVertices/capital-algiers", 
    "_rev" : "_kgUuTia--A", 
    "name" : "Algiers", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-andorra-la-vella", 
    "_id" : "worldVertices/capital-andorra-la-vella", 
    "_rev" : "_kgUuTia--B", 
    "name" : "Andorra la Vella", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-asmara", 
    "_id" : "worldVertices/capital-asmara", 
    "_rev" : "_kgUuTia--C", 
    "name" : "Asmara", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bandar-seri-begawan", 
    "_id" : "worldVertices/capital-bandar-seri-begawan", 
    "_rev" : "_kgUuTie---", 
    "name" : "Bandar Seri Begawan", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-beijing", 
    "_id" : "worldVertices/capital-beijing", 
    "_rev" : "_kgUuTie--_", 
    "name" : "Beijing", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-berlin", 
    "_id" : "worldVertices/capital-berlin", 
    "_rev" : "_kgUuTie--A", 
    "name" : "Berlin", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bogota", 
    "_id" : "worldVertices/capital-bogota", 
    "_rev" : "_kgUuTie--B", 
    "name" : "Bogota", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brasilia", 
    "_id" : "worldVertices/capital-brasilia", 
    "_rev" : "_kgUuTii---", 
    "name" : "Brasilia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bridgetown", 
    "_id" : "worldVertices/capital-bridgetown", 
    "_rev" : "_kgUuTii--_", 
    "name" : "Bridgetown", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brussels", 
    "_id" : "worldVertices/capital-brussels", 
    "_rev" : "_kgUuTii--A", 
    "name" : "Brussels", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-buenos-aires", 
    "_id" : "worldVertices/capital-buenos-aires", 
    "_rev" : "_kgUuTii--B", 
    "name" : "Buenos Aires", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bujumbura", 
    "_id" : "worldVertices/capital-bujumbura", 
    "_rev" : "_kgUuTim---", 
    "name" : "Bujumbura", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-cairo", 
    "_id" : "worldVertices/capital-cairo", 
    "_rev" : "_kgUuTim--_", 
    "name" : "Cairo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-canberra", 
    "_id" : "worldVertices/capital-canberra", 
    "_rev" : "_kgUuTim--A", 
    "name" : "Canberra", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-copenhagen", 
    "_id" : "worldVertices/capital-copenhagen", 
    "_rev" : "_kgUuTim--B", 
    "name" : "Copenhagen", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-dhaka", 
    "_id" : "worldVertices/capital-dhaka", 
    "_rev" : "_kgUuTim--C", 
    "name" : "Dhaka", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-gaborone", 
    "_id" : "worldVertices/capital-gaborone", 
    "_rev" : "_kgUuTim--D", 
    "name" : "Gaborone", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-helsinki", 
    "_id" : "worldVertices/capital-helsinki", 
    "_rev" : "_kgUuTiq---", 
    "name" : "Helsinki", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-kabul", 
    "_id" : "worldVertices/capital-kabul", 
    "_rev" : "_kgUuTiq--_", 
    "name" : "Kabul", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-la-paz", 
    "_id" : "worldVertices/capital-la-paz", 
    "_rev" : "_kgUuTiq--A", 
    "name" : "La Paz", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-luanda", 
    "_id" : "worldVertices/capital-luanda", 
    "_rev" : "_kgUuTiq--B", 
    "name" : "Luanda", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-manama", 
    "_id" : "worldVertices/capital-manama", 
    "_rev" : "_kgUuTiq--C", 
    "name" : "Manama", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-nassau", 
    "_id" : "worldVertices/capital-nassau", 
    "_rev" : "_kgUuTiq--D", 
    "name" : "Nassau", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-n-djamena", 
    "_id" : "worldVertices/capital-n-djamena", 
    "_rev" : "_kgUuTiu---", 
    "name" : "N'Djamena", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ottawa", 
    "_id" : "worldVertices/capital-ottawa", 
    "_rev" : "_kgUuTiu--_", 
    "name" : "Ottawa", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ouagadougou", 
    "_id" : "worldVertices/capital-ouagadougou", 
    "_rev" : "_kgUuTiu--A", 
    "name" : "Ouagadougou", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-paris", 
    "_id" : "worldVertices/capital-paris", 
    "_rev" : "_kgUuTiu--B", 
    "name" : "Paris", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-phnom-penh", 
    "_id" : "worldVertices/capital-phnom-penh", 
    "_rev" : "_kgUuTiu--C", 
    "name" : "Phnom Penh", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-prague", 
    "_id" : "worldVertices/capital-prague", 
    "_rev" : "_kgUuTiu--D", 
    "name" : "Prague", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-quito", 
    "_id" : "worldVertices/capital-quito", 
    "_rev" : "_kgUuTiy---", 
    "name" : "Quito", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-saint-john-s", 
    "_id" : "worldVertices/capital-saint-john-s", 
    "_rev" : "_kgUuTiy--_", 
    "name" : "Saint John's", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-santiago", 
    "_id" : "worldVertices/capital-santiago", 
    "_rev" : "_kgUuTiy--A", 
    "name" : "Santiago", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sarajevo", 
    "_id" : "worldVertices/capital-sarajevo", 
    "_rev" : "_kgUuTiy--B", 
    "name" : "Sarajevo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sofia", 
    "_id" : "worldVertices/capital-sofia", 
    "_rev" : "_kgUuTiy--C", 
    "name" : "Sofia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-thimphu", 
    "_id" : "worldVertices/capital-thimphu", 
    "_rev" : "_kgUuTi2---", 
    "name" : "Thimphu", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-tirana", 
    "_id" : "worldVertices/capital-tirana", 
    "_rev" : "_kgUuTi2--_", 
    "name" : "Tirana", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-vienna", 
    "_id" : "worldVertices/capital-vienna", 
    "_rev" : "_kgUuTi2--A", 
    "name" : "Vienna", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yamoussoukro", 
    "_id" : "worldVertices/capital-yamoussoukro", 
    "_rev" : "_kgUuTi2--B", 
    "name" : "Yamoussoukro", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yaounde", 
    "_id" : "worldVertices/capital-yaounde", 
    "_rev" : "_kgUuTi6---", 
    "name" : "Yaounde", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-zagreb", 
    "_id" : "worldVertices/capital-zagreb", 
    "_rev" : "_kgUuTi6--_", 
    "name" : "Zagreb", 
    "type" : "capital" 
  } 
]

[ 
  { 
    "_key" : "77250", 
    "_id" : "worldEdges/77250", 
    "_from" : "worldVertices/continent-africa", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTi6--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77252", 
    "_id" : "worldEdges/77252", 
    "_from" : "worldVertices/continent-asia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTi6--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77254", 
    "_id" : "worldEdges/77254", 
    "_from" : "worldVertices/continent-australia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTj----", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77256", 
    "_id" : "worldEdges/77256", 
    "_from" : "worldVertices/continent-europe", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTj---_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77258", 
    "_id" : "worldEdges/77258", 
    "_from" : "worldVertices/continent-north-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTj---A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77260", 
    "_id" : "worldEdges/77260", 
    "_from" : "worldVertices/continent-south-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_kgUuTj---B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77262", 
    "_id" : "worldEdges/77262", 
    "_from" : "worldVertices/country-afghanistan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTj---C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77264", 
    "_id" : "worldEdges/77264", 
    "_from" : "worldVertices/country-albania", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjC---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77266", 
    "_id" : "worldEdges/77266", 
    "_from" : "worldVertices/country-algeria", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjC--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77268", 
    "_id" : "worldEdges/77268", 
    "_from" : "worldVertices/country-andorra", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjC--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77270", 
    "_id" : "worldEdges/77270", 
    "_from" : "worldVertices/country-angola", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjC--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77272", 
    "_id" : "worldEdges/77272", 
    "_from" : "worldVertices/country-antigua-and-barbuda", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_kgUuTjG---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77274", 
    "_id" : "worldEdges/77274", 
    "_from" : "worldVertices/country-argentina", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTjG--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77276", 
    "_id" : "worldEdges/77276", 
    "_from" : "worldVertices/country-australia", 
    "_to" : "worldVertices/continent-australia", 
    "_rev" : "_kgUuTjG--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77278", 
    "_id" : "worldEdges/77278", 
    "_from" : "worldVertices/country-austria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjG--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77280", 
    "_id" : "worldEdges/77280", 
    "_from" : "worldVertices/country-bahamas", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_kgUuTjG--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77282", 
    "_id" : "worldEdges/77282", 
    "_from" : "worldVertices/country-bahrain", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTjK---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77284", 
    "_id" : "worldEdges/77284", 
    "_from" : "worldVertices/country-bangladesh", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTjO---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77286", 
    "_id" : "worldEdges/77286", 
    "_from" : "worldVertices/country-barbados", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_kgUuTjO--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77288", 
    "_id" : "worldEdges/77288", 
    "_from" : "worldVertices/country-belgium", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjO--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77290", 
    "_id" : "worldEdges/77290", 
    "_from" : "worldVertices/country-bhutan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTjO--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77292", 
    "_id" : "worldEdges/77292", 
    "_from" : "worldVertices/country-bolivia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTjO--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77294", 
    "_id" : "worldEdges/77294", 
    "_from" : "worldVertices/country-bosnia-and-herzegovina", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjS---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77296", 
    "_id" : "worldEdges/77296", 
    "_from" : "worldVertices/country-botswana", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjS--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77298", 
    "_id" : "worldEdges/77298", 
    "_from" : "worldVertices/country-brazil", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTjS--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77300", 
    "_id" : "worldEdges/77300", 
    "_from" : "worldVertices/country-brunei", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTjS--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77302", 
    "_id" : "worldEdges/77302", 
    "_from" : "worldVertices/country-bulgaria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTjS--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77304", 
    "_id" : "worldEdges/77304", 
    "_from" : "worldVertices/country-burkina-faso", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjS--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77306", 
    "_id" : "worldEdges/77306", 
    "_from" : "worldVertices/country-burundi", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjW---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77308", 
    "_id" : "worldEdges/77308", 
    "_from" : "worldVertices/country-cambodia", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTjW--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77310", 
    "_id" : "worldEdges/77310", 
    "_from" : "worldVertices/country-cameroon", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjW--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77312", 
    "_id" : "worldEdges/77312", 
    "_from" : "worldVertices/country-canada", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_kgUuTjW--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77314", 
    "_id" : "worldEdges/77314", 
    "_from" : "worldVertices/country-chad", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTjW--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77316", 
    "_id" : "worldEdges/77316", 
    "_from" : "worldVertices/country-chile", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTja---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77318", 
    "_id" : "worldEdges/77318", 
    "_from" : "worldVertices/country-colombia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTja--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77320", 
    "_id" : "worldEdges/77320", 
    "_from" : "worldVertices/country-cote-d-ivoire", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTja--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77322", 
    "_id" : "worldEdges/77322", 
    "_from" : "worldVertices/country-croatia", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTja--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77324", 
    "_id" : "worldEdges/77324", 
    "_from" : "worldVertices/country-czech-republic", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTja--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77326", 
    "_id" : "worldEdges/77326", 
    "_from" : "worldVertices/country-denmark", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTje---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77328", 
    "_id" : "worldEdges/77328", 
    "_from" : "worldVertices/country-ecuador", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_kgUuTje--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77330", 
    "_id" : "worldEdges/77330", 
    "_from" : "worldVertices/country-egypt", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTje--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77332", 
    "_id" : "worldEdges/77332", 
    "_from" : "worldVertices/country-eritrea", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_kgUuTje--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77334", 
    "_id" : "worldEdges/77334", 
    "_from" : "worldVertices/country-finland", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTji---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77336", 
    "_id" : "worldEdges/77336", 
    "_from" : "worldVertices/country-france", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTji--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77338", 
    "_id" : "worldEdges/77338", 
    "_from" : "worldVertices/country-germany", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_kgUuTji--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77340", 
    "_id" : "worldEdges/77340", 
    "_from" : "worldVertices/country-people-s-republic-of-china", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_kgUuTji--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77342", 
    "_id" : "worldEdges/77342", 
    "_from" : "worldVertices/capital-algiers", 
    "_to" : "worldVertices/country-algeria", 
    "_rev" : "_kgUuTji--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77344", 
    "_id" : "worldEdges/77344", 
    "_from" : "worldVertices/capital-andorra-la-vella", 
    "_to" : "worldVertices/country-andorra", 
    "_rev" : "_kgUuTjm---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77346", 
    "_id" : "worldEdges/77346", 
    "_from" : "worldVertices/capital-asmara", 
    "_to" : "worldVertices/country-eritrea", 
    "_rev" : "_kgUuTjm--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77348", 
    "_id" : "worldEdges/77348", 
    "_from" : "worldVertices/capital-bandar-seri-begawan", 
    "_to" : "worldVertices/country-brunei", 
    "_rev" : "_kgUuTjm--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77350", 
    "_id" : "worldEdges/77350", 
    "_from" : "worldVertices/capital-beijing", 
    "_to" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_kgUuTjm--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77352", 
    "_id" : "worldEdges/77352", 
    "_from" : "worldVertices/capital-berlin", 
    "_to" : "worldVertices/country-germany", 
    "_rev" : "_kgUuTjq---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77354", 
    "_id" : "worldEdges/77354", 
    "_from" : "worldVertices/capital-bogota", 
    "_to" : "worldVertices/country-colombia", 
    "_rev" : "_kgUuTjq--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77356", 
    "_id" : "worldEdges/77356", 
    "_from" : "worldVertices/capital-brasilia", 
    "_to" : "worldVertices/country-brazil", 
    "_rev" : "_kgUuTjq--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77358", 
    "_id" : "worldEdges/77358", 
    "_from" : "worldVertices/capital-bridgetown", 
    "_to" : "worldVertices/country-barbados", 
    "_rev" : "_kgUuTjq--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77360", 
    "_id" : "worldEdges/77360", 
    "_from" : "worldVertices/capital-brussels", 
    "_to" : "worldVertices/country-belgium", 
    "_rev" : "_kgUuTju---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77362", 
    "_id" : "worldEdges/77362", 
    "_from" : "worldVertices/capital-buenos-aires", 
    "_to" : "worldVertices/country-argentina", 
    "_rev" : "_kgUuTju--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77364", 
    "_id" : "worldEdges/77364", 
    "_from" : "worldVertices/capital-bujumbura", 
    "_to" : "worldVertices/country-burundi", 
    "_rev" : "_kgUuTju--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77366", 
    "_id" : "worldEdges/77366", 
    "_from" : "worldVertices/capital-cairo", 
    "_to" : "worldVertices/country-egypt", 
    "_rev" : "_kgUuTju--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77368", 
    "_id" : "worldEdges/77368", 
    "_from" : "worldVertices/capital-canberra", 
    "_to" : "worldVertices/country-australia", 
    "_rev" : "_kgUuTjy---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77370", 
    "_id" : "worldEdges/77370", 
    "_from" : "worldVertices/capital-copenhagen", 
    "_to" : "worldVertices/country-denmark", 
    "_rev" : "_kgUuTjy--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77372", 
    "_id" : "worldEdges/77372", 
    "_from" : "worldVertices/capital-dhaka", 
    "_to" : "worldVertices/country-bangladesh", 
    "_rev" : "_kgUuTjy--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77374", 
    "_id" : "worldEdges/77374", 
    "_from" : "worldVertices/capital-gaborone", 
    "_to" : "worldVertices/country-botswana", 
    "_rev" : "_kgUuTjy--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77376", 
    "_id" : "worldEdges/77376", 
    "_from" : "worldVertices/capital-helsinki", 
    "_to" : "worldVertices/country-finland", 
    "_rev" : "_kgUuTjy--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77378", 
    "_id" : "worldEdges/77378", 
    "_from" : "worldVertices/capital-kabul", 
    "_to" : "worldVertices/country-afghanistan", 
    "_rev" : "_kgUuTj2---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77380", 
    "_id" : "worldEdges/77380", 
    "_from" : "worldVertices/capital-la-paz", 
    "_to" : "worldVertices/country-bolivia", 
    "_rev" : "_kgUuTj2--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77382", 
    "_id" : "worldEdges/77382", 
    "_from" : "worldVertices/capital-luanda", 
    "_to" : "worldVertices/country-angola", 
    "_rev" : "_kgUuTj2--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77384", 
    "_id" : "worldEdges/77384", 
    "_from" : "worldVertices/capital-manama", 
    "_to" : "worldVertices/country-bahrain", 
    "_rev" : "_kgUuTj2--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77386", 
    "_id" : "worldEdges/77386", 
    "_from" : "worldVertices/capital-nassau", 
    "_to" : "worldVertices/country-bahamas", 
    "_rev" : "_kgUuTj6---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77388", 
    "_id" : "worldEdges/77388", 
    "_from" : "worldVertices/capital-n-djamena", 
    "_to" : "worldVertices/country-chad", 
    "_rev" : "_kgUuTj6--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77390", 
    "_id" : "worldEdges/77390", 
    "_from" : "worldVertices/capital-ottawa", 
    "_to" : "worldVertices/country-canada", 
    "_rev" : "_kgUuTj6--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77392", 
    "_id" : "worldEdges/77392", 
    "_from" : "worldVertices/capital-ouagadougou", 
    "_to" : "worldVertices/country-burkina-faso", 
    "_rev" : "_kgUuTj6--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77394", 
    "_id" : "worldEdges/77394", 
    "_from" : "worldVertices/capital-paris", 
    "_to" : "worldVertices/country-france", 
    "_rev" : "_kgUuTj6--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77396", 
    "_id" : "worldEdges/77396", 
    "_from" : "worldVertices/capital-phnom-penh", 
    "_to" : "worldVertices/country-cambodia", 
    "_rev" : "_kgUuTk----", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77398", 
    "_id" : "worldEdges/77398", 
    "_from" : "worldVertices/capital-prague", 
    "_to" : "worldVertices/country-czech-republic", 
    "_rev" : "_kgUuTk---_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77400", 
    "_id" : "worldEdges/77400", 
    "_from" : "worldVertices/capital-quito", 
    "_to" : "worldVertices/country-ecuador", 
    "_rev" : "_kgUuTk---A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77402", 
    "_id" : "worldEdges/77402", 
    "_from" : "worldVertices/capital-saint-john-s", 
    "_to" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_kgUuTk---B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77404", 
    "_id" : "worldEdges/77404", 
    "_from" : "worldVertices/capital-santiago", 
    "_to" : "worldVertices/country-chile", 
    "_rev" : "_kgUuTk---C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77406", 
    "_id" : "worldEdges/77406", 
    "_from" : "worldVertices/capital-sarajevo", 
    "_to" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_kgUuTkC---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77408", 
    "_id" : "worldEdges/77408", 
    "_from" : "worldVertices/capital-sofia", 
    "_to" : "worldVertices/country-bulgaria", 
    "_rev" : "_kgUuTkC--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77410", 
    "_id" : "worldEdges/77410", 
    "_from" : "worldVertices/capital-thimphu", 
    "_to" : "worldVertices/country-bhutan", 
    "_rev" : "_kgUuTkC--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77412", 
    "_id" : "worldEdges/77412", 
    "_from" : "worldVertices/capital-tirana", 
    "_to" : "worldVertices/country-albania", 
    "_rev" : "_kgUuTkC--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77414", 
    "_id" : "worldEdges/77414", 
    "_from" : "worldVertices/capital-vienna", 
    "_to" : "worldVertices/country-austria", 
    "_rev" : "_kgUuTkC--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77416", 
    "_id" : "worldEdges/77416", 
    "_from" : "worldVertices/capital-yamoussoukro", 
    "_to" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_kgUuTkC--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77418", 
    "_id" : "worldEdges/77418", 
    "_from" : "worldVertices/capital-yaounde", 
    "_to" : "worldVertices/country-cameroon", 
    "_rev" : "_kgUuTkG---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "77420", 
    "_id" : "worldEdges/77420", 
    "_from" : "worldVertices/capital-zagreb", 
    "_to" : "worldVertices/country-croatia", 
    "_rev" : "_kgUuTkG--_", 
    "type" : "is-in" 
  } 
]

Social Graph

The social graph is a set of persons and their relations. The graph has female and male persons as nodes in two node collections. The edges are their connections and stored in the relation edge collection.

Social Example Graph

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var graph = examples.loadGraph("social");
db.female.toArray()
db.male.toArray()
db.relation.toArray()
examples.dropGraph("social");
Show output
[ 
  { 
    "_key" : "alice", 
    "_id" : "female/alice", 
    "_rev" : "_kgUuTpy---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "diana", 
    "_id" : "female/diana", 
    "_rev" : "_kgUuTp2--A", 
    "name" : "Diana" 
  } 
]

[ 
  { 
    "_key" : "bob", 
    "_id" : "male/bob", 
    "_rev" : "_kgUuTp2---", 
    "name" : "Bob" 
  }, 
  { 
    "_key" : "charly", 
    "_id" : "male/charly", 
    "_rev" : "_kgUuTp2--_", 
    "name" : "Charly" 
  } 
]

[ 
  { 
    "_key" : "77785", 
    "_id" : "relation/77785", 
    "_from" : "female/alice", 
    "_to" : "male/bob", 
    "_rev" : "_kgUuTp2--B", 
    "type" : "married", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "77787", 
    "_id" : "relation/77787", 
    "_from" : "female/alice", 
    "_to" : "male/charly", 
    "_rev" : "_kgUuTp2--C", 
    "type" : "friend", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "77789", 
    "_id" : "relation/77789", 
    "_from" : "male/charly", 
    "_to" : "female/diana", 
    "_rev" : "_kgUuTp6---", 
    "type" : "married", 
    "vertex" : "charly" 
  }, 
  { 
    "_key" : "77791", 
    "_id" : "relation/77791", 
    "_from" : "male/bob", 
    "_to" : "female/diana", 
    "_rev" : "_kgUuTp6--_", 
    "type" : "friend", 
    "vertex" : "bob" 
  } 
]

City Graph

The routeplanner graph is a set of european cities and their fictional traveling distances as connections. The graph has the cities as nodes in multiple node collections (germanCity and frenchCity). The edges are their interconnections in several edge collections (frenchHighway, germanHighway, internationalHighway).

Cities Example Graph

Example of how to create the graph, inspect its edges and nodes, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("routeplanner");
db.frenchCity.toArray();
db.germanCity.toArray();
db.germanHighway.toArray();
db.frenchHighway.toArray();
db.internationalHighway.toArray();
examples.dropGraph("routeplanner");
Show output
[ 
  { 
    "_key" : "Lyon", 
    "_id" : "frenchCity/Lyon", 
    "_rev" : "_kgUuTqq--B", 
    "population" : 80000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        4.84, 
        45.76 
      ] 
    } 
  }, 
  { 
    "_key" : "Paris", 
    "_id" : "frenchCity/Paris", 
    "_rev" : "_kgUuTqq--C", 
    "population" : 4000000, 
    "isCapital" : true, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        2.3508, 
        48.8567 
      ] 
    } 
  } 
]

[ 
  { 
    "_key" : "Berlin", 
    "_id" : "germanCity/Berlin", 
    "_rev" : "_kgUuTqq---", 
    "population" : 3000000, 
    "isCapital" : true, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        13.3833, 
        52.5167 
      ] 
    } 
  }, 
  { 
    "_key" : "Cologne", 
    "_id" : "germanCity/Cologne", 
    "_rev" : "_kgUuTqq--_", 
    "population" : 1000000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        6.9528, 
        50.9364 
      ] 
    } 
  }, 
  { 
    "_key" : "Hamburg", 
    "_id" : "germanCity/Hamburg", 
    "_rev" : "_kgUuTqq--A", 
    "population" : 1000000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        10.0014, 
        53.5653 
      ] 
    } 
  } 
]

[ 
  { 
    "_key" : "77889", 
    "_id" : "germanHighway/77889", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_kgUuTqy---", 
    "distance" : 850 
  }, 
  { 
    "_key" : "77891", 
    "_id" : "germanHighway/77891", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Hamburg", 
    "_rev" : "_kgUuTqy--_", 
    "distance" : 400 
  }, 
  { 
    "_key" : "77893", 
    "_id" : "germanHighway/77893", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_kgUuTqy--A", 
    "distance" : 500 
  } 
]

[ 
  { 
    "_key" : "77895", 
    "_id" : "frenchHighway/77895", 
    "_from" : "frenchCity/Paris", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_kgUuTqy--B", 
    "distance" : 550 
  } 
]

[ 
  { 
    "_key" : "77897", 
    "_id" : "internationalHighway/77897", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_kgUuTq2---", 
    "distance" : 1100 
  }, 
  { 
    "_key" : "77899", 
    "_id" : "internationalHighway/77899", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_kgUuTq2--_", 
    "distance" : 1200 
  }, 
  { 
    "_key" : "77901", 
    "_id" : "internationalHighway/77901", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_kgUuTq2--A", 
    "distance" : 900 
  }, 
  { 
    "_key" : "77903", 
    "_id" : "internationalHighway/77903", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_kgUuTq2--B", 
    "distance" : 1300 
  }, 
  { 
    "_key" : "77905", 
    "_id" : "internationalHighway/77905", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_kgUuTq2--C", 
    "distance" : 700 
  }, 
  { 
    "_key" : "77907", 
    "_id" : "internationalHighway/77907", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_kgUuTq6---", 
    "distance" : 550 
  } 
]

Connected Components Graph

A small example graph comprised of components (nodes) and connections (edges). Good for trying out graph algorithms such as Weakly Connected Components (WCC).

Three disjoint subgraphs with 36 nodes and edges in total

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("connectedComponentsGraph");
db.components.toArray();
db.connections.toArray();
examples.dropGraph("connectedComponentsGraph");
Show output
[ 
  { 
    "_key" : "A1", 
    "_id" : "components/A1", 
    "_rev" : "_kgUuTsm---" 
  }, 
  { 
    "_key" : "A2", 
    "_id" : "components/A2", 
    "_rev" : "_kgUuTsq---" 
  }, 
  { 
    "_key" : "A3", 
    "_id" : "components/A3", 
    "_rev" : "_kgUuTsq--_" 
  }, 
  { 
    "_key" : "A4", 
    "_id" : "components/A4", 
    "_rev" : "_kgUuTsq--A" 
  }, 
  { 
    "_key" : "B1", 
    "_id" : "components/B1", 
    "_rev" : "_kgUuTsq--B" 
  }, 
  { 
    "_key" : "B3", 
    "_id" : "components/B3", 
    "_rev" : "_kgUuTsu---" 
  }, 
  { 
    "_key" : "B2", 
    "_id" : "components/B2", 
    "_rev" : "_kgUuTsu--_" 
  }, 
  { 
    "_key" : "B4", 
    "_id" : "components/B4", 
    "_rev" : "_kgUuTsu--A" 
  }, 
  { 
    "_key" : "B6", 
    "_id" : "components/B6", 
    "_rev" : "_kgUuTsu--B" 
  }, 
  { 
    "_key" : "B5", 
    "_id" : "components/B5", 
    "_rev" : "_kgUuTsu--C" 
  }, 
  { 
    "_key" : "B7", 
    "_id" : "components/B7", 
    "_rev" : "_kgUuTsy---" 
  }, 
  { 
    "_key" : "B8", 
    "_id" : "components/B8", 
    "_rev" : "_kgUuTsy--_" 
  }, 
  { 
    "_key" : "B9", 
    "_id" : "components/B9", 
    "_rev" : "_kgUuTsy--A" 
  }, 
  { 
    "_key" : "B10", 
    "_id" : "components/B10", 
    "_rev" : "_kgUuTsy--B" 
  }, 
  { 
    "_key" : "B19", 
    "_id" : "components/B19", 
    "_rev" : "_kgUuTs2---" 
  }, 
  { 
    "_key" : "B11", 
    "_id" : "components/B11", 
    "_rev" : "_kgUuTs2--_" 
  }, 
  { 
    "_key" : "B12", 
    "_id" : "components/B12", 
    "_rev" : "_kgUuTs2--A" 
  }, 
  { 
    "_key" : "B13", 
    "_id" : "components/B13", 
    "_rev" : "_kgUuTs2--B" 
  }, 
  { 
    "_key" : "B20", 
    "_id" : "components/B20", 
    "_rev" : "_kgUuTs6---" 
  }, 
  { 
    "_key" : "B14", 
    "_id" : "components/B14", 
    "_rev" : "_kgUuTs6--_" 
  }, 
  { 
    "_key" : "B15", 
    "_id" : "components/B15", 
    "_rev" : "_kgUuTs6--A" 
  }, 
  { 
    "_key" : "B16", 
    "_id" : "components/B16", 
    "_rev" : "_kgUuTs6--B" 
  }, 
  { 
    "_key" : "B17", 
    "_id" : "components/B17", 
    "_rev" : "_kgUuTs6--C" 
  }, 
  { 
    "_key" : "B18", 
    "_id" : "components/B18", 
    "_rev" : "_kgUuTt----" 
  }, 
  { 
    "_key" : "B21", 
    "_id" : "components/B21", 
    "_rev" : "_kgUuTt---_" 
  }, 
  { 
    "_key" : "B22", 
    "_id" : "components/B22", 
    "_rev" : "_kgUuTtC---" 
  }, 
  { 
    "_key" : "C1", 
    "_id" : "components/C1", 
    "_rev" : "_kgUuTtC--_" 
  }, 
  { 
    "_key" : "C2", 
    "_id" : "components/C2", 
    "_rev" : "_kgUuTtC--A" 
  }, 
  { 
    "_key" : "C3", 
    "_id" : "components/C3", 
    "_rev" : "_kgUuTtC--B" 
  }, 
  { 
    "_key" : "C4", 
    "_id" : "components/C4", 
    "_rev" : "_kgUuTtC--C" 
  }, 
  { 
    "_key" : "C5", 
    "_id" : "components/C5", 
    "_rev" : "_kgUuTtG---" 
  }, 
  { 
    "_key" : "C7", 
    "_id" : "components/C7", 
    "_rev" : "_kgUuTtG--_" 
  }, 
  { 
    "_key" : "C6", 
    "_id" : "components/C6", 
    "_rev" : "_kgUuTtG--A" 
  }, 
  { 
    "_key" : "C8", 
    "_id" : "components/C8", 
    "_rev" : "_kgUuTtG--B" 
  }, 
  { 
    "_key" : "C9", 
    "_id" : "components/C9", 
    "_rev" : "_kgUuTtK---" 
  }, 
  { 
    "_key" : "C10", 
    "_id" : "components/C10", 
    "_rev" : "_kgUuTtK--_" 
  } 
]

[ 
  { 
    "_key" : "78039", 
    "_id" : "connections/78039", 
    "_from" : "components/A1", 
    "_to" : "components/A2", 
    "_rev" : "_kgUuTtK--A" 
  }, 
  { 
    "_key" : "78041", 
    "_id" : "connections/78041", 
    "_from" : "components/A2", 
    "_to" : "components/A3", 
    "_rev" : "_kgUuTtK--B" 
  }, 
  { 
    "_key" : "78043", 
    "_id" : "connections/78043", 
    "_from" : "components/A3", 
    "_to" : "components/A4", 
    "_rev" : "_kgUuTtK--C" 
  }, 
  { 
    "_key" : "78045", 
    "_id" : "connections/78045", 
    "_from" : "components/A4", 
    "_to" : "components/A1", 
    "_rev" : "_kgUuTtO---" 
  }, 
  { 
    "_key" : "78047", 
    "_id" : "connections/78047", 
    "_from" : "components/B1", 
    "_to" : "components/B3", 
    "_rev" : "_kgUuTtO--_" 
  }, 
  { 
    "_key" : "78049", 
    "_id" : "connections/78049", 
    "_from" : "components/B2", 
    "_to" : "components/B4", 
    "_rev" : "_kgUuTtO--A" 
  }, 
  { 
    "_key" : "78051", 
    "_id" : "connections/78051", 
    "_from" : "components/B3", 
    "_to" : "components/B6", 
    "_rev" : "_kgUuTtO--B" 
  }, 
  { 
    "_key" : "78053", 
    "_id" : "connections/78053", 
    "_from" : "components/B4", 
    "_to" : "components/B3", 
    "_rev" : "_kgUuTtS---" 
  }, 
  { 
    "_key" : "78055", 
    "_id" : "connections/78055", 
    "_from" : "components/B4", 
    "_to" : "components/B5", 
    "_rev" : "_kgUuTtS--_" 
  }, 
  { 
    "_key" : "78057", 
    "_id" : "connections/78057", 
    "_from" : "components/B6", 
    "_to" : "components/B7", 
    "_rev" : "_kgUuTtS--A" 
  }, 
  { 
    "_key" : "78059", 
    "_id" : "connections/78059", 
    "_from" : "components/B7", 
    "_to" : "components/B8", 
    "_rev" : "_kgUuTtS--B" 
  }, 
  { 
    "_key" : "78061", 
    "_id" : "connections/78061", 
    "_from" : "components/B7", 
    "_to" : "components/B9", 
    "_rev" : "_kgUuTtW---" 
  }, 
  { 
    "_key" : "78063", 
    "_id" : "connections/78063", 
    "_from" : "components/B7", 
    "_to" : "components/B10", 
    "_rev" : "_kgUuTtW--_" 
  }, 
  { 
    "_key" : "78065", 
    "_id" : "connections/78065", 
    "_from" : "components/B7", 
    "_to" : "components/B19", 
    "_rev" : "_kgUuTtW--A" 
  }, 
  { 
    "_key" : "78067", 
    "_id" : "connections/78067", 
    "_from" : "components/B11", 
    "_to" : "components/B10", 
    "_rev" : "_kgUuTtW--B" 
  }, 
  { 
    "_key" : "78069", 
    "_id" : "connections/78069", 
    "_from" : "components/B12", 
    "_to" : "components/B11", 
    "_rev" : "_kgUuTta---" 
  }, 
  { 
    "_key" : "78071", 
    "_id" : "connections/78071", 
    "_from" : "components/B13", 
    "_to" : "components/B12", 
    "_rev" : "_kgUuTta--_" 
  }, 
  { 
    "_key" : "78073", 
    "_id" : "connections/78073", 
    "_from" : "components/B13", 
    "_to" : "components/B20", 
    "_rev" : "_kgUuTta--A" 
  }, 
  { 
    "_key" : "78075", 
    "_id" : "connections/78075", 
    "_from" : "components/B14", 
    "_to" : "components/B13", 
    "_rev" : "_kgUuTta--B" 
  }, 
  { 
    "_key" : "78077", 
    "_id" : "connections/78077", 
    "_from" : "components/B15", 
    "_to" : "components/B14", 
    "_rev" : "_kgUuTte---" 
  }, 
  { 
    "_key" : "78079", 
    "_id" : "connections/78079", 
    "_from" : "components/B15", 
    "_to" : "components/B16", 
    "_rev" : "_kgUuTte--_" 
  }, 
  { 
    "_key" : "78081", 
    "_id" : "connections/78081", 
    "_from" : "components/B17", 
    "_to" : "components/B15", 
    "_rev" : "_kgUuTte--A" 
  }, 
  { 
    "_key" : "78083", 
    "_id" : "connections/78083", 
    "_from" : "components/B17", 
    "_to" : "components/B18", 
    "_rev" : "_kgUuTte--B" 
  }, 
  { 
    "_key" : "78085", 
    "_id" : "connections/78085", 
    "_from" : "components/B19", 
    "_to" : "components/B17", 
    "_rev" : "_kgUuTti---" 
  }, 
  { 
    "_key" : "78087", 
    "_id" : "connections/78087", 
    "_from" : "components/B20", 
    "_to" : "components/B21", 
    "_rev" : "_kgUuTti--_" 
  }, 
  { 
    "_key" : "78089", 
    "_id" : "connections/78089", 
    "_from" : "components/B20", 
    "_to" : "components/B22", 
    "_rev" : "_kgUuTti--A" 
  }, 
  { 
    "_key" : "78091", 
    "_id" : "connections/78091", 
    "_from" : "components/C1", 
    "_to" : "components/C2", 
    "_rev" : "_kgUuTti--B" 
  }, 
  { 
    "_key" : "78093", 
    "_id" : "connections/78093", 
    "_from" : "components/C2", 
    "_to" : "components/C3", 
    "_rev" : "_kgUuTti--C" 
  }, 
  { 
    "_key" : "78095", 
    "_id" : "connections/78095", 
    "_from" : "components/C3", 
    "_to" : "components/C4", 
    "_rev" : "_kgUuTtm---" 
  }, 
  { 
    "_key" : "78097", 
    "_id" : "connections/78097", 
    "_from" : "components/C4", 
    "_to" : "components/C5", 
    "_rev" : "_kgUuTtm--_" 
  }, 
  { 
    "_key" : "78099", 
    "_id" : "connections/78099", 
    "_from" : "components/C4", 
    "_to" : "components/C7", 
    "_rev" : "_kgUuTtm--A" 
  }, 
  { 
    "_key" : "78101", 
    "_id" : "connections/78101", 
    "_from" : "components/C5", 
    "_to" : "components/C6", 
    "_rev" : "_kgUuTtm--B" 
  }, 
  { 
    "_key" : "78103", 
    "_id" : "connections/78103", 
    "_from" : "components/C5", 
    "_to" : "components/C7", 
    "_rev" : "_kgUuTtq---" 
  }, 
  { 
    "_key" : "78105", 
    "_id" : "connections/78105", 
    "_from" : "components/C7", 
    "_to" : "components/C8", 
    "_rev" : "_kgUuTtq--_" 
  }, 
  { 
    "_key" : "78107", 
    "_id" : "connections/78107", 
    "_from" : "components/C8", 
    "_to" : "components/C9", 
    "_rev" : "_kgUuTtq--A" 
  }, 
  { 
    "_key" : "78109", 
    "_id" : "connections/78109", 
    "_from" : "components/C8", 
    "_to" : "components/C10", 
    "_rev" : "_kgUuTtq--B" 
  } 
]

Higher volume graph examples

All of the above examples are rather small to make them easy to comprehend and demonstrate how graphs work in ArangoDB. However, there are several, freely available datasets on the web that are a lot bigger.

You can find a collection of datasets with import scripts on GitHub .

Another huge graph is the Pokec social network  from Slovakia. See this blogpost  for details and an import script.

More examples