Skip to content

Commit c84d031

Browse files
author
Mark Needham
committed
pr run
1 parent af09c99 commit c84d031

File tree

1 file changed

+168
-11
lines changed

1 file changed

+168
-11
lines changed

notebooks/PageRank.ipynb

Lines changed: 168 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"cell_type": "code",
22-
"execution_count": null,
22+
"execution_count": 13,
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
@@ -37,7 +37,7 @@
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": null,
40+
"execution_count": 14,
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -56,9 +56,17 @@
5656
},
5757
{
5858
"cell_type": "code",
59-
"execution_count": null,
59+
"execution_count": 15,
6060
"metadata": {},
61-
"outputs": [],
61+
"outputs": [
62+
{
63+
"name": "stdout",
64+
"output_type": "stream",
65+
"text": [
66+
"Stats: {}\n"
67+
]
68+
}
69+
],
6270
"source": [
6371
"create_graph_query = '''\n",
6472
"MERGE (home:Page {name:'Home'})\n",
@@ -100,9 +108,96 @@
100108
},
101109
{
102110
"cell_type": "code",
103-
"execution_count": null,
111+
"execution_count": 16,
104112
"metadata": {},
105-
"outputs": [],
113+
"outputs": [
114+
{
115+
"data": {
116+
"text/html": [
117+
"<div>\n",
118+
"<style scoped>\n",
119+
" .dataframe tbody tr th:only-of-type {\n",
120+
" vertical-align: middle;\n",
121+
" }\n",
122+
"\n",
123+
" .dataframe tbody tr th {\n",
124+
" vertical-align: top;\n",
125+
" }\n",
126+
"\n",
127+
" .dataframe thead th {\n",
128+
" text-align: right;\n",
129+
" }\n",
130+
"</style>\n",
131+
"<table border=\"1\" class=\"dataframe\">\n",
132+
" <thead>\n",
133+
" <tr style=\"text-align: right;\">\n",
134+
" <th></th>\n",
135+
" <th>page</th>\n",
136+
" <th>score</th>\n",
137+
" </tr>\n",
138+
" </thead>\n",
139+
" <tbody>\n",
140+
" <tr>\n",
141+
" <th>0</th>\n",
142+
" <td>Home</td>\n",
143+
" <td>3.233877</td>\n",
144+
" </tr>\n",
145+
" <tr>\n",
146+
" <th>1</th>\n",
147+
" <td>About</td>\n",
148+
" <td>1.060435</td>\n",
149+
" </tr>\n",
150+
" <tr>\n",
151+
" <th>2</th>\n",
152+
" <td>Product</td>\n",
153+
" <td>1.060435</td>\n",
154+
" </tr>\n",
155+
" <tr>\n",
156+
" <th>3</th>\n",
157+
" <td>Links</td>\n",
158+
" <td>1.060435</td>\n",
159+
" </tr>\n",
160+
" <tr>\n",
161+
" <th>4</th>\n",
162+
" <td>Site A</td>\n",
163+
" <td>0.329035</td>\n",
164+
" </tr>\n",
165+
" <tr>\n",
166+
" <th>5</th>\n",
167+
" <td>Site B</td>\n",
168+
" <td>0.329035</td>\n",
169+
" </tr>\n",
170+
" <tr>\n",
171+
" <th>6</th>\n",
172+
" <td>Site C</td>\n",
173+
" <td>0.329035</td>\n",
174+
" </tr>\n",
175+
" <tr>\n",
176+
" <th>7</th>\n",
177+
" <td>Site D</td>\n",
178+
" <td>0.329035</td>\n",
179+
" </tr>\n",
180+
" </tbody>\n",
181+
"</table>\n",
182+
"</div>"
183+
],
184+
"text/plain": [
185+
" page score\n",
186+
"0 Home 3.233877\n",
187+
"1 About 1.060435\n",
188+
"2 Product 1.060435\n",
189+
"3 Links 1.060435\n",
190+
"4 Site A 0.329035\n",
191+
"5 Site B 0.329035\n",
192+
"6 Site C 0.329035\n",
193+
"7 Site D 0.329035"
194+
]
195+
},
196+
"execution_count": 16,
197+
"metadata": {},
198+
"output_type": "execute_result"
199+
}
200+
],
106201
"source": [
107202
"streaming_query = \"\"\"\n",
108203
"CALL algo.pageRank.stream('Page', 'LINKS', {iterations:20, dampingFactor:0.85})\n",
@@ -128,9 +223,31 @@
128223
},
129224
{
130225
"cell_type": "code",
131-
"execution_count": null,
226+
"execution_count": 17,
132227
"metadata": {},
133-
"outputs": [],
228+
"outputs": [
229+
{
230+
"data": {
231+
"text/html": [
232+
"<style>\n",
233+
".output_wrapper, .output {\n",
234+
" height:auto !important;\n",
235+
" max-height:600px;\n",
236+
"}\n",
237+
".output_scroll {\n",
238+
" box-shadow:none !important;\n",
239+
" webkit-box-shadow:none !important;\n",
240+
"}\n",
241+
"</style>"
242+
],
243+
"text/plain": [
244+
"<IPython.core.display.HTML object>"
245+
]
246+
},
247+
"metadata": {},
248+
"output_type": "display_data"
249+
}
250+
],
134251
"source": [
135252
"%%html\n",
136253
"<style>\n",
@@ -147,9 +264,31 @@
147264
},
148265
{
149266
"cell_type": "code",
150-
"execution_count": null,
267+
"execution_count": 18,
151268
"metadata": {},
152-
"outputs": [],
269+
"outputs": [
270+
{
271+
"data": {
272+
"text/html": [
273+
"\n",
274+
" <iframe\n",
275+
" width=\"100%\"\n",
276+
" height=\"320px\"\n",
277+
" src=\"figure/graph-9452fd59-1d5f-4eef-8870-8bcfd2b20e02.html\"\n",
278+
" frameborder=\"0\"\n",
279+
" allowfullscreen\n",
280+
" ></iframe>\n",
281+
" "
282+
],
283+
"text/plain": [
284+
"<IPython.lib.display.IFrame at 0x1089a51d0>"
285+
]
286+
},
287+
"execution_count": 18,
288+
"metadata": {},
289+
"output_type": "execute_result"
290+
}
291+
],
153292
"source": [
154293
"from scripts.vis import generate_vis\n",
155294
"\n",
@@ -161,7 +300,25 @@
161300
]
162301
}
163302
],
164-
"metadata": {},
303+
"metadata": {
304+
"kernelspec": {
305+
"display_name": "Python 3",
306+
"language": "python",
307+
"name": "python3"
308+
},
309+
"language_info": {
310+
"codemirror_mode": {
311+
"name": "ipython",
312+
"version": 3
313+
},
314+
"file_extension": ".py",
315+
"mimetype": "text/x-python",
316+
"name": "python",
317+
"nbconvert_exporter": "python",
318+
"pygments_lexer": "ipython3",
319+
"version": "3.6.0"
320+
}
321+
},
165322
"nbformat": 4,
166323
"nbformat_minor": 2
167324
}

0 commit comments

Comments
 (0)