Skip to content

Commit

Permalink
update workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
katarinasupe committed May 4, 2023
1 parent 758d0cc commit 68d328a
Showing 1 changed file with 89 additions and 53 deletions.
142 changes: 89 additions & 53 deletions dors-cluc-workshop/game-of-graphs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
},
{
"cell_type": "markdown",
"id": "09ef48dd",
"id": "f5e5e178",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/harry-potter-got.png\" width=\"800\" />"
Expand Down Expand Up @@ -802,7 +802,7 @@
},
{
"cell_type": "markdown",
"id": "e8138588",
"id": "6f5d65bd",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/manticore.png\" width=\"600\" />"
Expand Down Expand Up @@ -896,7 +896,7 @@
},
{
"cell_type": "markdown",
"id": "9ebc30c9",
"id": "9268df11",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/ned-umber.png\" width=\"600\" />"
Expand Down Expand Up @@ -1087,7 +1087,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 48,
"id": "d1834484",
"metadata": {
"scrolled": true
Expand Down Expand Up @@ -1134,7 +1134,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 49,
"id": "6a9afb9b",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1190,9 +1190,11 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 50,
"id": "32535947",
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1222,6 +1224,14 @@
" print(result[\"season\"].number, result[\"death_count\"])"
]
},
{
"cell_type": "markdown",
"id": "28594cdd",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/num-of-kills-per-season.png\" width=\"700\" />"
]
},
{
"cell_type": "markdown",
"id": "eee3fc0c",
Expand All @@ -1232,7 +1242,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 51,
"id": "55679941",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1264,6 +1274,14 @@
" print(\"Season:\", result[\"season\"].number, \"| Rating:\", result[\"rating\"])"
]
},
{
"cell_type": "markdown",
"id": "1a589297",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/top-seasons-by-imdb.png\" width=\"600\" />"
]
},
{
"cell_type": "markdown",
"id": "65d019f1",
Expand All @@ -1274,9 +1292,11 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 52,
"id": "329bd44a",
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1315,6 +1335,14 @@
" \"| Deaths:\", result[\"deaths\"], \"| KDR:\", result[\"KDR\"])"
]
},
{
"cell_type": "markdown",
"id": "ab64cdfe",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/top-10-allegiances.png\" width=\"600\" />"
]
},
{
"cell_type": "markdown",
"id": "371a847a",
Expand All @@ -1325,7 +1353,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 56,
"id": "52cef37b",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1371,38 +1399,38 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 57,
"id": "c82986be",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Victim: Golden Company soldier | Kill Count: 374 | Episode name: The Bells \n",
"Victim: Kings Landing Citizen | Kill Count: 227 | Episode name: The Bells \n",
"Victim: Lannister soldier | Kill Count: 178 | Episode name: The Spoils of War \n",
"Victim: Lannister soldier | Kill Count: 166 | Episode name: The Bells \n",
"Victim: Golden Company soldier | Kill Count: 374 | Episode name: The Bells\n",
"Victim: Kings Landing Citizen | Kill Count: 227 | Episode name: The Bells\n",
"Victim: Lannister soldier | Kill Count: 178 | Episode name: The Spoils of War\n",
"Victim: Lannister soldier | Kill Count: 166 | Episode name: The Bells\n",
"Victim: Sons of the Harpy agent | Kill Count: 54 | Episode name: The Dance of Dragons\n",
"Victim: Dothraki Khal | Kill Count: 14 | Episode name: Book of the Stranger \n",
"Victim: Dothraki Khal | Kill Count: 14 | Episode name: Book of the Stranger\n",
"Victim: The Masters Soldier | Kill Count: 12 | Episode name: Battle of the Bastards\n",
"Victim: Greyjoy Soldier | Kill Count: 2 | Episode name: The Bells \n",
"Victim: Horse | Kill Count: 2 | Episode name: The Spoils of War \n",
"Victim: Xaro Xhoan Daxos | Kill Count: 1 | Episode name: Valar Morghulis \n",
"Victim: Khal Moro | Kill Count: 1 | Episode name: Book of the Stranger \n",
"Victim: Golden Company horse | Kill Count: 1 | Episode name: The Bells \n",
"Victim: Pyat Pree | Kill Count: 1 | Episode name: Valar Morghulis \n",
"Victim: Zalla | Kill Count: 1 | Episode name: The Children \n",
"Victim: Kraznys mo Nakloz | Kill Count: 1 | Episode name: And Now His Watch Is Ended \n",
"Victim: Varys | Kill Count: 1 | Episode name: The Bells \n",
"Victim: Doreah | Kill Count: 1 | Episode name: Valar Morghulis \n",
"Victim: Cersei Lannister | Kill Count: 1 | Episode name: The Bells \n",
"Victim: Goat | Kill Count: 1 | Episode name: The Laws of Gods and Men \n",
"Victim: Mirri Maz Duur | Kill Count: 1 | Episode name: Fire and Blood\n",
"Victim: Khal Drogo | Kill Count: 1 | Episode name: Fire and Blood\n",
"Victim: Horse | Kill Count: 2 | Episode name: The Spoils of War\n",
"Victim: Greyjoy Soldier | Kill Count: 2 | Episode name: The Bells\n",
"Victim: Pyat Pree | Kill Count: 1 | Episode name: Valar Morghulis\n",
"Victim: Dickon Tarly | Kill Count: 1 | Episode name: Eastwatch\n",
"Victim: Xaro Xhoan Daxos | Kill Count: 1 | Episode name: Valar Morghulis\n",
"Victim: Goat | Kill Count: 1 | Episode name: The Laws of Gods and Men\n",
"Victim: Varys | Kill Count: 1 | Episode name: The Bells\n",
"Victim: Mirri Maz Duur | Kill Count: 1 | Episode name: Fire and Blood\n",
"Victim: Kraznys mo Nakloz | Kill Count: 1 | Episode name: And Now His Watch Is Ended\n",
"Victim: Zalla | Kill Count: 1 | Episode name: The Children\n",
"Victim: Khal Moro | Kill Count: 1 | Episode name: Book of the Stranger\n",
"Victim: Randyll Tarly | Kill Count: 1 | Episode name: Eastwatch\n",
"Victim: Jaime Lannister | Kill Count: 1 | Episode name: The Bells \n"
"Victim: Khal Drogo | Kill Count: 1 | Episode name: Fire and Blood\n",
"Victim: Golden Company horse | Kill Count: 1 | Episode name: The Bells\n",
"Victim: Doreah | Kill Count: 1 | Episode name: Valar Morghulis\n",
"Victim: Cersei Lannister | Kill Count: 1 | Episode name: The Bells\n",
"Victim: Jaime Lannister | Kill Count: 1 | Episode name: The Bells\n"
]
}
],
Expand All @@ -1422,6 +1450,14 @@
" , \"| Episode name:\", result[\"episode\"].name)"
]
},
{
"cell_type": "markdown",
"id": "cb417616",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/daenerys.png\" width=\"500\" />"
]
},
{
"cell_type": "markdown",
"id": "5a38cecf",
Expand All @@ -1432,24 +1468,24 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 58,
"id": "94c66c50",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Daenerys Targaryen | BC: 0.26416716859707734\n",
"Lannister soldier | BC: 0.11163138590238253\n",
"Sons of the Harpy agent | BC: 0.04326120746568793\n",
"Jon Snow | BC: 0.04152733973021257\n",
"Wildling | BC: 0.037823960457165504\n",
"Daenerys Targaryen | BC: 0.2641671685970775\n",
"Lannister soldier | BC: 0.11163138590238258\n",
"Sons of the Harpy agent | BC: 0.043261207465688005\n",
"Jon Snow | BC: 0.04152733973021262\n",
"Wildling | BC: 0.03782396045716538\n",
"Stark Soldier | BC: 0.02860945609559936\n",
"Baratheon of Dragonstone soldier | BC: 0.027533816622595367\n",
"Baratheon of Dragonstone soldier | BC: 0.02753381662259537\n",
"Cersei Lannister | BC: 0.026445092829209968\n",
"Stark soldier | BC: 0.02432818459201446\n",
"Nights Watch brother | BC: 0.02271917772956741\n"
"Stark soldier | BC: 0.02432818459201448\n",
"Nights Watch brother | BC: 0.022719177729567438\n"
]
}
],
Expand Down Expand Up @@ -1488,7 +1524,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 59,
"id": "51741a10",
"metadata": {},
"outputs": [
Expand All @@ -1499,8 +1535,8 @@
"Victim: Bolton soldier | Kill count: 20\n",
"Victim: Lannister soldier | Kill count: 7\n",
"Victim: Daenerys Targaryen | Kill count: 1\n",
"Victim: Olly | Kill count: 1\n",
"Victim: Stark Soldier | Kill count: 1\n",
"Victim: Olly | Kill count: 1\n",
"Victim: Alliser Thorne | Kill count: 1\n",
"Victim: Othell Yarwyck | Kill count: 1\n",
"Victim: Bowen Marsh | Kill count: 1\n"
Expand Down Expand Up @@ -1533,7 +1569,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 60,
"id": "65e19f9e",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1566,7 +1602,7 @@
"id": "79ff8390",
"metadata": {},
"source": [
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/582630e6240bec61876192174d1e746ef809a788/got-analysis/img/memgraph-lab-jon-snow-olly.png\" width=\"800\" />"
"<img alt=\"movies_graph_model\" src=\"https://raw.githubusercontent.com/memgraph/jupyter-memgraph-tutorials/main/dors-cluc-workshop/img/memgraph-lab-jon-snow-olly.png\" width=\"500\" />"
]
},
{
Expand All @@ -1579,7 +1615,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 61,
"id": "b99e8f42",
"metadata": {},
"outputs": [
Expand All @@ -1591,12 +1627,12 @@
"Traitor: Ramsay Bolton | Kill count: 4\n",
"Traitor: Theon Greyjoy | Kill count: 4\n",
"Traitor: Sandor the Hound Clegane | Kill count: 3\n",
"Traitor: Reek | Kill count: 2\n",
"Traitor: Euron Greyjoy | Kill count: 2\n",
"Traitor: Daario Naharis | Kill count: 2\n",
"Traitor: Gregor the Mountain Clegane | Kill count: 2\n",
"Traitor: Daenerys Targaryen | Kill count: 2\n",
"Traitor: Tyrion Lannister | Kill count: 2\n"
"Traitor: Reek | Kill count: 2\n",
"Traitor: Euron Greyjoy | Kill count: 2\n",
"Traitor: Karl Tanner | Kill count: 2\n",
"Traitor: Daario Naharis | Kill count: 2\n"
]
}
],
Expand Down Expand Up @@ -1628,12 +1664,12 @@
"id": "8f3f6dad",
"metadata": {},
"source": [
"Memgraph supports graph algorithms as well. Let's use **Dijkstra's shortest path algorithm** to show the most gruesome path of kills. An example kill path is: Jon Snow killed 5 Lannister Soldiers and they killed 10 Stark soldiers with total kill_count of 15."
"Memgraph supports graph algorithms as well. Let's use **Dijkstra's shortest path algorithm** to show the shortest path of killings with highest kill count. An example kill path is: Jon Snow killed 5 Lannister Soldiers and they killed 10 Stark soldiers with total kill_count of 15."
]
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 63,
"id": "cef0423c",
"metadata": {
"scrolled": true
Expand Down Expand Up @@ -1670,7 +1706,7 @@
"id": "418bbd38",
"metadata": {},
"source": [
"That's it! Hopefully, you gained new knowledge and enjoyed this workshop. If you have any questions, don't hesitate to contact me directly or [join our Discord server](https://discord.gg/memgraph)."
"That's it! Hopefully, you gained new knowledge and enjoyed this workshop. If you have any questions, don't hesitate to contact us directly or [join our Discord server](https://discord.gg/memgraph)."
]
}
],
Expand Down

0 comments on commit 68d328a

Please sign in to comment.